Commit Graph

99635 Commits

Author SHA1 Message Date
TreeHugger Robot
d138be09df Merge "Add Foldable feature flag" 2019-02-25 16:57:50 +00:00
Dario Freni
7d98a45672 Merge "Add "Staged" to API related to staged sessions." 2019-02-25 15:23:17 +00:00
Dario Freni
60a96c1791 Add "Staged" to API related to staged sessions.
Also, throw an IllegalArgumentException is these APIs are called on
sessions that are not marked as staged.

Test: tested new apis with an ad-hoc app. atest RollbackTest
StagedRollbackTest
Fix: 124507718

Change-Id: I3529aaff404d644ab6dad98f29411141e8df865d
2019-02-25 13:09:48 +00:00
Ivan Chiang
a46ade3cc1 Add @RequiresPermission annotations to getCahce and putCache
Add @RequiresPermission annotations to the methods so that
it's clear what permission is protecting these APIs.

Test: make
Change-Id: I203ce997319c7fc8a13e91b55f3c55d844429be8
Fix: 123661724
2019-02-25 11:30:34 +08:00
Ricky Wai
b9616408ad Merge "Do not return AppDetailsActivity in PackageInfo" 2019-02-23 12:00:12 +00:00
TreeHugger Robot
7d9c08d393 Merge "Control lid behaviour with a Global setting" 2019-02-23 06:54:48 +00:00
TreeHugger Robot
fb8509a3dd Merge "Create setting screen from Notification Assistant" 2019-02-23 04:30:23 +00:00
TreeHugger Robot
370b0da014 Merge "Fix View#performHapticFeedback() can block UI thread" 2019-02-23 03:39:53 +00:00
TreeHugger Robot
05675bc0cf Merge "Made AbstractRemoteService.getRemoteRequestMillis() optional." 2019-02-23 03:25:46 +00:00
Edward Savage-Jones
ce7a01fd78 Control lid behaviour with a Global setting
Using a global setting to specify the lid open/close behaviour
allows OEMs to support switching between windowed and windowless
lids at runtime instead of build time.

Bug: 70378569
Test: Find the hall effect sensor on the device and then using a magnet
confirm the expected behaviour for each global setting:
* No reaction from device
adb shell settings put global lid_behavior 0
* Sleep/screen off
adb shell settings put global lid_behavior 1
* Lock screen but screen stays on
adb shell settings put global lid_behavior 2
Change-Id: I53682711aeaaeb9eead7246ba83e4dd4b3c06a58
2019-02-23 10:18:21 +08:00
Qasid Sadiq
62b67c26c9 Merge "Revert "Fix a11y cache correctness bug"" into pi-dev am: 987ec033ab
am: 24f953a6c2

Change-Id: I38d80cd355ebf044696848d1d4697521cd78183f
2019-02-22 17:23:08 -08:00
TreeHugger Robot
3f9eff103e Merge "Re-throw reflective exceptions" 2019-02-23 01:10:32 +00:00
Ricky Wai
905908f743 Do not return AppDetailsActivity in PackageInfo
Also, update javadoc for LauncherApps.getActivityList()

Bug: 119789943
Test: atest android.content.pm.cts.PackageManagerTest#testGetPackageInfo
Change-Id: I1a183207e6eb880a68811d4c2a5cf77d3f71f0b0
2019-02-23 00:26:57 +00:00
Qasid Sadiq
24f953a6c2 Merge "Revert "Fix a11y cache correctness bug"" into pi-dev
am: 987ec033ab

Change-Id: I00d421256cbda478bf413a2195f14787d09d133c
2019-02-22 15:55:50 -08:00
Chandan Nath
8715260984 Merge "[Multi-user] add PackageInstaller.installExistingPackage with IntentSender which is fired only after the asynchronous restore is complete" 2019-02-22 23:34:04 +00:00
TreeHugger Robot
a9954d9aae Merge "Fixed when ContentCapture is finished." 2019-02-22 23:30:12 +00:00
Ashley Rose
c74a113d28 Re-throw reflective exceptions
Test: atest GeneratedInspectionCompanionProviderTest
Fixes: 125800739
Change-Id: Ifea2c3dc303e255bc704ee34168e250e649519b5
2019-02-22 18:24:18 -05:00
Yiwei Zhang
5ccf21b382 Merge "Game Driver: process sphal libraries in GPU service" 2019-02-22 21:45:56 +00:00
Ricky Wai
ccac071827 Merge "SystemAPI for setting app details activity state" 2019-02-22 20:19:03 +00:00
Fabian Kozynski
171f40d8a7 Create setting screen from Notification Assistant
Test: atest
Fixes: 120852765
Change-Id: I90b22daa67f73809697fd629dabec22ef991de54
2019-02-22 14:18:58 -05:00
Felipe Leme
6fef91e839 Fixed when ContentCapture is finished.
The initial behavior cop^H^H^H based on Autofill, which only closes the session when the activity
finishes. But for content capture we must always close the session when the activity is stopped.

Test: manual verification
Fixes: 125628737

Change-Id: I064d4ace97721dd8fb20075c02e1f059ecbf942a
2019-02-22 11:15:03 -08:00
Chandan Nath
e8e463bd84 [Multi-user] add PackageInstaller.installExistingPackage with IntentSender which is fired only
after the asynchronous restore is complete

This is a better alternative to the existing synchronous PackageManager.installExistingPackage
method where the restore operation happens asynchronously but the method itself will return
success before the restore finishes.

Bug: 122881085

Test: 1) cts-tradefed run cts -m CtsBackupHostTestCases
-t android.cts.backup.ProfileKeyValueBackupRestoreHostSideTest
2) atest RunBackupFrameworksServicesRoboTests
3) Install Hangouts on work profile. Then install on primary profile, backup and uninstall.
Now install again and immediately hit Open. Before this change, the app will crash after a few
seconds (when the background restore operation finishes). With this change and a corresponding
Play Store change to use this new method, Open shows up only after restore has finished so the
app doesn't crash.

Change-Id: I5d2e1f3bb5509894bedd6bbcfac32ed6cf946a80
2019-02-22 19:14:53 +00:00
Susi Kharraz-Post
b5de2782de Merge "Add logging for profile switching for sharesheet" 2019-02-22 18:00:34 +00:00
Mady Mellor
ffafec1f62 Merge "Remove title API from bubble metadata" 2019-02-22 17:43:04 +00:00
Chavi Weingarten
a471767911 Merge "Wait for input windows to be set before proceeding with inject for tests" 2019-02-22 17:34:43 +00:00
Nikita Ioffe
3cbd4a584e Merge "Require INSTALL_PACKAGES permission for setInstallAsApex" 2019-02-22 17:04:17 +00:00
Tyler Gunn
d490ce1483 Merge "Change data types on CallIdentification API." 2019-02-22 15:21:44 +00:00
Etan Cohen
272ed7536e Merge "[CS] Support "instant failure" from factories" 2019-02-22 14:29:39 +00:00
Nikita Ioffe
4501c11cb0 Require INSTALL_PACKAGES permission for setInstallAsApex
Bug: 123314638
Fixes: 123314638
Test: apex_e2e_tests
Change-Id: I2a78a5e7496554c0c3eecbfd28f2d793b4ba2196
2019-02-22 14:03:41 +00:00
Susi Kharraz-Post
0446fab756 Add logging for profile switching for sharesheet
We want to know which profile people share from and if users are
switching from work to personal profile when sharing and vice versa.
This adds the current profile to the sharesheet and also logs when the
profile is switched.

Bug: 124503277
Test: Added new unit tests for ChooserActivity and IntentForwardActivity
Change-Id: Ideb83682bf3395258ff457988f4a3e9f519a844c
2019-02-22 08:47:16 -05:00
TreeHugger Robot
3b2e1e3f2c Merge "Fixed a typo in the runtime_native DeviceConfig namespace." 2019-02-22 13:42:17 +00:00
Wale Ogunwale
c6506833e3 Merge "Added some TestApi that are already used by CTS" 2019-02-22 12:51:57 +00:00
TreeHugger Robot
add90457d5 Merge "Language detection fixes." 2019-02-22 11:20:28 +00:00
Qasid Ahmad Sadiq
4d70022b88 Revert "Fix a11y cache correctness bug"
This fix introduced a painful crash that ends up disabling accessibility
services for certain users.
This happens when a client of AccessibilityCache tries to add a node, with the same id as a node previously in the cache, but fewer children, where the removed child is not in the cache.
This is because, when children are removed, and a the node is updated, the cache tries to clear the child trees. But if the child is not in the cache, the cache clears the whole tree. Every node is recycled.
Then the original node being replaced is attempted to be recycled again, and voila crash.

The fix also didn't fix the original issue based on the discussion in
b/114133438.

The risk for this is pretty low, since nothing was built on top of this.

This reverts commit 2f69c16c3d.
Bug: 124676705
Test: Tested to see if above usecase still happens.

Change-Id: I8a39698c4532a1613ba47e1c6ca70201cd496212
2019-02-21 21:07:12 -08:00
Arthur Hung
a4c520694f Fix View#performHapticFeedback() can block UI thread
Currently, IWindowSession#performHapticFeedback() would first lookup
the WindowState via IWindow token. That would also hold the WMS lock,
so if some function like relayout window is still hold WMS lock,
it may block the function.

Use uid and package name from Session that they already restored.

Bug: 62330939
Test: Open app with autofill edit, type with IME.
Change-Id: I359c106d213b87aa8afee48b0f1ad70011970eab
2019-02-22 12:43:55 +08:00
Philip P. Moltmann
933c8e06e8 Merge changes from topics "policy_fixed_set_via_perm_controller", "protect-policy-flags"
* changes:
  Ask Perm Controller to set policy-fixed perms
  Guard changing policy_fixed flag behind permission
2019-02-22 04:39:31 +00:00
Wale Ogunwale
691af68a3c Added some TestApi that are already used by CTS
Allows us to remove the use of private platform API from CTS.

Bug: 124134247
Test: builds
Change-Id: Iceb81ff7c9385e877d2612fbb7b506245d116928
2019-02-21 20:15:56 -08:00
TreeHugger Robot
55168269d7 Merge "Removing SDK check when getting default widget padding" 2019-02-22 02:44:58 +00:00
Mady Mellor
138f4c9ac5 Remove title API from bubble metadata
Test: atest NotificationTest (with the cts cl)
Bug: 124909846
Change-Id: Ia4611d4f63da0213ae0ff737355743396404b6e2
2019-02-21 18:25:33 -08:00
TreeHugger Robot
35047419e3 Merge "Make ViewRootImpl#destroyHardwareResources thread-safe" 2019-02-22 02:15:40 +00:00
Leo Hsu
ab28fff9f9 Add UserManager APIs to SystemApi.
Bug: 124940146
Test: make
Change-Id: I1cac9a6106b3da099e08f10f2c08d90e9f515e42
2019-02-22 01:08:14 +00:00
Felipe Leme
9873510af3 Merge "Refactored Autofill properties that are optimized on application level." 2019-02-22 01:02:46 +00:00
Philip P. Moltmann
41df9f94ae Ask Perm Controller to set policy-fixed perms
This is much slower than the old way as we need to call into a different
process. On the other hand this handles the following cases correctly:
- foreground / background permissions
- pre-M apps
- split permissions

Test: CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPermissionGrant,testPermissionPolicy,testPermissionMixedPolicies,testPermissionAppUpdate,testPermissionGrantPreMApp
Change-Id: I5cd139ad29e5b77b77b02e12c75eb774984a7759
Bug: 124128308
2019-02-21 16:56:25 -08:00
Philip P. Moltmann
2a537a6ef5 Guard changing policy_fixed flag behind permission
- Allow an app to change policy_fixed permissions
- Disallow apps >= Q to change the polic_fixed flag

Bug: 124128308
Test: Changed permissions that were policy_fixed
Change-Id: Ia94bae1b993bd8a18c93f866df2114c740fa17bd
2019-02-21 16:56:25 -08:00
chaviw
504715c505 Wait for input windows to be set before proceeding with inject for tests
Added a new test method to allow the client to wait until input windows
have been propagated to InputFlinger before proceeding to inject input.
This ensures that the inject is called when all windows have been set
up.

Bug: 123041491
Test: ListPopupWindowTest, PopupMenuTest
Change-Id: I42abfa4ea23a14ae1a003c6ee8976cc466f1d5af
2019-02-21 16:51:49 -08:00
Felipe Leme
81299d0d96 Made AbstractRemoteService.getRemoteRequestMillis() optional.
Also split some logic from PendingRequest into BasePendingRequest, so they're
not leaked into the async requests.

Test: atest CtsContentCaptureServiceTestCases CtsAutoFillServiceTestCases
Bug: 117779333
Change-Id: Ife9a3ab3a817944408caf9eae69dd75f48ab90c6
2019-02-21 16:11:26 -08:00
Sunny Goyal
40da899d4c Removing SDK check when getting default widget padding
This avoids packageManager call everytime a widget updates and
on swipe up

Test: Everything compiles
Change-Id: I58e8613b7a8c9d27fb9293e623ccb274edab82d3
2019-02-22 00:07:28 +00:00
Makoto Onuki
7a81c02723 Merge "Add ADB command to wait for system server crash" 2019-02-21 23:40:18 +00:00
Chavi Weingarten
263a4d08e4 Merge "Add synchronous transaction to wait for setInputWindow to complete (5/n)" 2019-02-21 23:33:44 +00:00
Sherry Huang
a2c5d1a7f3 Merge "Implement USB-C overheat warning" 2019-02-21 23:09:08 +00:00