From 9266698e4c1a63e0029625996bfe93de3501fcfa Mon Sep 17 00:00:00 2001 From: "Denny C. Ng" Date: Thu, 19 Mar 2015 22:49:20 +0100 Subject: [PATCH] add wireless power adapter judgement update the uploading condition: when Wi-Fi connected and wireless power connected --- .../java/edu/tsinghua/spice/Utilies/SpiceProfilingUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twidere/src/main/java/edu/tsinghua/spice/Utilies/SpiceProfilingUtil.java b/twidere/src/main/java/edu/tsinghua/spice/Utilies/SpiceProfilingUtil.java index 34b7758ce..eff16c8dd 100644 --- a/twidere/src/main/java/edu/tsinghua/spice/Utilies/SpiceProfilingUtil.java +++ b/twidere/src/main/java/edu/tsinghua/spice/Utilies/SpiceProfilingUtil.java @@ -37,7 +37,7 @@ public class SpiceProfilingUtil { final Intent intent = context.registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); if (intent == null) return false; 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) {