summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorAmith Yamasani <>2009-04-02 11:39:09 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-04-02 11:39:09 -0700
commit29c1c42e18a72a3c5760a9fb741031877293d5aa (patch)
treeae9695e502fc5efd972b60b0e4ef9d98fce4fc9f /services
parent196677cf8caf9830760c4ea1e2d3afc42b09cf36 (diff)
downloadframeworks_base-29c1c42e18a72a3c5760a9fb741031877293d5aa.zip
frameworks_base-29c1c42e18a72a3c5760a9fb741031877293d5aa.tar.gz
frameworks_base-29c1c42e18a72a3c5760a9fb741031877293d5aa.tar.bz2
AI 144256: Need to show opt-in screen for location collection.
Added a screen to the setup wizard, after login, to ask user to opt-in for location collection. Added a dialog to Settings when user turns on Network location. Fixed a security permission issue in LocationManagerService related to this change. BUG=1752566 Automated import of CL 144256
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/LocationManagerService.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java
index 5abf249..705ddb3 100644
--- a/services/java/com/android/server/LocationManagerService.java
+++ b/services/java/com/android/server/LocationManagerService.java
@@ -2074,6 +2074,8 @@ public class LocationManagerService extends ILocationManager.Stub
private void updateWakelockStatusLocked(boolean screenOn) {
log("updateWakelockStatus(): " + screenOn);
+ long callerId = Binder.clearCallingIdentity();
+
boolean needsLock = false;
long minTime = Integer.MAX_VALUE;
@@ -2117,6 +2119,7 @@ public class LocationManagerService extends ILocationManager.Stub
mLocationHandler.removeMessages(MESSAGE_RELEASE_WAKE_LOCK);
releaseWakeLockLocked();
}
+ Binder.restoreCallingIdentity(callerId);
}
private void acquireWakeLockLocked() {