OSDN Git Service

Update launch intent flags for settings shortcut widgets.
authorDoris Ling <dling@google.com>
Mon, 2 Apr 2018 21:51:36 +0000 (14:51 -0700)
committerDoris Ling <dling@google.com>
Thu, 5 Apr 2018 17:20:26 +0000 (10:20 -0700)
commitf2d7680d2c3985aa9c1e921523762aa6cb2ffd32
tree0b24a7756d64a800f5b0b14dcfd9bcac6171b709
parenta112226db22f47587a814d1891b2ce137c62b2d5
Update launch intent flags for settings shortcut widgets.

- earlier changes were made to the intent flags when creating new
settings shortcut to ensure that it is launching a new task. However,
ShortcutManager is actually caching existing shortcut info, and it will
continue to use the existing shortcut info unless we explicitly update
the info.
- when rebooting from build upgrade, we will go through all existing
shortcut to update the launch intent flags to ensure that the shortcut
info is update to date.

Change-Id: Iee2365d9aec64a47b193e3c9be443c252504815b
Fixes: 76395879
Test: make RunSettingsRoboTests
src/com/android/settings/SettingsInitialize.java
tests/robotests/src/com/android/settings/SettingsInitializeTest.java [new file with mode: 0644]
tests/robotests/src/com/android/settings/testutils/shadow/ShadowShortcutManager.java [new file with mode: 0644]