Merge "Update to show new location monitoring op."

This commit is contained in:
Dianne Hackborn
2013-07-10 18:46:03 +00:00
committed by Android (Google) Code Review
3 changed files with 10 additions and 1 deletions

View File

@@ -638,6 +638,7 @@
<item>notification volume</item> <item>notification volume</item>
<item>bluetooth volume</item> <item>bluetooth volume</item>
<item>keep awake</item> <item>keep awake</item>
<item>monitor location</item>
</string-array> </string-array>
<!-- User display names for app ops codes --> <!-- User display names for app ops codes -->
@@ -683,6 +684,7 @@
<item>Notification volume</item> <item>Notification volume</item>
<item>Bluetooth volume</item> <item>Bluetooth volume</item>
<item>Keep awake</item> <item>Keep awake</item>
<item>Location</item>
</string-array> </string-array>
<!-- Titles for the list of long press timeout options. --> <!-- Titles for the list of long press timeout options. -->

View File

@@ -101,11 +101,13 @@ public class AppOpsState {
AppOpsManager.OP_FINE_LOCATION, AppOpsManager.OP_FINE_LOCATION,
AppOpsManager.OP_GPS, AppOpsManager.OP_GPS,
AppOpsManager.OP_WIFI_SCAN, AppOpsManager.OP_WIFI_SCAN,
AppOpsManager.OP_NEIGHBORING_CELLS }, AppOpsManager.OP_NEIGHBORING_CELLS,
AppOpsManager.OP_MONITOR_LOCATION },
new boolean[] { true, new boolean[] { true,
true, true,
false, false,
false, false,
false,
false } false }
); );

View File

@@ -909,6 +909,7 @@ public class PowerUsageSummary extends PreferenceFragment implements Runnable {
BatterySipper bs; BatterySipper bs;
synchronized (mRequestQueue) { synchronized (mRequestQueue) {
if (mRequestQueue.isEmpty() || mAbort) { if (mRequestQueue.isEmpty() || mAbort) {
mHandler.sendEmptyMessage(MSG_REPORT_FULLY_DRAWN);
mRequestThread = null; mRequestThread = null;
return; return;
} }
@@ -919,6 +920,7 @@ public class PowerUsageSummary extends PreferenceFragment implements Runnable {
} }
static final int MSG_UPDATE_NAME_ICON = 1; static final int MSG_UPDATE_NAME_ICON = 1;
static final int MSG_REPORT_FULLY_DRAWN = 2;
Handler mHandler = new Handler() { Handler mHandler = new Handler() {
@@ -935,6 +937,9 @@ public class PowerUsageSummary extends PreferenceFragment implements Runnable {
pgp.setTitle(bs.name); pgp.setTitle(bs.name);
} }
break; break;
case MSG_REPORT_FULLY_DRAWN:
getActivity().reportFullyDrawn();
break;
} }
super.handleMessage(msg); super.handleMessage(msg);
} }