Fix bug where app pair title was not updating with language
This CL adds the ability for an app pair icon to update its title string when package changes are detected. It also reorganizes some code in the app pairs classes for readability.
Fixes: 316051810
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual
Change-Id: I833e4f9766b7da8c0a3a5fb4b9fc050d8897437e
(cherry picked from commit 24284467b5)
Merged-In: I833e4f9766b7da8c0a3a5fb4b9fc050d8897437e
This commit is contained in:
1 parent
d2f256f179
commit
ee1fdb4abc
4 files changed
+49
-25
No files matched your search
@@ -45,7 +45,6 @@ import com.android.internal.jank.Cuj;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.accessibility.LauncherAccessibilityDelegate;
|
||||
import com.android.launcher3.allapps.AllAppsStore;
|
||||
import com.android.launcher3.apppairs.AppPairIcon;
|
||||
@@ -158,8 +157,6 @@ public class AppPairsController {
|
||||
member.bitmap = iconCache.getDefaultIcon(newAppPair.user);
|
||||
iconCache.getTitleAndIcon(member, member.usingLowResIcon());
|
||||
});
|
||||
newAppPair.title = getDefaultTitle(newAppPair.getFirstApp().title,
|
||||
newAppPair.getSecondApp().title);
|
||||
MAIN_EXECUTOR.execute(() -> {
|
||||
LauncherAccessibilityDelegate delegate =
|
||||
Launcher.getLauncher(mContext).getAccessibilityDelegate();
|
||||
@@ -488,13 +485,6 @@ public class AppPairsController {
|
||||
return rank & BITMASK_FOR_SNAP_POSITION;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a formatted default title for the app pair.
|
||||
*/
|
||||
public String getDefaultTitle(CharSequence app1, CharSequence app2) {
|
||||
return mContext.getString(R.string.app_pair_default_title, app1, app2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the TopTaskTracker, which is a cached record of the top running Task.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user