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
Don't show managed profile version of shortcut
picker as it lunaches same activities as personal
one.
Test: manual - check badged shortcut isn't present in launcher.
Bug: 38333213
Change-Id: Iade6595255524a8dbf223a70a6c8312087258c23
Now that we are changing the WebView package mechanism so that a package
can only be used as WebView implementation if that package is enabled
for all users of the device we need to tell the user why a package can't
be chosen as WebView implementation.
With this CL we do so in the 'Set WebView Implementation' Developer
Setting.
We code for the WebView implementation Developer Setting is now based on
the same code as that of the Debug App Developer Setting.
Bug: 32894154
Test: Ensure WebView Implementation setting shows correct packages.
Test: Ensure WebView Implementation setting shows correct descriptions
for why a package is not usable - including the case where packages are
disabled/uninstalled for a second user.
Test: Ensure the summary for the WebView Implmentation setting is
updated after changing WebView package.
Test: Ensure the WebView package Activity
(Settings.ACTION_WEBVIEW_SETTINGS) is similar to the Dev Setting.
Test: ensure non-admin user cannot start WV-picker activity through
'adb shell am start -n com.android.settings/.WebViewImplementation'
Change-Id: Ia6e6e9e12ce8f8f45ec539807cd0c6479acb8ecb
For an app to be able to know whether the WebViewSetting is enabled for
a user we disable the setting at boot for non-admin users. In this way
an app can call intent.resolveActivity[Info] for the WebViewSetting
intent to check whether the WebViewSetting is enabled before linking to
it.
Bug: 28034166
Change-Id: I33b3fa10a38f2a2600cddd0891ef746126abdd61