diff options
| author | 2012-09-30 11:44:22 -0700 | |
|---|---|---|
| committer | 2012-10-01 09:09:25 -0700 | |
| commit | 38389b6cf7bd2ef49d2bd20ff1bca8677596590e (patch) | |
| tree | df60d969dee05b53545e2b0b18bfba57d266d595 /location/java/com | |
| parent | ce803d8ed8350179a8474564df8ff26be32bbe5e (diff) | |
Route GPS notifications to all users.
This takes the easy way around notifying the correct users
about GPS state transitions by notifying ALL the users(!).
I've also laid groundwork for proper multiuser support in
LocationManager and did a tiny bit of cleanup in
GpsNetInitiatedHandler while I was looking at notifications.
Bug: 7213552
Change-Id: I2d6dc65c459e55d110ac0f5f79ae7a87ad638ede
Diffstat (limited to 'location/java/com')
| -rwxr-xr-x | location/java/com/android/internal/location/GpsNetInitiatedHandler.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java index 0adba06fe36b..57e2786213bb 100755 --- a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java +++ b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java @@ -26,6 +26,7 @@ import android.content.Intent; import android.location.LocationManager; import android.os.Bundle; import android.os.RemoteException; +import android.os.UserHandle; import android.util.Log; import com.android.internal.R; @@ -89,7 +90,6 @@ public class GpsNetInitiatedHandler { // configuration of notificaiton behavior private boolean mPlaySounds = false; - private boolean visible = true; private boolean mPopupImmediately = true; // Set to true if string from HAL is encoded as Hex, e.g., "3F0039" @@ -213,11 +213,8 @@ public class GpsNetInitiatedHandler { PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, intent, 0); mNiNotification.setLatestEventInfo(mContext, title, message, pi); - if (visible) { - notificationManager.notify(notif.notificationId, mNiNotification); - } else { - notificationManager.cancel(notif.notificationId); - } + notificationManager.notifyAsUser(null, notif.notificationId, mNiNotification, + UserHandle.ALL); } // Opens the notification dialog and waits for user input |