Commit Graph

15439 Commits

Author SHA1 Message Date
Mehdi Alizadeh
cc33160f6a Merge "Check before closing the CloseGuard if not closed yet" into qt-dev 2019-04-16 18:01:33 +00: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
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
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
TreeHugger Robot
1d66b0b0d0 Merge "Update LoadedApk instead of re-creating on outdated cache" into qt-dev 2019-04-12 00:08:22 +00:00
TreeHugger Robot
73913e3bf6 Merge "Fixing HardwareBuffer leak when creating a bitmap" into qt-dev 2019-04-11 21:06:40 +00:00
David Brazdil
618940c95f Merge "Update AppComponentFactory.instantiateClassLoader docs" into qt-dev 2019-04-11 20:46:24 +00:00
Benedict Wong
b4e98f3b0b Cleanup of Test Network service
This follow-up change performs some cleanup changes without affecting
functionality

Bug: 72950854
Test: Compiles, CTS tests using this pass
Change-Id: Ic7394f24f11d713c9374b438182e29d2a02ea236
Merged-In: Ic7394f24f11d713c9374b438182e29d2a02ea236
(cherry picked from commit 7df36ed96a)
2019-04-11 20:04:06 +00:00
Winson
71cf350f8e Update LoadedApk instead of re-creating on outdated cache
Recreating the entire object drops the mApplication inside,
so multiple Application instances are unexpectedly created.

Instead, call into updateApplicationInfo to replace
the Resources object manually.

Bug: 129890769

Test: device boots, applies overlay paths correctly; was unable
to reproduce a case where the overlays are missing from the
system itself, other Resources/caching changes may have
decreased the occurrence rate

Change-Id: Ib5e7d6ca79ac5b37d5691ce327e3b66cc4672335
2019-04-11 11:36:04 -07:00
Mady Mellor
d8913d7eac Merge "Drop the 'initial' of suppressInitialNotification API" into qt-dev 2019-04-11 16:28:34 +00:00
Adrian Roos
6eb1ed3a61 System Bars: API to ensure contrast when app requested transparent bar
Bug: 129533768
Test: atest EnsureBarContrastTest
Change-Id: I42facefc15dce227193a4db5f368184e1b5ebd32
2019-04-11 16:50:32 +02:00
Ricky Wai
bbde1150c5 Merge "Do not allow moveToFront() and moveTaskToFront() when app is in background" into qt-dev 2019-04-11 13:33:04 +00:00
David Brazdil
1fe58ea321 Update AppComponentFactory.instantiateClassLoader docs
Clarify the intended use and properties of the default class loader.

Bug: 128524313
Test: n/a
Merged-In: Iae82554f9294d5248b98f1fa72fc1a47993e86fd
Change-Id: Iae82554f9294d5248b98f1fa72fc1a47993e86fd
(cherry picked from commit 59a97141c8)
2019-04-11 12:04:52 +01:00
TreeHugger Robot
e8c5311cb0 Merge "Rename capabilities to adjustments" into qt-dev 2019-04-10 22:22:25 +00:00
Sunny Goyal
62915b28e0 Fixing HardwareBuffer leak when creating a bitmap
Callers are supposed to close the hardware buffer themselves. Creating
a utility method around this

Bug: 123874711
Test: No more leak warning on device
Change-Id: I2cf215f0646222f63e564a58edab1ffffa396ff3
2019-04-10 21:59:57 +00:00
TreeHugger Robot
b5258351ea Merge "System Bars: Ensure contrast when app requested transparent bar" into qt-dev 2019-04-10 21:58:42 +00:00
Peiyong Lin
21e499ac88 Determine the dataspace of the screenshot buffer based on display color mode.
Previously when we capture layers into graphic buffer we always assume SRGB
dataspace, however, if we have an app that is in wide color gamut mode, we want
to show the difference. This patch adds the ability to determine the dataspace
screenshot graphic buffer based on the color mode of the display.

BUG: 116112787
Test: Build, flash and boot. Verify with WCG Photos.
Change-Id: Ie2df32cad056576c256b9299a67855ed73714f50
2019-04-10 13:30:51 -07:00
Chad Brubaker
4f10da3f75 Remove appops debug logic
Test: Debug functionality doesn't work anymore
Fixes: 130026461
Change-Id: I8afa95d09e7ff431b9501973c7f6226cd2c95dee
2019-04-10 13:16:03 -07:00
Julia Reynolds
088c448e79 Rename capabilities to adjustments
To match existing API

Test: make, cts
Fixes: 130224929
Change-Id: I881ce11b583b389ee43bad6b45f837c85f949aa5
2019-04-10 14:05:39 -04:00
Mady Mellor
b78bc92ed3 Merge "Make FLAG_BUBBLE public; update some documentation" into qt-dev 2019-04-10 17:33:20 +00:00
Ricky Wai
aca8a770cd Do not allow moveToFront() and moveTaskToFront() when app is in background
Bug: 129063631
Test: Unable to start activity / move task in background
Change-Id: Icb5ebad3567b911719341f221483df1a1512109b
2019-04-10 17:24:30 +01:00
Adrian Roos
4c864595bd System Bars: Ensure contrast when app requested transparent bar
Bug: 129533768
Test: atest EnsureBarContrastTest
Change-Id: Ib8f4045b9e8e7bf65c13437133f114d91d0cb050
2019-04-10 18:16:25 +02:00
Julia Reynolds
dc6adc6ca8 Adjust testapis/permissions for CTS tests
Test: cts
Bug: 127341023
Change-Id: Ice19dc337a06a3f20edca583ecbe5ef3148fd96d
2019-04-09 17:55:39 +00:00
TreeHugger Robot
c007b7f50e Merge "Remove custom lifecycle transitions for onNewIntent callback" into qt-dev 2019-04-09 04:35:20 +00:00
TreeHugger Robot
ac54e30fe5 Merge "Fix job persistence & re-inflation" into qt-dev 2019-04-08 17:17:12 +00:00
Steven Moreland
623b90d65e Merge "ApplicationLoaders: hard failures & tests" into qt-dev 2019-04-08 16:27:21 +00:00
TreeHugger Robot
e9d146ec9a Merge "Remove DELEGATION_PACKAGE_INSTALLATION" into qt-dev 2019-04-08 15:10:59 +00:00
Svet Ganov
d8eb8b2690 Restricted permission mechanism - framework
This change adds a mechanism for restricting permissions (only runtime
for now), so that an app cannot hold the permission if it is not white
listed. The whitelisting can happen at install or at any later point.

There are three whitelists: system: OS managed with default grants
and role holders being on it; upgrade: only OS puts on this list
apps when upgrading from a pre to post restriction permission database
version and OS and installer on record can remove; installer: only
the installer on record can add and remove (and the system of course).

Added a permission policy service that sits on top of permissions
and app ops and is responsible to sync between permissions and app
ops when there is an interdependecy in any direction.

Added versioning to the runtime permissions database to allow operations
that need to be done once on upgrade such as adding all permissions held
by apps pre upgrade to the upgrade whitelist if the new permisison version
inctroduces a new restricted permission. The upgrade logic is in the
permission controller and we will eventually put the default grants there.

NOTE: This change is reacting to a VP feedback for how we would handle
SMS/CallLog restriction as we pivoted from role based approach to roles
for things the user would understand plus whitelist for everything else.
This would also help us roll out softly the storage permisison as there
is too much churm coming from developer feedback.

Exempt-From-Owner-Approval: trivial change due to APi adjustment

Test: atest CtsAppSecurityHostTestCases:android.appsecurity.cts.PermissionsHostTest
Test: atest CtsPermissionTestCases
Test: atest CtsPermission2TestCases
Test: atest RoleManagerTestCases

bug:124769181

Change-Id: Ic48e3c728387ecf02f89d517ba1fe785ab9c75fd
2019-04-07 22:39:54 -07:00
Louis Chang
92d1652fa6 Remove custom lifecycle transitions for onNewIntent callback
Rebased from ag/3785659. This CL switches to using post-execution
state resolution for new intent delivery. Also removes some
unnecessary code needed for old logic.

Bug: 65236456
Bug: 77974794
Test: atest ActivityLifecycleTests
Change-Id: I734ad50de498cd2a6b9514c8ef6cb1eeb08e4ec5
2019-04-08 04:37:50 +00:00
TreeHugger Robot
986f1f4e5f Merge "Add provisioning extra definition to skip education screens" into qt-dev 2019-04-07 10:33:28 +00:00
TreeHugger Robot
b24094f373 Merge "Do not start jit profile in app zygote" into qt-dev 2019-04-06 11:55:48 +00:00
Christopher Tate
7f6acc05db Fix job persistence & re-inflation
We were persisting jobs' battery-not-low constraints but were not
properly restoring that constraint when the job was inflated at boot.
This could result in a runtime bootloop (!) if the job had no other
constraints, requiring a factory reset to restore the device to
usability.

We now:

* properly inflate the battery-not-low constraint;
* persist & inflate the storage-not-low constraint, which previously was
being stripped entirely and could result in a similar crash-at-boot;
* ignore the job rather than crash the system if one is inflated into
a non-viable state; and
* formally test previously-untested constraint persistence

Bug: 130012063
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java
Test: atest CtsJobSchedulerTestCases
Test: JobStoreTest with forced throw in JobInfo.Builder#build()
Change-Id: Ia3ab1eb16aeaa85336409368b4340622cec19f4c
2019-04-05 17:12:28 -07:00
Bo Liu
6c504aebe8 Do not start jit profile in app zygote
Bug: 130031692
Test: Scenario in bug works.
Change-Id: Ia28e8fc60cdf4afd2215b9f2239ca215694fc76c
2019-04-05 14:58:03 -04:00