diff options
author | Tony Wickham <twickham@google.com> | 2018-09-05 12:48:13 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2018-09-05 18:23:54 -0700 |
commit | f9d9df7d3aada0a368f8ef7090fafc08d329ce77 (patch) | |
tree | 33a229ef2d76fae67bf098dcfa6c119ea9d1eb6f /src/com/android/launcher3/AppInfo.java | |
parent | b75f5366f934cbb8aad52c465f2c7f32bc645202 (diff) | |
download | packages_apps_Trebuchet-f9d9df7d3aada0a368f8ef7090fafc08d329ce77.tar.gz packages_apps_Trebuchet-f9d9df7d3aada0a368f8ef7090fafc08d329ce77.tar.bz2 packages_apps_Trebuchet-f9d9df7d3aada0a368f8ef7090fafc08d329ce77.zip |
Gracefully fallback to new ComponentName if one is renamed/removed
Previously, if a developer renamed their launcher activity, we removed
all instances of their icon from the home screen, since technically the
activity they pointed to no longer exists. However, in the vast majority
of cases, the developer simply renamed their activity and nothing should
change from a user's perspective. So instead of removing icons that no
longer point to a valid activity, we now redirect them to point to the
first activity in the manifest (or remove them if there is none).
Test:
- Install app with Activity A and place on home screen
- Rename A to B and reinstall - verify home screen icon remains
- Add new launcher activity C - verify icons still go to B
- Force stop launcher and rename B to A - verify icons go to A (same activity)
- Remove activity A - verify icons go to C
- Remove activity C - verify icons are removed
Bug: 28907647
Change-Id: If9da251bd588908c4c425e7dd32e38fcbe54bab2
Diffstat (limited to 'src/com/android/launcher3/AppInfo.java')
-rw-r--r-- | src/com/android/launcher3/AppInfo.java | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/com/android/launcher3/AppInfo.java b/src/com/android/launcher3/AppInfo.java index 4d1bedcf3..ed7991408 100644 --- a/src/com/android/launcher3/AppInfo.java +++ b/src/com/android/launcher3/AppInfo.java @@ -26,7 +26,6 @@ import android.os.Process; import android.os.UserHandle; import com.android.launcher3.compat.UserManagerCompat; -import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.util.ComponentKey; import com.android.launcher3.util.PackageManagerHelper; |