commit | 0fe6f618b1ce770b2d0c7b625d43b274ce7fabd7 | [log] [tgz] |
---|---|---|
author | Chuck Liao <chuckliao@google.com> | Fri Sep 10 00:59:57 2021 +0800 |
committer | Chuck Liao <chuckliao@google.com> | Wed Sep 22 16:18:09 2021 +0800 |
tree | a8128a395c9fc005bae4fdf2e5688e78335e027c | |
parent | 8183ed948a82f84c12d1b4ae9b84d2eefb6362ca [diff] [blame] |
Reduce potential latency of popping up destination dialog Use WallpaperManager's information to know the status of system wallpaper instead of creating the WallpaperInfo by ourselves (it will create bitmap to generate the hashcode which may take time). Bug: 197921329 Test: manual Change-Id: If74080ec466807baca4165c55251a46d42147092 Merged-In: If74080ec466807baca4165c55251a46d42147092
diff --git a/src/com/android/wallpaper/module/DefaultWallpaperPersister.java b/src/com/android/wallpaper/module/DefaultWallpaperPersister.java index abe1728..9148b9f 100755 --- a/src/com/android/wallpaper/module/DefaultWallpaperPersister.java +++ b/src/com/android/wallpaper/module/DefaultWallpaperPersister.java
@@ -656,8 +656,9 @@ } - boolean wasLockWallpaperSet = LockWallpaperStatusChecker.isLockWallpaperSet( - mAppContext); + boolean wasLockWallpaperSet = + InjectorProvider.getInjector().getWallpaperStatusChecker().isLockWallpaperSet( + mAppContext); boolean allowBackup = mWallpaper.getBackupPermission() == WallpaperInfo.BACKUP_ALLOWED; final int wallpaperId;