Commit Graph

15473 Commits

Author SHA1 Message Date
TreeHugger Robot
7fdbe22475 Merge "Make RemoteService propagate Context#bindService failure to PendingRequests" into qt-dev 2019-04-18 23:07:32 +00:00
TreeHugger Robot
f96a3cbaa3 Merge "Add @TestApi to StatusBarManager @SystemApi methods" into qt-dev 2019-04-18 19:58:25 +00:00
Irina Dumitrescu
6c4094c67d Merge "Don't call ConnectivityService when holding ActivityManagerService lock." into qt-dev 2019-04-18 19:25:14 +00:00
Mady Mellor
2163249864 Merge "Fix back presses dismissing bubbles when IME is up" into qt-dev 2019-04-18 18:21:22 +00:00
Irina Dumitrescu
34a27c4c45 Don't call ConnectivityService when holding ActivityManagerService lock.
Exclude system server thread from the threads on which we call updateHttpProxy() from the Activity Manager.

Test: atest HostsideVpnTests
Bug: 128465980
Change-Id: Ia2b2c6de8a01a264bfb09393144641d91ee2c164
2019-04-18 12:18:08 +01:00
TreeHugger Robot
2631fb58b6 Merge "Ensure Contrast: Address API feedback" into qt-dev 2019-04-18 11:17:43 +00:00
Michal Karpinski
2aeac8ce0e Merge "Make sure Notification#deleteIntent cannot be used to start activities from background" into qt-dev 2019-04-18 09:31:32 +00:00
TreeHugger Robot
ff0f81ff2e Merge "Remove car mode dialer and call companion roles." into qt-dev 2019-04-18 05:44:25 +00:00
TreeHugger Robot
80e9a4cc42 Merge "DO NOT MERGE: Fix a few issues with foreground service location accesses." into qt-dev 2019-04-18 04:35:43 +00:00
TreeHugger Robot
6e0668c784 Merge "API feedback: getSuppressNotification -> isNotificationSuppressed" into qt-dev 2019-04-18 03:27:45 +00:00
Peiyong Lin
53e38f260c Merge "Make sure the color space range is checked properly." into qt-dev 2019-04-18 02:16:57 +00:00
Peiyong Lin
d088e6b33d Make sure the color space range is checked properly.
We only want to accept pre-defined color space,without the check it's possible
that the color space is not pre-defined and thus can't be restored.

BUG: b/116112787, b/130737691
Test: build
Change-Id: Ic1d21501828d3edc5ad04534fece70a7146e78bd
2019-04-17 22:30:13 +00:00
Evan Laird
418ba8f03e Add @TestApi to StatusBarManager @SystemApi methods
Enables CTS testing

Test: APIs are in api/test-current
Bug: 130178313
Change-Id: Ie408bc4399cf64018903ef122b8db1e6a9fa9fb1
2019-04-17 16:43:39 -04:00
Adrian Roos
8c7ca4f5c2 Ensure Contrast: Address API feedback
Fixes: 130647853
Test: make checkapi
Test: atest EnsureBarContrastTest NavigationBarColorTest
Change-Id: Iafbdce8476134df56ea5d15155391b10afc9ce94
2019-04-17 21:36:04 +02:00
Svetoslav Ganov
d21ce79b30 Merge "Make storage a restricted permission - framework" into qt-dev 2019-04-17 18:27:06 +00:00
Michal Karpinski
d207589897 Make sure Notification#deleteIntent cannot be used to start
activities from background

Remove whitelisting privilege from deleteIntent before it's
sent in cancelNotificationLocked().

Bug: 130619912
Test: manual (with a custom built app that provides
      PendingIntent.getActivity() to
      Notification.Builder.setDeleteIntent())
Change-Id: I8a85b4c32717f958c4ee2fe040b73bceb96d7feb
2019-04-17 16:08:00 +01:00
Mehdi Alizadeh
de005d26a6 Merge "Make deprecated AppTarget APIs visible" into qt-dev 2019-04-17 13:49:22 +00:00
TreeHugger Robot
1f14a727d6 Merge "Cache service component name in RoleControllerManager to avoid deadlock." into qt-dev 2019-04-17 05:51:16 +00:00
Felipe Leme
17203cd88b Merge "Fixed AutofillOptions.isAugmentedAutofillEnabled to use the right client." into qt-dev 2019-04-17 03:43:59 +00:00
Mady Mellor
c529d6d49f API feedback: getSuppressNotification -> isNotificationSuppressed
Test: it's a rename / there is a cts CL with renaming
Bug: 130635782
Change-Id: If56d48feae54c928dca48df876bb8fcd41b3d699
2019-04-16 14:55:18 -07:00
TreeHugger Robot
f636d3cde8 Merge "Grant access to device identifiers with READ_DEVICE_IDENTIFIERS appop" into qt-dev 2019-04-16 21:52:56 +00:00
Andrii Kulian
153f73cbcc Merge "Add unit tests for activity client state changes" into qt-dev 2019-04-16 21:18:18 +00:00
Andrii Kulian
008483c045 Merge "Fix extra onStop when finishing after onCreate" into qt-dev 2019-04-16 21:18:18 +00:00
Mehdi Alizadeh
a9f0294b0e Make deprecated AppTarget APIs visible
Some deprecated APIs are still in use and need to stay visible. The SDK
in google3 is 2 weeks behind and will not receive the replacement APIs
until then.

Bug: 130610898
Test: atest AppPredictionServiceTest
Test: Verified that predictions are being loaded in AllApps
Change-Id: Ib6277f9fc46f1fe55a2cec4fc563ecdc964ce8a7
2019-04-16 13:20:23 -07:00
Felipe Leme
e5aa5ebd60 Fixed AutofillOptions.isAugmentedAutofillEnabled to use the right client.
Also removed ContentCaptureClient, which is not used anymore (it probably became obsolete with the
ContentCaptureOptions optimization).

Fixes: 130585342
Test: atest CtsAutoFillServiceTestCases:android.autofillservice.cts.augmented.AugmentedLoginNotImportantForAutofillActivityTest
Test: manual verification with Dialer app

Change-Id: I041922874fac749f1f5d49793f1ad3e26cc345d6
2019-04-16 13:14:41 -07:00
Svet Ganov
d563e937f2 Make storage a restricted permission - framework
This change makes storage a soft restricted permission. When the
permission is whitelisted for an app then hodlding it allows the
app to access the full SD card as on a P device. If howerver, the
permisison is not whitelisted for an app then holding it allows
accessing the visual/aural collections in media store while the
app would run in its own isolated storage sandbox.

This change also connects the opt in/out application attribute
to how external storage is mounted remocing temporary code. The
attribute was renamed to convey that opting in legacy mode is
not somethung that is desirable or would be available in the long
run.

White at this also fix the default state of app ops for restricted
permissions to avoid allowing ops for non requested restricted
permissions to every UID as component access could skip permission
checks by cannot skip app op checks.

bug:130327036

atest CtsPermission2TestCases
atest CtsPermissionTestCases
atest CtsAppOpsTestCases
atest atest CtsAppSecurityHostTestCases:android.appsecurity.cts.ExternalStorageHostTest
atest CtsAppSecurityHostTestCases:android.appsecurity.cts.PermissionsHostTest

Change-Id: Ibb23cbb6a5c66d9c3823cc13562a1b903b391ffd
2019-04-16 12:34:49 -07:00
Mehdi Alizadeh
cc33160f6a Merge "Check before closing the CloseGuard if not closed yet" into qt-dev 2019-04-16 18:01:33 +00:00
Mady Mellor
390bff474c Fix back presses dismissing bubbles when IME is up
If bubbles is expanded & shade is not use the virtual display id of the
expanded activity view (if it's valid, otherwise do whats normal).

Test: manual  1) have expanded bubble with IME up
              2) hit back button
              => note that the IME goes away but the bubble remains

              1) have expanded bubble up
              2) pull down shade
              3) hit back button
              => shade goes away

              Do above with gesture nav turned on & do back gesture

Test: atest KeyButtonViewTest
Fixes: 122535136
Change-Id: Iabaace66cfb4d3d80b1a3a3c7b0773deb48fbcaa
2019-04-16 10:30:15 -07:00
TreeHugger Robot
ef2e036f96 Merge "Fix VR-related system APIs" into qt-dev 2019-04-16 15:49:33 +00:00
TreeHugger Robot
083190633a Merge "ActivityThread: Preserve windows when relaunching all activities" into qt-dev 2019-04-16 11:20:45 +00:00
TreeHugger Robot
e6b9bdf4d0 Merge "Defer top process state for VM" into qt-dev 2019-04-16 06:37:50 +00:00
Mehdi Alizadeh
9ac588b0dd Check before closing the CloseGuard if not closed yet
Bug: 130435945
Test: atest AppPredictionServiceTest
Change-Id: I19d866d54e6b7e74e0399e2910ab9c9c71d13f51
2019-04-16 00:50:03 +00:00
Mehdi Alizadeh
6164eb6a8d Merge "Add new constructors for mandatory fields in AppTarget.Builder" into qt-dev 2019-04-16 00:34:13 +00:00
Winson Chung
4b118856db Merge "Add nullable annotations" into qt-dev 2019-04-15 23:57:01 +00:00
Pat Plunkett
27ad774fd6 Fix VR-related system APIs
This adds necessary nullness conditions on method arguments, and makes
a Builder class final.

Bug: 126700268
Bug: 126701891
Bug: 126701662
Test: Compiles
Change-Id: I4e825057b413fe22d1c2ebd228a5b76641b04868
2019-04-15 23:13:42 +00:00
Mehdi Alizadeh
08c5083da3 Add new constructors for mandatory fields in AppTarget.Builder
Test: it builds
Test: atest AppPredictionServiceTest
Bug: 129901111
Change-Id: Ifacf5b86d5f436b02191af58541a403198840f18
2019-04-15 14:44:56 -07:00
Winson Chung
ad43a5039d Add nullable annotations
Bug: 126700764
Test: None
Change-Id: If0a8904033bc8c7204450b058a307be9b51b2605
2019-04-15 12:46:35 -07:00
TreeHugger Robot
59b8b82e74 Merge "Reduce transactions for acquiring and releasing provider" into qt-dev 2019-04-15 12:18:30 +00:00
Riddle Hsu
50e3400931 Defer top process state for VM
The top state will make JIT compilation easier to be triggered.
To reduce the impact of startup time, if there is launching activity,
the top state will be deferred to apply until idle or 1s timeout.
The cold launch time of Contacts, Phone, Calculator are reduced ~15ms.

Test: AppLaunchTest
Bug: 123043091
Change-Id: I8a235e18ea6b508c9aa192445c9ea22d9d12f177
2019-04-15 14:05:51 +08:00
TreeHugger Robot
62c6f21dac Merge "Remove appops debug logic" into qt-dev 2019-04-13 06:06:40 +00:00
Hai Zhang
48f36c6afe Cache service component name in RoleControllerManager to avoid deadlock.
PackageManagerService needs to know the default home/browser app,
often with the PackageManagerService lock held, so we should avoid
holding the RoleManagerService lock and trying to acquire the
PackageManagerService lock.

Right now the only place we need to access PackageManager while
holding RoleManagerService lock is when creating a
RoleControllerManager, but actually the component name of the remote
service should be the same for any user, so we can just cache the
component name upfront to avoid the deadlock.

Bug: 130130942
Bug: 130303431
Test: manual
Change-Id: Id19edb362a1524663d8d3eb27cef161cf1fa4542
2019-04-13 11:56:37 +08:00
Joe Onorato
fbd637a1c1 Expose APIs for the experiment ids back from statsd.
Bug: 129099771
Test: treehugger
Change-Id: I8689a06ae5667a146064bc870be8b5a4e92fb9b7
2019-04-12 19:23:43 -07:00
Michael Wachenschwanz
bd39e731f3 Remove old version of registerUsageSessionObserver
Test: none
Fixes: 128455269
Change-Id: I23ac8db6b05e3f40dd83f87b85c19bd3bc873e48
2019-04-12 18:31:45 +00:00
Peiyong Lin
2a4e6f6e2d Merge "Determine the dataspace of the screenshot buffer based on display color mode." into qt-dev 2019-04-12 16:57:38 +00:00
Eugene Susla
06f0519a01 Make RemoteService propagate Context#bindService failure to PendingRequests
...and fix the attached bug which was caused by infinite wait due to lack
of said signal

Fixes: 129549258
Bug: 126266412
Test: - atest CtsContentCaptureServiceTestCases
- Ensure b/129549258#comment5 no longer reproduces
Change-Id: Id434ce268ca4ae6aa09140a3e17b6d8f476f3d9f
2019-04-12 16:19:08 +00:00
Adrian Roos
03dd48c887 ActivityThread: Preserve windows when relaunching all activities
Fixes flickers that occur during overlay changes.

Bug: 130415897
Test: atest ActivityThreadTest
Change-Id: Iaa52b706bd8426ea34689e21b82e558cb700d5d8
2019-04-12 17:44:56 +02:00
Adrian Roos
76d2f52e3f Merge "System Bars: API to ensure contrast when app requested transparent bar" into qt-dev 2019-04-12 09:43:57 +00:00
Riddle Hsu
4e8e3b0204 Reduce transactions for acquiring and releasing provider
App may access a provider frequently in a short time.
(Without using ContentProviderClient to keep the connection)
Then there will have some overhead for the management of
provider reference. So with a delay to release the provider,
the app can reuse the existing holder within the retain time.

Also change removeContentProvider to a one-way method to reduce
the time spent on app's main thread. This should be safe because
originally the app can acquire provider from any thread.

The cold start time of calendar app can be reduced by ~20ms.

Test: AppLaunchTest
Bug: 123043091
Change-Id: I220cec3deab18b658f4102f7eb9f47599c7c4b7c
2019-04-12 17:37:10 +08:00
Kiyoung Kim
be955e81b1 DO NOT MERGE Do not check product unbundled from Q
This code should be enabled from R, but for some devices it just works
because of target SDK + no /product/lib directory. To avoid confusion
this code should be removed from Q release

Bug: 129011845
Test: m -j
Change-Id: I4d85cbcb5e2cbe694ec065f4e3d060eb74f542ba
2019-04-12 10:52:43 +09:00
TreeHugger Robot
6ce0a59623 Merge changes I98573a5c,Ic7394f24 into qt-dev
* changes:
  Enable checks for MANAGE_TEST_NETWORKS in TestNetworkService
  Cleanup of Test Network service
2019-04-12 00:54:45 +00:00