I have successfully changed the app icon dynamically using below
manager.setComponentEnabledSetting(
ComponentName(this@MainActivity2, "com.appicon.ui.MainActivity"),
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP
) // enable new icon
manager.setComponentEnabledSetting(
ComponentName(this@MainActivity2, "com.appicon.MainActivityAlias"),
PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
PackageManager.DONT_KILL_APP
)
But the app icon is not updating in App Info setting screen. In app info setting is showing the old app icon. Also newly changed app icon is not reflecting in recent history view.
Is this an expected behavior?
I am expecting the newly changed icon to be reflected in App Info setting screen and in recent history view screen.