This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Work around a bug in Android 4.3 | |
*/ | |
public static CharSequence fixFontColor(CharSequence seq, int color) { | |
if (Build.VERSION.SDK_INT < 18 || !(seq instanceof Spanned)) | |
return seq; | |
Spannable txt = (seq instanceof Spannable ? (Spannable)seq : new SpannableString(seq)); | |
for (ForegroundColorSpan ann : txt.getSpans(0, txt.length(), ForegroundColorSpan.class)) { | |
if (ann.getForegroundColor() != color) { | |
int start = txt.getSpanStart(ann), end = txt.getSpanEnd(ann), flags = txt.getSpanFlags(ann); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public boolean onOptionsItemSelected(MenuItem item) { | |
switch (item.getItemId()) { | |
case android.R.id.home: | |
onBackPressed(); // OMG THIS IS SO WRONG BUT ALSO SO RIGHT | |
return true; | |
// other cases... | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/builder/src/main/java/com/android/builder/testing/ConnectedDevice.java b/builder/src/main/java/com/android/builder/testing/ConnectedDevice.java | |
index 8a1aa64..edfe30a 100644 | |
--- a/builder/src/main/java/com/android/builder/testing/ConnectedDevice.java | |
+++ b/builder/src/main/java/com/android/builder/testing/ConnectedDevice.java | |
@@ -28,7 +28,6 @@ import com.android.utils.ILogger; | |
import java.io.File; | |
import java.io.IOException; | |
-import java.util.concurrent.TimeUnit; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/builder-model/src/main/java/com/android/builder/model/AaptOptions.java b/builder-model/src/main/java/com/android/builder/model/AaptOptions.java | |
index 86192e0..6b42479 100644 | |
--- a/builder-model/src/main/java/com/android/builder/model/AaptOptions.java | |
+++ b/builder-model/src/main/java/com/android/builder/model/AaptOptions.java | |
@@ -31,4 +31,9 @@ public interface AaptOptions { | |
* Returns the list of values for the -0 (disabled compression) option, or null | |
*/ | |
List<String> getNoCompress(); | |
+ | |
+ /** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DateUtils { | |
// ... | |
/** | |
* This constant is actually the length of 364 days, not of a year! | |
*/ | |
public static final long YEAR_IN_MILLIS = WEEK_IN_MILLIS * 52; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?> | |
<InfoDump application="NFC TagInfo" version="1.09c"> | |
<Tag rfTechnology="Type V (ISO/IEC 15693 / Vicinity)"> | |
<GeneralInformation> | |
<Value name="uid" description="UID">e0XXXXXXXXXXXXXX</Value> | |
<Value name="rfTechnology" description="RF technology">Type V (ISO/IEC 15693 / Vicinity)</Value> | |
<Value name="tagType" description="Tag type">SL2 ICS2001 (ICODE SLI)</Value> | |
<Value name="manufacturer" description="Manufacturer">NXP Semiconductors (Germany)</Value> | |
<Value name="afiString" description="Application family identifier (AFI)">all families and sub-families</Value> | |
<Value name="afi" description="AFI (numeric)">00</Value> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.ContentValues; | |
import android.database.Cursor; | |
import android.provider.CalendarContract.Calendars; | |
import android.provider.CalendarContract.Events; | |
Cursor calendarCursor; | |
// query the Calendars provider, and position to the desired row | |
long calendarId = calendarCursor.getLong(calendarCursor.getColumnIndex(Calendars._ID)); | |
String calendarOwner = calendarCursor.getString(calendarCursor.getColumnIndex(Calendars.OWNER_ACCOUNT)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.meetup.utils; | |
import android.annotation.TargetApi; | |
import android.app.Activity; | |
import android.net.Uri; | |
import android.nfc.NdefMessage; | |
import android.nfc.NdefRecord; | |
import android.nfc.NfcAdapter; | |
import android.nfc.NfcEvent; | |
import android.os.Build; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.android.gms.maps.model.LatLng; | |
import com.google.common.collect.Lists; | |
import java.util.List; | |
import static java.lang.Math.*; | |
public class CircleMaker { | |
private static final double EARTH_RADIUS = 6371000.0; /* meters */ | |
private static final int CIRCLE_PRECISION = 48; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡ ̡͌l̡̡̡̡.___ | |
U+005F LOW LINE | |
UTF-8: 5f UTF-16BE: 005f Decimal: _ | |
_ | |
Category: Pc (Punctuation, Connector) | |
Bidi: ON (Other Neutrals) | |
U+005F LOW LINE | |
UTF-8: 5f UTF-16BE: 005f Decimal: _ |