This file contains hidden or 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
/* Performance logging for animations. | |
final DebugAnimationListener debug = new DebugAnimationListener(); | |
animator.addUpdateListener(debug); | |
animator.addListener(debug); | |
*/ | |
class DebugAnimationListener implements ValueAnimator.AnimatorUpdateListener, Animator.AnimatorListener { |
This file contains hidden or 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
<html> | |
<head> | |
<meta charset="UTF-8"> | |
</head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js" type="text/javascript"></script> | |
<script src="./test-reconnecting-websocket.js"></script> | |
<script> | |
function log(msg) { | |
var node = document.createElement("li") | |
node.appendChild(document.createTextNode(msg)) |
This file contains hidden or 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
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; |
This file contains hidden or 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
/* | |
This patch lets a ViewPagerAdapter{subclass} not know the exact number of items, and only keep prev and next. | |
- Return some arbitrary large number from getCount | |
- Maintain prev and next data items (not whole list) | |
- In instantiateItem, return null for item positions other than prev/next, or when there is no prev/next item | |
With this patch, ViewPager will notice the "null"'s and treat them like "end of list" markers. | |
*/ |
This file contains hidden or 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 SpinnerWithBaseline extends Spinner { | |
public SpinnerWithBaseline(Context context, AttributeSet attr) { | |
super(context, attr); | |
} | |
@Override | |
public int getBaseline() { | |
final int children = getChildCount(); | |
int childBaseline = 0; |
This file contains hidden or 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 SamsungLGLauncher { | |
private static final String TAG = "SamsungLGLauncher"; | |
private static final String SEC_PACKAGE_NAME = "com.sec.android.app.launcher"; | |
private static final String LG_PACKAGE_NAME = "com.lge.launcher2"; | |
private static final String ACTION = "android.intent.action.BADGE_COUNT_UPDATE"; | |
public static boolean isSamsungInstalled(Context context) { |
This file contains hidden or 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
#!/usr/bin/python | |
import sys | |
import argparse | |
import os | |
import re | |
import png | |
MAPPING = { | |
"drawable-mdpi" : "drawable-mdpi", |
This file contains hidden or 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 org.kman.AquaMail.core; | |
import java.util.Locale; | |
import org.kman.Compat.util.MyLog; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
import android.content.res.Configuration; |
This file contains hidden or 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"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" > | |
<View | |
android:id="@+id/view1" | |
android:layout_width="160dp" | |
android:layout_height="60dp" | |
android:layout_centerHorizontal="true" |
This file contains hidden or 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 SSLHardening { | |
private static final String TAG = "SSLHardening"; | |
public static boolean isSupported() { | |
return Build.VERSION.SDK_INT >= 14; | |
} | |
public static boolean isHardeningEnabled(Context context) { | |
if (isSupported()) { |