Removing UserManagerCompat wrapper for getting baded label

This removes some crass dependency on Launcher compat implementation
making it easier to move iconCache to a separate library

Change-Id: If5fab0c82d98089cde6f54b6a374fb7bb2db5ae8
This commit is contained in:
Sunny Goyal committed 2018-11-05 17:33:15 -08:00
1 parent 06bca75d01
commit d7239fcc52
7 files changed
+13 -28

No files matched your search

+1 -3
View File
@@ -24,7 +24,6 @@ import android.os.Build;
import android.text.TextUtils;
import com.android.launcher3.LauncherSettings.Favorites;
import com.android.launcher3.compat.UserManagerCompat;
import com.android.launcher3.icons.IconCache;
import com.android.launcher3.shortcuts.ShortcutInfoCompat;
import com.android.launcher3.util.ContentWriter;
@@ -172,8 +171,7 @@ public class ShortcutInfo extends ItemInfoWithIcon {
if (TextUtils.isEmpty(label)) {
label = shortcutInfo.getShortLabel();
}
contentDescription = UserManagerCompat.getInstance(context)
.getBadgedLabelForUser(label, user);
contentDescription = context.getPackageManager().getUserBadgedLabel(label, user);
if (shortcutInfo.isEnabled()) {
runtimeStatusFlags &= ~FLAG_DISABLED_BY_PUBLISHER;
} else {