History log of /frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
475c36539da9687d75447adb9054c98ce03c754a 08-May-2017 Makoto Onuki <omakoto@google.com> Offload saving bitmaps from binder threads

Bug 34691191
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutManagerTestCases
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutHostTestCases
Test: Manual test with the phone app

Change-Id: Ibccf8ca162eae9179ee4cbdf0307ff34a6953aa1
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
6a7a967b712145a84771de2920082d3647de2d24 04-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove/fix broken test due to change to DUMP permission check." into oc-dev
c4361e34ad6fbc1bab34271ece668ebf79232a64 03-Apr-2017 Makoto Onuki <omakoto@google.com> Remove/fix broken test due to change to DUMP permission check.

Bug 36854321
Test: adb shell am instrument -e class 'com.android.server.pm.ShortcutManagerTest2' -w com.android.frameworks.servicestests

Change-Id: I80f2a326b70f8d0598246732510e3725a0c58871
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
ef7dff2563ccbe74564ab3b417d810a04df556e7 03-Apr-2017 Makoto Onuki <omakoto@google.com> Merge "Revert "Push chooser targets to the shortcut manager."" into oc-dev
82fb2eb057032bb7f38f547fb3667c7bf2547517 01-Apr-2017 Makoto Onuki <omakoto@google.com> Handle disabled packages as removed.

Bug 36600272
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests

Change-Id: I272334cef00337d5ba01ce4b878c799d9476432f
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
99302b55c6a960c9078ad2c84ae9be3296bd32f3 29-Mar-2017 Makoto Onuki <omakoto@google.com> Revert "Push chooser targets to the shortcut manager."

This reverts commit 58fc95dc578244b7beb687a48184045dcce788b8.

Bug 36186790
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutHostTestCases
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutManagerTestCases

Also all unit tests, except for the known failrues.
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests

Change-Id: I733ee7e12a419ee7ea17ca67c56afe7b039d189a
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
d0010c5ef12ccf0b5c20e7c12cf86def990b4feb 30-Mar-2017 Makoto Onuki <omakoto@google.com> Fix broken unit tests due to mockito upgrade.

Bug 36781317

Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests

Change-Id: Ie9abcd8bdf5353c96ebade0e8489f667ef9904ee
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
8025580449081ddd21f449f8719bc87d1cc9fc7b 04-Mar-2017 Sudheer Shanka <sudheersai@google.com> Update IUidObserver.onUidStateChanged to include procStateSeq.

This procStateSeq is associated with the process state change of
an uid and will help in identifying if network policy rules have been
updated for a process state change.

Bug: 27803922
Test: runtest -c com.android.server.am.ActivityManagerServiceTest
frameworks-services
Change-Id: Iaab8d004f476b96f28d08c886c7b0a6b585b9fef
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
58fc95dc578244b7beb687a48184045dcce788b8 14-Dec-2016 Hakan Seyalioglu <hseya@google.com> Push chooser targets to the shortcut manager.

More info at go/direct-share-push

Test: Some basic testing currently in, more to be added.

Change-Id: I069f9779988c3eca2c4d8b83ec62501983854355
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
be0b8896d1bc385d4c8fb54c21929745935dcbea 15-Feb-2017 Todd Kennedy <toddke@google.com> Revert "Revert "Per user setting for instant app""

This reverts commit be9ffa15af9e1906e9ffb505768328d62d4a3793.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: Ib21321cf157a79890de487060a093840f7182047
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
be9ffa15af9e1906e9ffb505768328d62d4a3793 15-Feb-2017 Guang Zhu <guangzhu@google.com> Revert "Per user setting for instant app"

Bug: 35390781

This reverts commit 2f5811dcfd840e149851a9333e27ef3cdddf7a46.

Change-Id: Ibb1c8dacbdc6908fc7fa2bc5dca664f2455162bf
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
2f5811dcfd840e149851a9333e27ef3cdddf7a46 30-Jan-2017 Todd Kennedy <toddke@google.com> Per user setting for instant app

The same application can run as either an instant app or an installed
app. Store this setting per-user instead of based upon the install
location.

Bug: 25119046
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: Iff565bb1ac10d631499f0bd0f69b401cb073c10e
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
de3c16c8057b61bb3cc2e0c3d5603730f5841c51 26-Jan-2017 Makoto Onuki <omakoto@google.com> Do not allow work profile to see main other profiles

It won't throw SecurityException, but it'll pretend there's
no apps on the other profile.

- Also log an error about it, in the client side process.

- Also still send WTF() about the reverse access.

Bug: 34650921
Bug: 34340531

Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests

Test: cts-tradefed run cts --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -m CtsShortcutHostTestCases -t 'android.content.pm.cts.shortcuthost.ShortcutManagerMultiuserTest'
Test: cts-tradefed run cts --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.LauncherAppsProfileTest'
Change-Id: I6164014685009db3f34a176a3f12c517766b2b49
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
33d9bc529e4969444aca821190f16b565a7726a9 26-Jan-2017 Sunny Goyal <sunnygoyal@google.com> Merge "Adding AppWidgetManager.isRequestPinAppWidgetSupported"
7f7372ae2abeecb564d426ec3efbfa039c797885 24-Jan-2017 Sunny Goyal <sunnygoyal@google.com> Adding AppWidgetManager.isRequestPinAppWidgetSupported

Launchers can choose to implement support pin shortcut or pin appwidget
or both by specifying different actions in the intent filter

Test: Automated tests and CTS
Bug: 34174006
Change-Id: I4456dbb943cfba11d465556f0732f0ed629ab3ba
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
66e4a2b801fe0ff2ee1db5e0578a3e7cb6e1f6d6 23-Jan-2017 Makoto Onuki <omakoto@google.com> Do not allow ephemeral apps to access ShortcutManager

Bug: 34178279
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests

Change-Id: I5672f15705a1bf6568a8df58b66e48c802c11852
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
aecbd037514af1bff0f5ca50932241776d6c5fc3 19-Jan-2017 Makoto Onuki <omakoto@google.com> Do not allow work profile apps to access main profile app.

Bug: 34340531

Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests

Test: cts-tradefed run cts --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -m CtsShortcutHostTestCases -t 'android.content.pm.cts.shortcuthost.ShortcutManagerMultiuserTest#testManagedUser'
Test: cts-tradefed run cts --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.LauncherAppsProfileTest'

Change-Id: I34e9f351d2a8addf65a5a928c3dd4363f08611dc
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
255461f676f09db9be3876c156d571f4e08981ee 10-Jan-2017 Makoto Onuki <omakoto@google.com> Allow adding target activity via requestPinShortcut().

Also now ShortcutManager tries to fill in the main activity as the target
activity if the caller has one.

Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: Running: cts-tradefed run cts --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -m CtsShortcutManagerTestCases
Test: cts-tradefed run cts --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -m CtsShortcutHostTestCases

Bug 34047091

Change-Id: I2bf2b20e94a2384cfa6e6b7d40d56cfe96a94fd9
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
9fd9019cf1f2c69c9bd1b9ea635a2605b3d9208f 06-Jan-2017 Makoto Onuki <omakoto@google.com> Revert "ShortcutManager: Floating shortcuts shouldn't have target activities."

This reverts commit 106ff7a0a1bef974ff04e9e79a25eb5e84555893.

Test: All the unit tests (ShortcutManagerTest1*) CtsShortcutHostTestCases and CtsShortcutManagerTestCases

Change-Id: Iadce2b3785cbf728daa60c4e2ff103e516d85896
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
87a563e0707bb7e2be034c195e9827dfe3451cfd 02-Jan-2017 Sunny Goyal <sunnygoyal@google.com> AppWidgetManager: direct add widget support.

Test: Manual test and all the unit tests:
adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
... to test9
adb shell am instrument -e class com.android.server.appwidget.AppWidgetServiceImplTest -w com.android.frameworks.servicestests

Bug 32404406
Change-Id: Icd6d4cbd25d9cdf4508da725d95d6401cc3a46a7
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
a01f4f03e920277a48369b06983c728a73b8dcd4 16-Dec-2016 Makoto Onuki <omakoto@google.com> ShortcutManagre: foreground check, more tests.

Test: Manual test and all the unit tests:
adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
... to test8

Bug 32908854

Change-Id: I30ba421e9730741776c1936e40ccf7b7431289da
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
2d895c3efd625e09e9f2cc4d0c7131b34f52f154 03-Dec-2016 Makoto Onuki <omakoto@google.com> ShortcutManager: direct pin shortcut support.

Test: Manual test and all the unit tests:
adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
... to test8

Bug 32908854

Change-Id: I11b81656959cccfb4efa83f08380b915e6eb84a6
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
106ff7a0a1bef974ff04e9e79a25eb5e84555893 01-Dec-2016 Makoto Onuki <omakoto@google.com> ShortcutManager: Floating shortcuts shouldn't have target activities.

Previously, even floating shortcuts (pinned but not dynamic nor
manifest) had target activities. Now we're going to allow headless
apps to have pinned shortcuts, in which cases shortcuts won't have
target activities, let's just always remove target activities
from floating shortcuts.

Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
... to Test8.

Test: cts-tradefed run cts --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -m CtsShortcutManagerTestCases
Test: cts-tradefed run cts --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -m CtsShortcutHostTestCases

Change-Id: I10e5b87338cafb90e6566b3526f892c5330c73e9
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
248a0ef3aa119f92858a2bb95d20595824b8d07b 03-Nov-2016 Makoto Onuki <omakoto@google.com> Always scan all apps after each OTA for manifest shortcuts

(W/ reverting Ia05363b30a5eeb989dc4c44cf5dbd71cde96de96)

Test: FrameworksServicesTests

Bug 32590013

Change-Id: I8f45c330d0b102a6a112e774205e6611c1c61af3
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
3366328245621fa6e8fd764a4d3c2f073774d096 23-Aug-2016 Makoto Onuki <omakoto@google.com> Do not scan system apps unless after OTA

Bug 30956231

Change-Id: I4af34cdd39cfaf0b8712b9ded1ef119efa3e04b0
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
085a05cd864252314bcf5c339017a16b68105204 19-Aug-2016 Makoto Onuki <omakoto@google.com> Off-load unlocking users onto a worker thread

Bug 29645168

(cherry picked from commit 3107ff78454d54c0494911bf69ca952152af7cf0)

Change-Id: I3f8e768f6afeb6386a08ba9ac48e0e206395da2b
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
1e1732399a48c9521eea7a117f1f0e87ca64d2ab 10-Aug-2016 Makoto Onuki <omakoto@google.com> Fix two shortcut manager issues

- isUserUnlocked check is still racy
We used a local copy of each user state in mUnlockedUsers, and updated
it in the service lifecycle events. However because
SystemService.onUnlockUser() is called on Handler, there was a brief
window between when the user was actually unlocked and the shortcut
manager thought the user was unlocked.
So now check with activity manager for the latest state too. We still
check with the local copy first, because we want to consider STOPPING
as "unlocked".

- Messenger loses all bitmap icons.
Because we delay-save the shortcuts.xml file, if the device shut down
before we save the XML file but after removing the bitmap files,
we'd lose the bitmaps.

(Apparently SystemService.onCleanupUser() may not be called even when
a device is cleanly shutting down.)

So don't remove bitmap files synchronously, ever, and instead after
saving the XML just run the dangling file cleanup.

Bug 30784267
Bug 30730471

Change-Id: Ie58656efba2dca2b00582e145613bc56266a091e
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
33525d2f1a8116820f58fc90941cb53bcba54805 04-Aug-2016 Makoto Onuki <omakoto@google.com> ShortcutManager: Update foreground check.

- When the cached UID state says a UID is in the background,
check with AM and get the latest state, since the state
might just have been changed.

Bug 30640208

Change-Id: If448f6f21f290fa0fc13550d9c740f56aa8bfce0
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
02f338e23d06499790c6948709afb1587416eb40 29-Jul-2016 Makoto Onuki <omakoto@google.com> LauncherApps should also throw when user is locked

otherwise it'd be racy.

Bug 30406401

Change-Id: I953eb6ae58e029d254d9fdbd5d05a0090b8d2391
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
9c850012cacf0af4a392294566a8c7c897dc8771 27-Jul-2016 Makoto Onuki <omakoto@google.com> Prevent shortcut access when user is locked

Also add some test utility methods that'll be used by CTS.

Bug 30406401

Change-Id: I9396acebbdb3cbe64f6e85877ee62a2131cd6e61
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
3fa345b5c2cf5d7fd8c87e44d1887f011787c548 22-Jul-2016 Makoto Onuki <omakoto@google.com> Merge "Unit tests for "cmd shortcut"" into nyc-mr1-dev
440a1ea8e2204ecb171e0187318beb2f08f6012c 20-Jul-2016 Makoto Onuki <omakoto@google.com> Support multiple intents in ShortcutInfo

Also fix b/30230996.

TODO: Support the sourceBounds argument to LauncherApps.
startShortcut().

Bug 30218829
Bug 30230996

Change-Id: Ibb6c59d5b7c0a320c21d09436d016d0eac94644f
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
0b9d1db5c1aab9017daf05abd0ba0f4de2c7192d 18-Jul-2016 Makoto Onuki <omakoto@google.com> Unit tests for "cmd shortcut"

Also removed unnecessary commands.

Bug 29612099

Change-Id: Id554163c861fb144cb5140d7eb709178347f7868
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
76269928e677725e2d9b28e2e3aa79961a60a1d0 15-Jul-2016 Makoto Onuki <omakoto@google.com> Implement dumpsys --checkin for shortcut manager

Dump the very basic stuff for now.

We need to update GMS-core to actually collect the information.

Bug 28535604

Change-Id: I6ce17ee2014786a0ef97f3dc973b8a01c2d2a814
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
1030520822c42cc7357b463d301c7e97e928ba22 15-Jul-2016 Makoto Onuki <omakoto@google.com> Cache the default launcher.

Originally we always checked with PM for the default launcher,
which would take ~2ms.

Now we cache the result, and clears the cache when (any) preferred
activities change.

Bug 30126557

Change-Id: Iceef288cd372c8bb9b119aa493e5173d894f2302
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
4e6cef49ef11bbb5bfc0e9f0fb865188492d88b0 14-Jul-2016 Makoto Onuki <omakoto@google.com> Handle locale change and pacakge change in different way

- Stop using a custom callback from AM to detect locale changes
and use the LOCALE_CHANGED broadcast instead.

- This would open up a chance where a publisher app fetches
its won manifest shortcuts after a locale change but
ShortcutManager hasn't updated string resources.

- So instead, at every entry point from ShortcutManager, check
if the locale has changed, and if so, update all resources
(and reset throttling).

- Do the same for package change events too. At every entry point
from ShortcutManager, check if the caller package has been updated,
or any target activities have been disabled. If so, rescan the
caller package.

- We do *not* do the same check at the LauncherApps entry points,
because the launcher should use the callback to listen to
shortcut changes.

- Also stopped using PackageMonitor for now because we want to
set a higher priority and changing PackageMonitor at this point
seems too much for DR.

Bug 29895275
Bug 30123329

Change-Id: Ib4a2f626a936c7328e2cc032324f5c3d1c3b9122
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
f34c308dfd9cdda428b8ead8bf655de1608501a9 13-Jul-2016 Makoto Onuki <omakoto@google.com> Revert "Revert "Revert "Handle package broadcasts before apps do"""

This reverts commit 886ba78dfb105eb45416587b73b6c6b336448de5.

With the tests updated.

Change-Id: I162e6ca23c667f90feddc1e9f42b554a416295cf
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
98802f6007eef7a36237087111c38a998a388903 13-Jul-2016 Makoto Onuki <omakoto@google.com> Merge "Revert "Revert "Handle package broadcasts before apps do""" into nyc-mr1-dev
886ba78dfb105eb45416587b73b6c6b336448de5 13-Jul-2016 Makoto Onuki <omakoto@google.com> Revert "Revert "Handle package broadcasts before apps do""

This reverts commit efbbe7ea9db8adab6bff407db1d7fc54bbaf31ee.

Change-Id: I3dbb080db5121307f533a7d411f4f5d47225500e
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
7f3187bb0d12d288bc7211549c08adeb5ff651aa 13-Jul-2016 Makoto Onuki <omakoto@google.com> Merge "Revert "Handle package broadcasts before apps do"" into nyc-mr1-dev
4885b274c1502b8e478e16d4418b7fd86ab6c865 13-Jul-2016 Makoto Onuki <omakoto@google.com> Merge "Don't backup & restore disabled shortcuts." into nyc-mr1-dev
efbbe7ea9db8adab6bff407db1d7fc54bbaf31ee 12-Jul-2016 Makoto Onuki <omakoto@google.com> Revert "Handle package broadcasts before apps do"

And fix b/29939691 (don't try to load locked users) in a different way

Bug 29939691
Bug 29895275

Change-Id: Ib55f9c5d5547c54daa4e05c1e50bf4bbceaf1991
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
f3ba2e04be20d33fee989e782ba1966322e7e263 12-Jul-2016 Makoto Onuki <omakoto@google.com> Don't backup & restore disabled shortcuts.

Also a backup & restore test where an app has manifest shortcuts.

Bug 30016960
Bug 29921267

Change-Id: I8c4c3ece50f26d778b2f8f42251c317eb25d1e14
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
83f6d2da372de339dc563d6a7786be3facc52e76 11-Jul-2016 Makoto Onuki <omakoto@google.com> Throw ActivityNotFoundException when failed to launch shortcut

Originally the code used IIntentSender, but I had to switch to calling
startActivitiesInPackage() directly, because sendIntentSender() does
not support returning errors.

Bug 30035853

Change-Id: I5d7669c96a2f1805373c71aebf45b97ac1d01ff6
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
a2241834a54dc91e2eef858741f1a56a743c27b2 06-Jul-2016 Makoto Onuki <omakoto@google.com> Handle package broadcasts before apps do

- Have PM to call the shortcut manager directly before sending a
pacakge broadcast.

- The shortcut manager will enqueue a task to handle a package
broadcast, which will be executed on Handler.

- At the entry points of all external facing methods, block until
all pending tasks are finished.

Bug 29895275

Change-Id: Ib29fa3c9c8d9b9e0ca5c8f1e9da2a390324960a4
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
7df9ce075fddc8f3b4e5f177b41bab864c759e8b 01-Jul-2016 Makoto Onuki <omakoto@google.com> Merge "Make sure re-published dynamic shortcuts are always enabled" into nyc-mr1-dev
ee6b6e4a1861336f8db52d8c93dbf32ee9615cfa 30-Jun-2016 Makoto Onuki <omakoto@google.com> ShortcutManager: Make sure persisted default launcher still exists.

- Also make sure to ignore unexported activities.
(e.g. unexported activities shouldn't have shortcuts.)

- Also add unit tests for package manager related operations.

- Also remove stale TODOs (per-activity shortcut count check is
implemented already.)

Bug 29699769
Bug 29516954

Change-Id: Ia18301baf6bec1ad71ae195d9ae3d10bd8386fc4
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
ff14f73152775f91fe211729e2cb16a5da6933ab 01-Jul-2016 Makoto Onuki <omakoto@google.com> Make sure re-published dynamic shortcuts are always enabled

- Originally there was explicit code to take over the disabled flag,
which was simply not necessary.

- Also fix the startShortcut() tests that have temporarily
been disabled.

(Also remove the stale TODOs to avoid conflict with Ia18301ba)

Bug 29633681

Change-Id: I58b12ad6918d7fef4b79059b0c2c7f2df6e32269
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
ea11db15bd0cfe6ecbc44dd80a988ddf0e8c1ce7 25-Jun-2016 Makoto Onuki <omakoto@google.com> Start shortcuts as if publisher apps did using PendingIntent

Bug 29639471

Change-Id: I2aad115669b431cbea785ba92040b1958117ab47
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
d6880797f72e1e397e18c6e709c0125f795c7d2e 29-Jun-2016 Makoto Onuki <omakoto@google.com> Address API council feedback (continued)

Got a second set of comments.

Bug 29757958

Change-Id: Ib3a3ffd28bc3e35eb0218b0819870eb5c6ebadb5
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
b08790c3b2f3bdb0c2e2f7ff46e4584fb1127769 23-Jun-2016 Makoto Onuki <omakoto@google.com> Shortcut: Only "main" activities can have shortcuts.

- Don't publish shortcuts when their target activities are not main.
- Only scan manifest shortcuts for main activities.
- When an app is updated, remove shortcuts that no longer belong to
valid main activities.

- Also re-publish manifest shortcuts after 'clear data'
- Also listen to PACKAGE_CHANGED and disable/re-publish shortcuts
properly.

Bug 29355786
Bug 29582255
Bug 29601844

Change-Id: I6c701ce669cf30a227bc2af4aa01de467ef73e3a
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
b5a012fd6f088629746057a3902b5926f9fe8e08 21-Jun-2016 Makoto Onuki <omakoto@google.com> Shortcut Manager: Address API council feedback and fix TODOs

Bug 29515722
Bug 29516909
Bug 29515090
Bug 29516954
Bug 29515088

Change-Id: Ibe1d27033cbd0fd50d37e3d9945b47551211c568
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
4d6b87ffdf06df3303239130ced685bc1a3fae50 17-Jun-2016 Makoto Onuki <omakoto@google.com> Launcher shortcut callback should deliver manifest shortcuts too

- Also include "activity" in the key fields, as this is now an
important field.

- Also optimize ShortcutInfo parceling for the "key field only" case.

Bug 29394043
Bug 29451629

Change-Id: I61b2bc2f61ad6ebdcbaf6d02f1bd88777c45a7f0
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
70a91541e9eb2acc6ee5a34785abdc420127a5ec 15-Jun-2016 Makoto Onuki <omakoto@google.com> Merge "ShortcutManger: Auto-adjust ranks." into nyc-mr1-dev
9e1f5595bd7ffe3af6ca35b3235dfca0ecd07978 08-Jun-2016 Makoto Onuki <omakoto@google.com> ShortcutManger: Auto-adjust ranks.

Spec: go/shortcutmanager-spec-ranks

Bug 28984376
Bug 28536066

Change-Id: Ibffb92233c62792af06eeadc5a9a6379d0506a3c
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
a1d38b3c95cd6a38ee7336fd90729d3b3be6ae25 11-Jun-2016 Makoto Onuki <omakoto@google.com> Fix some exception messages and enhance unit tets

Bug 29275393

Change-Id: Idaa8564d41f86de2a2cbefa4ff3c08b89a3a6dd2
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
3bb436600654e4da253a4b77a86c1dbfa208da8e 08-Jun-2016 Makoto Onuki <omakoto@google.com> Merge "ShortcutManager: deal with changing resource IDs on app update" into nyc-mr1-dev
157b1628fd84dc3ef0355fddd8d281618f94d33e 03-Jun-2016 Makoto Onuki <omakoto@google.com> ShortcutManager: deal with changing resource IDs on app update

- When an app is upgraded, all the resource IDs may change. So
if a shortcut is previously published with an icon for res ID 100
and the publisher is upgraded, resource #100 may refer to something
different.

- So now the service also remembers resource names for icon resources,
as wells as string resources. When an app is updated, the service
fetch the updated resource IDs by name.

- Also extract all string resources when a shortcut is published
and persist them, so that even when the original string resources are
removed from the app, the launcher can still show the extracted strings.

- When the system locale changes, re-extract all string resources.

- Also really hide the constants in ShortcutInfo that were
accidentally made public.

Change-Id: I23c29b45c1de5d76175229190a1533c9c62c5960
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
6dd9fb7004e888ec1efc4676cd3e4d42b7ac68c9 01-Jun-2016 Makoto Onuki <omakoto@google.com> ShortcutManager: Optimize package scanning

SM needs to check all packages when a user is unlocked in case
any apps have been upgraded while the user was not running,
in which case it'll publish the manifest shortcuts.

Currently it actually scans all apps' manifests.

This CL optimizes it by remembering the last scan time (for each user)
and checks only the packages that have been updated since then.

Bug 29069154

Change-Id: Id10b6be8915fe7c1e26daccde7951ddbd01ea452
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
ac042501c816fa9a65aed005060ebdcfc0a0f3b2 21-May-2016 Makoto Onuki <omakoto@google.com> ShortcutManager: Implement usage report API

Bug 28536054

Change-Id: I293e8eaad523e3b0d76d562fc381601633451ed3
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
51ab2b3fd04e24e0ca98afd1c1832d84f3a9e62c 02-Jun-2016 Makoto Onuki <omakoto@google.com> ShortcutManager: Break down unit tests

The test file is getting too big and making the IDE very slow.
Now it's split into multiple files

Change-Id: I50ed89f19defd3809f327bc21e7d9ea790dcde4e
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java