Add flags to the notification_assistant DeviceConfig namespace to
control smart suggestions generation for notifications.
The existing flag in Settings.Global
SMART_SUGGESTIONS_IN_NOTIFICATIONS_FLAGS will be removed in a follow-up.
Bug: 120792826
Test: atest AssistantSettingsTest
Test: play around with 'adb shell device_config put
notification_assistant notification_assistant_generate_replies X', and
'adb shell device_config put
notification_assistant notification_assistant_generate_actions X', where
X is false or true.
Change-Id: I0252bff48f053aab4b81d74147579416b28c515a
There are several hidden API usages from Media 1.0 APIs.
To move Media 1.0 APIs into mainline module, this CL removes
the unnecesarry usages or makes them as system APIs.
Bug: 119539695
Test: pass MediaSessionTest and MediaControllerTest, and
manually check whether SystemUI can control sessions.
Change-Id: I824113229964ad9b5785ecd488b5851b0dace626
The tile only controls the default data subscription (this is enforced
by using DataUsageController#setMobileDataEnabled). The secondary text
shows the carrier name when data is enabled.
Bug: 113343186
Test: manual with only one SIM and using DSDS
Change-Id: I1b8f0720618cd5b1679e1185e77d36b0227b663c
Adds system api of createSocketKeepalive to take file descriptor,
so privileged apps could use it without the need of IpSecService.
Bug: 114151147
Test: atest FrameworksNetTests
Change-Id: If926c21704b6ed73a0adfcadad732b97b42bacae
To represent the UI location of a Notification we add the class enum
NotificationVisibility.NotificationLocation.
Bug: 120767764
Test: atest SystemUITests
Change-Id: I572c1cb7e585158f29675afd5255898e7f78e820
Bug: 121198030
Test: 1) atest RunBackupFrameworksServicesRoboTests
2) atest $(find \
frameworks/base/services/tests/servicestests/src/com/android/server/backup \
-name '*Test.java')
3) atest CtsBackupTestCases
4) atest CtsBackupHostTestCases
5) atest GtsBackupTestCases
6) atest GtsBackupHostTestCases
Manual testing:
1. Start secondary user -> verify fb-schedule file is created, full backup queue initialised
2. Verify fullbackup of 1 package for system/secondary users, [package] only exists for current user:
* bmgr --user [user-id] fullbackup [package]
* Verify in logs that backup is successful
* Uninstall/install [package]
* Verify data is restored
3. Verify fullbackup of 1 package for secondary user, [package] eixtst for user 0:
* bmgr fullbackup [package]
* bmgr --user [user-id] fullbackup [package]
* Verify in logs that backup is successful
* Uninstall/install [package] for secondary user
* bmgr --user [user-id] restore [token] [package]
* Verify the data restored is different from system user data and belongs to [user-id]
3. Verify backup of all packages for system/secondary users:
* bmgr --user [user-id] backupnow --all
* Verify system packages (android, settings, wallpaper) are skipped for secondary user
* Verify in logs that backup is successful
* Uninstall/install [package]
* Verify data is restored
Base -> Patchset 2: Update method calls to use asUser versions
Patchset 2 -> Patchset 3: Update opComplete callback to accept userId
Patchset 3 -> Patchset 4: Gate system packages from backup/restore for non-system users
Change-Id: Ic3986709ba4d46c0af9da45bb4dd682ee2aef3ce
This is a small follow up to my previous CL [1], which made
RemoteInputView call TextView#setTextOperationUser() so that the text
operation uesr ID can be determined by the notification user ID.
Since the relationship between NotificationEntry and RemoteInputView
is immutable, there is no need to call setTextOperationUser(null) to
reset the target user ID in RemoteInputView#reset(), which may have
some race conditions.
With this CL, RemoteInputView calls setTextOperationUser() only once
immediatelly after inflation.
[1]: Ibabe13e5b85e5bb91f9f8af6ec07c395c25c4393
7276946b92fbac928b1d34971b9c4ffd975d95e4
Bug: 120744418
Bug: 123043618
Test: atest SystemUITests
Test: Manually tested Bug 120744418 scenario as follows.
1. Build and flash an AOSP build
2. adb root
3. adb shell setprop persist.debug.per_profile_ime 1
4. adb reboot
5. Install Test DPC
6. Enable managed profile with Test DPC
7. make -j SoftKeyboard
8. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
9. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
10. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard
11. make -j EditTextVariations
12. adb install -r $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
13. adb shell am start --user 0 \
-n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
14. Tap the menu icon on the EditTextVariations then click "Direct Reply"
15. adb shell am start --user 10 \
-n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
16. Tap the menu icon on the EditTextVariations then click "Direct Reply"
17. Open notification shade.
18. Tap reply icon on "Message from UserHandle{0}".
19. Make sure that SoftKeyboard Sample IME is shown.
20. Tap reply icon on "Message from UserHandle{10}".
21. Make sure that AOSP Keyboard is shown.
22. Tap reply icon on "Message from UserHandle{0}" again.
23. Make sure that SoftKeyboard Sample IME is shown again.
Test: Manually tested Bug 123043618 scenario as follows.
1. Build and flash an AOSP build
2. Create a secondary user then switch to it.
3. make -j SoftKeyboard
4. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
5. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
6. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard
7. make -j EditTextVariations
8. adb install -r $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
9. adb shell am start \
-n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
10. Tap the menu icon on the EditTextVariations then click "Direct Reply"
11. Tap reply icon on "Message from UserHandle{10}".
12. Make sure that SoftKeyboard Sample IME is shown.
13. Type "ggggg" then hit the space key.
14. Make sure that red underline is drawn under "ggggg"
15. Make sure that AndroidSpellCheckerService runs as user 10.
Test: Manually tested multi-user scenario with per-profile mode as follows.
1. Build and flash an AOSP build
2. adb root
3. adb shell setprop persist.debug.per_profile_ime 1
4. adb reboot
5. Create a secondary user then switch to it.
6. make -j SoftKeyboard
7. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
8. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
9. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard
10. make -j EditTextVariations
11. adb install -r $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
12. adb shell am start \
-n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
13. Tap the menu icon on the EditTextVariations then click "Direct Reply"
14. Tap reply icon on "Message from UserHandle{10}".
15. Make sure that SoftKeyboard Sample IME is shown.
16. Type "ggggg" then hit the space key.
17. Make sure that red underline is drawn under "ggggg"
18. Make sure that AndroidSpellCheckerService runs as user 10.
Change-Id: I975baa748c821538e5a733bb98a33ac609bf40a7
The new set of API replace the PacketKeepalive system API
which is only specific for IPsec NAT-T keepalive packet. Allows
applications to request different types of keepalives through
the same set of API.
By using keepalives, applications could request system to
periodically send specific packets on their behalf, using
hardware offload to save battery power.
This change would only address interface change and test part of
original functionality. After all reference of PacketKeepalive
are removed, another change would be submitted to remove old
API.
Bug: 114151147
Test: atest FrameworksNetTests
Change-Id: I3367666810acc44d5ad20e19acd4bf936e8b5d9c
The JUnit filter com.android.test.filters.SelectTest is a generic test
filter that can supersede |-e package| and |-e class| options of
AndroidJUnitRunner.
The com.android.server.wm.test.filters.CoreTestsFilter extends SelectTest
filter to filter out Window Manager Service releated tests in
FrameworksCoreTests.
Bug: 122451194
Test: Can select some tests from WmTests.
$ adb shell am instrument -w \
-e filter com.android.test.filters.SelectTest \
-e selectTest com.android.test.filters.,com.android.server.wm.DummyTests \
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Test: CoreTestsFilter works for FrameworksCoreTests.
$ adb shell am instrument -w \
-e filter com.android.server.wm.test.filters.CoreTestsFilter \
-e selectTest_verbose true \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: Ic72637997bf17debef914e2596049f6cf3e753de
Merged-In: Ic72637997bf17debef914e2596049f6cf3e753de
The receiver of the broadcast would likely want to query the rolled back
packages via RollbackManager regardless, and it's not clear which
package to put when an atomic set of packages is rolled back.
Bug: 112431924
Test: atest RollbackTest
Change-Id: Ic8db00b62d8993e00a0dd2cb79ae68c430b45bb8
This is a follow up of Ic72637997bf17debef914e2596049f6cf3e753de
Bug: 122451194
Test: atest FrameworksServicesTests:com.android.test.filters.SelectTestTests
Change-Id: I61c5837a097451a204e9602476c68fdda4fc30be
As ATMS is now in wm package and holding the same lock, we don't need to
post the call with the WM lock any more. Messages posted to ATM Internal
from WM package is no longer needed in most cases, make a direct call
insteald.
Test: go/wm-smoke
Bug: 122825247
Change-Id: I8dba78f8b3c1bbdec452f94f1a6ffe375ba8d42e