Merge remote-tracking branch 'origin/master'

This commit is contained in:
Mariotaku Lee 2015-03-20 20:40:41 +08:00
commit cff2d8fb17
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ public class SpiceProfilingUtil {
final Intent intent = context.registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); final Intent intent = context.registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
if (intent == null) return false; if (intent == null) return false;
final int plugged = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1); final int plugged = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
return plugged == BatteryManager.BATTERY_PLUGGED_AC || plugged == BatteryManager.BATTERY_PLUGGED_USB; return plugged == BatteryManager.BATTERY_PLUGGED_AC || plugged == BatteryManager.BATTERY_PLUGGED_USB || plugged == BatteryManager.BATTERY_PLUGGED_WIRELESS;
} }
public static boolean log(final Context context, final String msg) { public static boolean log(final Context context, final String msg) {