summaryrefslogtreecommitdiffstats
path: root/services/core/java/com/android/server/wallpaper
diff options
context:
space:
mode:
authorRoman Birg <roman@cyngn.com>2015-03-17 13:22:32 -0700
committerSteve Kondik <steve@cyngn.com>2015-10-26 16:09:13 -0700
commit232fd7efedd0efdba35991bdd6b9ca2358b93fb1 (patch)
tree2ee24cc7d2e46f7286ec4a23becd6fa43b6fed53 /services/core/java/com/android/server/wallpaper
parent22a0a9d7806390b0a05498ec027b4c52656ef0ab (diff)
downloadframeworks_base-232fd7efedd0efdba35991bdd6b9ca2358b93fb1.zip
frameworks_base-232fd7efedd0efdba35991bdd6b9ca2358b93fb1.tar.gz
frameworks_base-232fd7efedd0efdba35991bdd6b9ca2358b93fb1.tar.bz2
improve lock screen wallpaper behavior
- Fix lockscreen wallpaper not being reloaded on user switch. There was an issue where the wrong user id was being queried for the keyguard wallpaper. Always use the current user id. - Also clean up a left-over call for some regular wallpaper migration logic that the lock screen wallpaper - Add method for removing references to the current lock screen wallpaper, which we call from systemui when switching users. - Only apply the lock screen wallpaper if there is no media metadata to show. There were some cases when it would still appear even when music was playing. Change-Id: I610a38ac11a19638298ca9490b3c87b7ab6106f2 Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'services/core/java/com/android/server/wallpaper')
-rw-r--r--services/core/java/com/android/server/wallpaper/WallpaperManagerService.java14
1 files changed, 1 insertions, 13 deletions
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index 420e775..ee926a4 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -936,15 +936,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
public ParcelFileDescriptor getKeyguardWallpaper(IWallpaperManagerCallback cb,
Bundle outParams) {
synchronized (mLock) {
- // This returns the current user's wallpaper, if called by a system service. Else it
- // returns the wallpaper for the calling user.
- int callingUid = Binder.getCallingUid();
- int wallpaperUserId = 0;
- if (callingUid == android.os.Process.SYSTEM_UID) {
- wallpaperUserId = mCurrentUserId;
- } else {
- wallpaperUserId = UserHandle.getUserId(callingUid);
- }
+ int wallpaperUserId = mCurrentUserId;
KeyguardWallpaperData wallpaper = mKeyguardWallpaperMap.get(wallpaperUserId);
try {
if (outParams != null) {
@@ -1581,10 +1573,6 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
JournaledFile journal = makeJournaledFile(KEYGUARD_WALLPAPER_INFO, userId);
FileInputStream stream = null;
File file = journal.chooseForRead();
- if (!file.exists()) {
- // This should only happen one time, when upgrading from a legacy system
- migrateFromOld();
- }
KeyguardWallpaperData keyguardWallpaper = mKeyguardWallpaperMap.get(userId);
if (keyguardWallpaper == null) {
keyguardWallpaper = new KeyguardWallpaperData(userId);