Commit Graph

22714 Commits

Author SHA1 Message Date
Shan Huang
b533660125 Avoid leaking Activity from OnBackInvokedCallback.
- Remove mTopCallback field
- Cleanup compat and default callbacks
- Remove the callback held by WindowState when the window is removed.

Bug: 218328707
Test: atest packages/apps/Launcher3/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
Test: atest frameworks/base/core/tests/coretests/src/android/window/WindowOnBackInvokedDispatcherTest.java
Change-Id: I38fd760a617500c874aef10bc8de165880837008
2022-02-10 04:46:24 +00:00
Shan Huang
56fc3f5e5c Merge "Add compatibility back callbacks." 2022-02-05 06:31:15 +00:00
TreeHugger Robot
10e2560cba Merge "Have both NAVIGATION_HINT_IME{,_SWITCHER}_SHOWN" 2022-02-05 02:48:09 +00:00
Shan Huang
025b9e5ceb Add compatibility back callbacks.
For pre-T apps, the default back callback dispatches KEYCODE_BACK to the
application's root view.
For T+ apps, the default KEYCODE_BACK listener invokes the registered
OnBackInvokedCallback.

Test: m -j
Bug: 195946584
Change-Id: I62342b249e6cd6f8b036f7e950cc3f9754418ee4
2022-02-05 01:53:25 +00:00
Antonio Kantek
efccd1dfe9 Merge "(TouchMode Permission 2/n) Introduce permission for touch mode" 2022-02-04 22:42:56 +00:00
Yohei Yukawa
bf122b9f94 Have both NAVIGATION_HINT_IME{,_SWITCHER}_SHOWN
This is a mechanical renaming CL with no behavior change.

Somehow NAVIGATION_HINT_IME_SHOWN was set when the IME switcher needs
to be shown, not when the IME is shown.  This CL aims to avoid future
confusions by also introducing

  NAVIGATION_HINT_IME_SWITCHER_SHOWN

then setting NAVIGATION_HINT_IME_SHOWN when the IME is actually shown.

This CL also updates NavigationBarTest to verify those flags.

Bug: 192412909
Bug: 217755059
Test: atest SystemUITests:NavigationBarTest
Change-Id: I8bdd58d040689953072c7f384ece2bca677265e1
2022-02-04 12:49:21 -08:00
Jay Sullivan
be2bd69f06 Merge changes from topic "t-media-permissions"
* changes:
  Define splits for AUDIO/VIDEO/IMAGE permissions
  Define new AUDIO/VIDEO/IMAGE permissions
2022-02-04 18:18:37 +00:00
Salud Lemus
411c2f4527 Merge "Permit access to certain get APIs for financed device owner" 2022-02-04 17:54:17 +00:00
Salud Lemus
10935c1f16 Merge "Expose device owner type constants for CTS tests" 2022-02-04 17:48:49 +00:00
Stephanie Bak
b67c420a0c Merge "Replace SSID String with WifiSsid" 2022-02-04 15:59:37 +00:00
TreeHugger Robot
92668918dd Merge "Expose MANAGED_PROVISIONING_DPC_DOWNLOADED via DevicePolicyManager" 2022-02-04 15:02:56 +00:00
Kholoud Mohamed
cbac567d5e Merge "Add constants for enterprise strings in dialer" 2022-02-04 11:21:06 +00:00
TreeHugger Robot
8581bc3e77 Merge "Add GameSession APIs for starting activities." 2022-02-04 09:25:47 +00:00
Salud Lemus
804e73f6aa Permit access to certain get APIs for financed device owner
Permitting access will be useful when writing the CTS tests.

Bug: 216852998
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest

Change-Id: I8113fcbc0eadb8af783b2dfe5aad96b194f5c014
2022-02-03 17:17:16 -08:00
shannonchen
ed33816c43 Add GameSession APIs for starting activities.
This API allows the game service provider to start an
activity in the existing game task and receive a result
through the GameSessionActivityCallback instead of the
result being sent to the game.

For an example use case, in the Android S dashboard, the
dashboard starts the YouTube-hosted live stream activity to
handle YouTube live streaming and the Play Games-hosted
dashboard activity to handle showing Play Games services
data.

The API allows the GameSession provider to respond to
different activity results returned from the target
activity.

Test: manual e2e testing
Bug: 208242220
Bug: 202414447
Bug: 202417255
CTS-Coverage-Bug: 206128693
Change-Id: I1eb017ade1ae60a713d85a70df23845498206df7
2022-02-03 22:42:11 +00:00
Li Li
cfa95a3e2c Merge "Update Freezer app kill reasons" 2022-02-03 18:49:56 +00:00
Ameer Armaly
3bfc384ad3 Merge "Add API for services to turn off window animations." 2022-02-03 18:39:58 +00:00
Vadim Caen
8e59ca9a3a Merge "Save the OnBackInvokedCallback in WindowState" 2022-02-03 17:26:12 +00:00
Issei Suzuki
aa45a654ab Merge "Add comment for locking down custom task animation." 2022-02-03 15:14:55 +00:00
Lorenzo Colitti
62b2beb69c Merge "Split out the ipsec API surface and use framework-connectivity-tiramisu" 2022-02-03 13:36:33 +00:00
Aleks Todorov
1bf00cb627 Merge "Deprecate android.app.extra.PROVISIONING_LOGO_URI in framework." 2022-02-03 12:18:54 +00:00
Elis Elliott
d603ad7916 Expose MANAGED_PROVISIONING_DPC_DOWNLOADED via DevicePolicyManager
Expose Settings.Secure.MANAGED_PROVISIONING_DPC_DOWNLOADED by adding
getter & setter methods in DevicePolicyManager.

Bug: 212679631

Test: android.devicepolicy.cts.DevicePolicyManagerTest
Change-Id: I9c8c69ec494fcbf82965308b76f6e27e5184ba4d
2022-02-03 11:06:54 +00:00
Issei Suzuki
1eaedb4baf Add comment for locking down custom task animation.
Bug: 162066454
Test: N/A, comment change only
Change-Id: Ie014c70cf5253dc6107d2da10414278e36f9bd08
2022-02-03 10:29:26 +00:00
Wenhao Wang
eeea740723 Merge "Revert "Revert "User consent for Logcat data access""" 2022-02-03 05:54:43 +00:00
Stephanie Bak
22caa6fb93 Replace SSID String with WifiSsid
Bug: 215753949
Test: atest DevicePolicyManagerTest
Change-Id: I74fcb6c3476a5e1b7ac38e7f7c5b3880e3895f30
2022-02-03 05:47:39 +00:00
Li Li
99111bf436 Update Freezer app kill reasons
Update Freezer app kill reasons from REASON_OTHER to REASON_FREEZER.

Bug: 179715791
Test: dumpsys activity exit-info shows the new reason.
Test: atest android.app.cts.ActivityManagerAppExitInfoTest
Change-Id: If65c14af2fcd11efd7228b47fcf7b1189adb45bb
2022-02-02 21:20:00 -08:00
Felipe Leme
484e4efc74 Merge "Fixed DPM.logoutUser() methods." 2022-02-03 01:05:57 +00:00
Aaron Huang
1dad7aa006 Split out the ipsec API surface and use framework-connectivity-tiramisu
Bug: 204153604
Test: TH
Change-Id: I6cc8aef6a0ab9ce4bcef2797196b1d1b3687acca
2022-02-03 09:47:41 +09:00
Wenhao Wang
ec8c5511af Revert "Revert "User consent for Logcat data access""
This reverts commit d7138b445c.
This patch fixes the breaking caused by
commit b4f8ed9bb8.

It's a workaround patch. The upcoming patch will have solid fix.

Bug: 193708292
Bug: 217482811
Bug: 217495147
Test: atest PlatformRuleTests -- --abi x86_64
Test: atest FrameworksServicesTests -- --abi x86_64
Ignore-AOSP-First: pending fix for logcat privacy issue
Change-Id: If18086130599f0ae027d16ccbb7b5b5cd73f2e72
2022-02-02 16:08:19 -08:00
Antonio Kantek
d299b88323 (TouchMode Permission 2/n) Introduce permission for touch mode
This CL adds caller pid and uid for permission checks in the native
layer when switching touch mode state.

Bug: 198487159
Test: atest FrameworksCoreTests
Test: atest CtsInputMethodTestCases
Test: atest CtsInputTestCases
Test: atest CtsSecurityTestCases
Test: atest CtsWindowManagerDeviceTestCases
Change-Id: I64480c0284481b288ad0950c2e95726b9adb529f
2022-02-02 15:10:34 -08:00
Ameer Armaly
c52cb42e51 Add API for services to turn off window animations.
Bug: 195757359
Test: atest AccessibilityWindowReportingTest
Change-Id: I5fc1c90e87de17fb770f6a3371fc341985017a61
2022-02-02 22:14:28 +00:00
Salud Lemus
5ea8a1fbe2 Expose device owner type constants for CTS tests
This is necessary to be able to use them in the Bedstead test infra.

Bug: 216852998
Test: None (trivial change)

Change-Id: Ib5afccc65d357b893d193b91b78f59f32b9e2811
2022-02-02 13:13:14 -08:00
Vadim Caen
717e53a6a7 Save the OnBackInvokedCallback in WindowState
This CL enable OnBackInvokedCallback to be saved in a WindowState and
queried by the BackNavigationController to be returned when
ATM.startBackNavigation() is called.

The DecorView provides a PendingOnBackInvokedDispatcher that can receive
callback registration before being added to a ViewRootImpl.

Test: atest FrameworksCoreTests:BackNavigationTest
Bug: 131727607
Change-Id: I01528a22ea4a6583a56ade4eab69136d727855d0
2022-02-02 22:08:02 +01:00
Caitlin Cassidy
f759b1ebee Merge "[Media TTT] Add @SystemApis for all the media transfer callbacks." 2022-02-02 21:00:56 +00:00
Felipe Leme
abc9c87519 Fixed DPM.logoutUser() methods.
The initial implementation was setting the logout user to be SYSTEM
on non-headless system user mode, but recently it was changed to
return null if the user was not switched or started by the device
admin.

Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_LogoutUser_systemApi com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_LogoutUser # on phones and automotive
Fixes: 216648012

Change-Id: I1f8f754167260a41df13dca13cb62467723c99b1
2022-02-02 16:53:22 +00:00
Caitlin Cassidy
44386a5a2e [Media TTT] Add @SystemApis for all the media transfer callbacks.
This migrates the media transfer from just a service to a full-fledged
@SystemApi. Some of the testing infrastructure has not yet been migrated
to keep this CL slightly smaller.

Bug: 216318437
Test: systemui media.taptotransfer tests *still need to be updated*
Change-Id: Idf1f72de1343020668e158d74051c1dfb970cfcd
2022-02-02 16:14:33 +00:00
TreeHugger Robot
24c7b8113a Merge "New @TestApi: DevicePolicyManager.isNewUserDisclaimerAcknowledged()" 2022-02-02 15:08:17 +00:00
Nikita Ioffe
e5cac878b6 Merge "Teach PackageManagerService about supplemental process" 2022-02-02 12:41:45 +00:00
Shubham Dubey
b771f83365 Merge "Revert "User consent for Logcat data access"" 2022-02-02 12:11:21 +00:00
Aleks Todorov
fb2176c493 Deprecate android.app.extra.PROVISIONING_LOGO_URI in framework.
Bug: 193879901
Test: Annotation-only change
Change-Id: If99cc892eee723de45f7c5018247188741fa2298
2022-02-02 11:40:01 +00:00
kholoud mohamed
363fcabbdb Add constants for enterprise strings in dialer
Bug: 211422509
Bug: 188410712
Test: manual
Change-Id: I4d7f92e4038a08ca8a880924f4151e421e595254
2022-02-02 09:56:44 +00:00
Shubham Dubey
d7138b445c Revert "User consent for Logcat data access"
This reverts commit b4f8ed9bb8.

Reason for revert: Breaking Dex2oatPressureRuleTest and PreRebootLoggerTest
BUG:217482811
BUG:217495147

Change-Id: I745de0dbcaa328918b5a1c58028471fd3d8ae0ab
2022-02-02 09:25:41 +00:00
Sharon Su
79d91e3efa Merge changes from topic "susharon-wallpapereffectsgeneration"
* changes:
  Server implementation of WallpaperEffectsService API.
  Data class and interface for wallpaper effects generation api.
2022-02-02 07:42:16 +00:00
Xiang Wang
0c20077d1f Merge changes from topic "convert_metadata"
* changes:
  Add allowGameFpsOverride intervention flag
  Introduce new game mode config xml resource file
2022-02-02 05:43:03 +00:00
Jay Thomas Sullivan
e6c96ebb51 Define new AUDIO/VIDEO/IMAGE permissions
Define three new permissions:

- READ_MEDIA_AUDIO: read audio files from external storage
- READ_MEDIA_VIDEO: read video files from external storage
- READ_MEDIA_IMAGE: read image files from external storage

Also, define two new permission groups:

- READ_MEDIA_AURAL
- READ_MEDIA_VISUAL

The permissions are assigned to permission groups as follows:

  READ_MEDIA_AURAL {
      READ_MEDIA_AUDIO
  }
  READ_MEDIA_VISUAL {
      READ_MEDIA_VIDEO
      READ_MEDIA_IMAGE
  }

The motivation for this change is to support the "Media Permission
Update for Android T" project.

Bug: 201318587
Test: atest CtsPermissionTestCases CtsPermission3TestCases
Change-Id: I1539ba4e401dac452e1b9717dc6c95035b28c18e
2022-02-01 20:24:00 -08:00
Eun-Jeong Shin
813624d64d Merge "User consent for Logcat data access" 2022-02-02 04:18:38 +00:00
Xiang Wang
7998c248cc Introduce new game mode config xml resource file
If the new resource file parser fail to parse the boolean values from
the resource file due to tag not found in manifest or missing file, the
existing metadata values will be used to populate pre-existing flags

Bug: 214448560
Test: atest GameManagerTest
Change-Id: I1543a1bb84379a2e9322a65d41e44fa6014821b9
2022-02-01 14:33:40 -08:00
Sharon Su
0b1dea8145 Data class and interface for wallpaper effects generation api.
Test: manual build and run cts on devices
Bug: 213238425
CTS-Coverage-Bug: 213238425
Change-Id: I8c3d579a5123aaa99999f9d0df92998cec9dec34
2022-02-01 22:08:49 +00:00
Lee Shombert
228a16b846 Merge "Export PropertyInvalidatedCache SystemApis" 2022-02-01 20:29:22 +00:00
TreeHugger Robot
37b77f2c8a Merge "Add constants for enterprise strings in PermissionController" 2022-02-01 19:16:55 +00:00