From f9d9df7d3aada0a368f8ef7090fafc08d329ce77 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Wed, 5 Sep 2018 12:48:13 -0700 Subject: 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 --- src/com/android/launcher3/AppInfo.java | 1 - 1 file changed, 1 deletion(-) (limited to 'src/com/android/launcher3/AppInfo.java') 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; -- cgit v1.2.3