Fix shortcut icon in launcher

When building icon for shortcut, check if the icon is LayerDrawable.
- If yes, only take the second layer (foreground).

Also move the class to shortcut package

Change-Id: I3513dbeb6509f11aa70ab3230d441e268ca9356d
Fixes: 72553870
Test: atest
This commit is contained in:
Fan Zhang
2018-01-29 11:23:52 -08:00
parent 499efd06ab
commit 409eab14de
5 changed files with 31 additions and 21 deletions

View File

@@ -34,6 +34,8 @@ import static android.content.pm.PackageManager.GET_META_DATA;
import static android.content.pm.PackageManager.GET_RESOLVED_FILTER;
import static android.content.pm.PackageManager.MATCH_DISABLED_COMPONENTS;
import com.android.settings.shortcut.CreateShortcut;
/**
* Listens to {@link Intent.ACTION_PRE_BOOT_COMPLETED} and {@link Intent.ACTION_USER_INITIALIZED}
* performs setup steps for a managed profile (disables the launcher icon of the Settings app,