Commit Graph

7613 Commits

Author SHA1 Message Date
Automerger Merge Worker
02f173032d Merge "Updates based on API council feedback." into rvc-dev am: 16c9fb8c0f
Change-Id: Ie75cfe17f09f5db7d424d921b1408354c224d8b9
2020-03-08 21:08:34 +00:00
Jeff Sharkey
16c9fb8c0f Merge "Updates based on API council feedback." into rvc-dev 2020-03-08 20:59:38 +00:00
Automerger Merge Worker
3b1ab4d138 Merge "Support PowerHAL AIDL service" into rvc-dev am: 73e2b381f0
Change-Id: I7d8e696ee742905167013438d1b964aa2bbe0966
2020-03-07 06:47:14 +00:00
Jia-yi Chen
73e2b381f0 Merge "Support PowerHAL AIDL service" into rvc-dev 2020-03-07 06:27:22 +00:00
Jeff Sharkey
f5eebf9fe6 Updates based on API council feedback.
-- Promote generally-useful PFD API to public.
-- Add @WorkerThread annotations.
-- Add docs to explain how AUTHORITY_LEGACY works, and add explicit
START/FINISH_LEGACY_MIGRATION_CALL verbs to communicate progress.
-- Expand docs for createWriteRequest() to explain broader access
that it grants.  Expand all request methods to indicate the action
is fully completed before the result is delivered.
-- Expand docs for new generation fields to explain that version
also needs to be inspected.
-- Explicitly call out why getKindSize() is deprecated, and guide
towards better alternative.

Bug: 148867182, 148403418, 148011561, 147760276
Test: none
Change-Id: I54ff072a752497b6aba153bd4013567c269e5b19
2020-03-06 14:42:00 -07:00
Jia-yi Chen
bfd8f1f74d Support PowerHAL AIDL service
Bug: 147840082
Test: Boot & check logs
Change-Id: Iccdaf84053e0974ffb43857aaa2e382d2f1b4a6b
2020-03-06 10:08:30 -08:00
Automerger Merge Worker
97903a77f5 Merge "BatteryStatsManager: Address API council feedback" into rvc-dev am: 03a65f1a5e
Change-Id: I450b5a6a346f8092ba0e084b2054d918337876a0
2020-03-06 09:48:08 +00:00
Automerger Merge Worker
8d4c23bca4 Merge "Clarify getCallingPid for oneway transactions." am: 26bbd81bd6 am: 79e3174053
Change-Id: I53ae60643905018ecbae910d30b4adb1224fdf03
2020-03-06 00:42:08 +00:00
Yifan Hong
47af8f93b8 Merge "UpdateEngine: fix cleanupAppliedPayload impl" into rvc-dev 2020-03-05 22:57:08 +00:00
TreeHugger Robot
03a65f1a5e Merge "BatteryStatsManager: Address API council feedback" into rvc-dev 2020-03-05 21:42:12 +00:00
Steven Moreland
26bbd81bd6 Merge "Clarify getCallingPid for oneway transactions." 2020-03-05 20:48:07 +00:00
Steven Moreland
61c5f8e68b Clarify getCallingPid for oneway transactions.
Seems this frequent gotcha is not documented here.

Bug: N/A
Test: N/A
Change-Id: Ia186cd8b9945b75b8342b0750713d8667cfef064
2020-03-05 19:20:37 +00:00
Roshan Pius
cdf5744a77 BatteryStatsManager: Address API council feedback
Bug: 144925883
Test: Compiles
Change-Id: Ibdc61769965a97222fdd968084eca71b997e8feb
2020-03-05 10:34:24 -08:00
Automerger Merge Worker
1c9a46675b Merge "UpdateEngine: fix cleanupAppliedPayload impl" am: 54aba47b29 am: a339e2def4
Change-Id: Ie524b232ebba3ecdeeceaeddf61468ac7394e1c5
2020-03-05 17:17:13 +00:00
Automerger Merge Worker
a339e2def4 Merge "UpdateEngine: fix cleanupAppliedPayload impl" am: 54aba47b29
Change-Id: I9ff3ddc4dbf17d8d6401fc7c14ee8b16d7aafb2b
2020-03-05 17:00:50 +00:00
Yifan Hong
54aba47b29 Merge "UpdateEngine: fix cleanupAppliedPayload impl" 2020-03-05 16:41:16 +00:00
Songchun Fan
7f051b5251 remove proxy binder service IIncrementalManager
This is no longer needed because native Incremental Service directly
uses IDataLoaderManager.

BUG: 150406132
Test: atest service.incremental_test
Test: atest PackageManagerShellCommandIncrementalTest
Change-Id: Idbde2988883becbf3eb707d42c0558774a6073e8
2020-03-04 19:50:44 -08:00
Automerger Merge Worker
627bfca085 Merge "Start process of next activity with top priority in advance" am: efbcd6752d
Change-Id: I8e8dd0f20cd3a783e49468a7657e571812bca3eb
2020-03-04 23:54:10 +00:00
Songchun Fan
ecd96c2be4 Merge "make IDataLoaderManager and IDataLoader stable interfaces" into rvc-dev 2020-03-04 22:53:12 +00:00
Yifan Hong
8b0eedf99c UpdateEngine: fix cleanupAppliedPayload impl
IUpdateEngine.cleanupSuccessfulUpdate is now asynchronous with a callback.
Update UpdateEngine.cleanupAppliedPayload accordingly to use the new impl.

Bug: 147696014
Test: apply OTA
Change-Id: I9b308316dcb8e6a507063d3060fed7693da82a19
2020-03-04 11:38:59 -08:00
Songchun Fan
6381d6193e make IDataLoaderManager and IDataLoader stable interfaces
Instead of using Bundle, explicitly specify params when initializing a data loader.

BUG: 150406132
Test: atest PackageManagerShellCommandIncrementalTest
Change-Id: I2f89d3c3ea1058fdbd689da0d5cb801bf4d9a0b4
2020-03-03 21:18:30 -08:00
Kweku Adams
ede42f99ed Add PowerWhitelistManager.isWhitelisted.
The "XXXExceptIdle" lists and methods are expected to be a superset of
the XXX methods. That's not immediately obvious from the method names.
This effort is to clean up the naming and better document actual
behavior. As part of this, we're moving the isApplicationWhitelisted
methods to PowerWhitelistManager to also help clean up the interface
between the apex and the rest of the system.

Bug: 142420609
Bug: 144864180
Bug: 145014493
Test: atest CtsBatterySavingTestCases:DeviceIdleTest
Test: atest CtsSecurityTestCases:DeviceIdleControllerTest
Test: atest FrameworksServicesTests:AppStandbyControllerTests
Change-Id: I1d248a075992e2dc279a7bfec44f38c7e51780b4
2020-03-03 17:03:04 -08:00
Riddle Hsu
364f2500e5 Start process of next activity with top priority in advance
In common cases, to resume the next activity we need to wait for the
current one to be paused. Since starting a process for activity is
asynchronous, if we already know the process of next activity has not
started yet, we can start the process earlier so the time waiting for
the pause to complete can be saved.

Also if the launching activity is going to be the top app, we can set
the top schedule group right after its process is started so the start
time before actually launching the activity can be improved.

Although before the current activity is paused, the next top activity
may still change and results some empty processes. That should not be
a common case and the process is still useful when going back the stack,
and the empty background processes are easier to be reclaimed.

Bug: 123043091
Test: AppLaunchTest
Test: Launch calculator from launcher, the event log am_proc_start will
      show "pre-top-activity".
Test: Cold launch a top activity, the system log should not show
      "not expected top priority".
Test: Use startActivities to start serveral activities in a sequence.
      Check "adb shell cat /proc/$pid/task/$pid/cgroup" for each process.
      Only the last one has top-app, others are background.

Change-Id: I9601b66e7cc0855fd7c2b573ded31fcf8d0711ae
Merged-In: I9601b66e7cc0855fd7c2b573ded31fcf8d0711ae
2020-03-03 16:36:46 -08:00
Yifan Hong
a962ca6700 UpdateEngine: fix cleanupAppliedPayload impl
IUpdateEngine.cleanupSuccessfulUpdate is now asynchronous with a callback.
Update UpdateEngine.cleanupAppliedPayload accordingly to use the new impl.

Bug: 147696014
Test: apply OTA
Change-Id: I9b308316dcb8e6a507063d3060fed7693da82a19
2020-03-03 12:13:10 -08:00
Songchun Fan
b8ab0034c6 dataloader/incfs openWrite returns int
Plus minor refactors

BUG: 150470163
Test: atest PackageManagerShellCommandIncrementalTest
Change-Id: Ib3a1c7c45a4abaab793be73213545ce91c98510b
Merged-In: Ib3a1c7c45a4abaab793be73213545ce91c98510b
2020-03-03 10:18:56 -08:00
Songchun Fan
38dfe9a0d4 use shell to open v4 signature file
BUG: 133435829
Test: atest PackageManagerShellCommandIncrementalTest
Change-Id: I8e57b00f042f8b6c85d5f905460dd2da6199accc
(cherry picked from commit cdbcb34c2b)
2020-03-03 09:48:02 -08:00
SongFerngWang
53515a0ea6 CellularBatteryStats: Address API council feedback
Bug: 144925883
Test: Build pass, device boots up
atest TelephonyMetricsTest

Change-Id: Iac5904a3397a42aa5f015cb53bb63318f5c377a4
Merged-In: Iac5904a3397a42aa5f015cb53bb63318f5c377a4
(cherry picked from commit 84dc30fede)
2020-03-02 05:15:08 +00:00
Paul Chang
af730a12bd Merge "Improvements to Bugreporting API." into rvc-dev 2020-02-29 00:20:04 +00:00
Ytai Ben-Tsvi
d5065ba8a5 Pass models to soundtrigger middleware with shared memory
This both avoids the need to make extra copied for the models and
allows exceeding the parcel size limits.

Bug: 150100907
Test: Manual testing of basic sound trigger functionality
Change-Id: Ic4c5c1a9de3e29b1b6fa82442254e1afe7daec19
2020-02-28 13:01:24 -08:00
Paul Chang
1a44ed3a18 Improvements to Bugreporting API.
- Show a toast to indicate screenshot is taken.

BUG:149525300
Test: Flash and press bug report shortcut and check the toast
Change-Id: Ib210c8855d2b588b51f883e32070c8b748ea4e3f
Merged-In: Ib210c8855d2b588b51f883e32070c8b748ea4e3f
2020-02-28 17:14:48 +00:00
Chris Wailes
ee398f9664 Adds Zygote policy flags to control how applications are launched
This patch adds a zygote policy parameter to functions in the
ActivityManagerService (and associated classes) to allow for different
launch behavior based on the triggering event.  This will allow for
latency sensitive applications to utilize the Unspecialized App Process
Pool, without other processes draining the pool and causing excessive
refill events.

Test: Booted and launched several apps
Bug: 147613193
Change-Id: Ib0a51c8720f95a7eafcab4ad2b5bb08f27a58d8c
(cherry picked from commit 4d05188588)
2020-02-27 20:33:12 +00:00
Makoto Onuki
9577cd78ff Merge "Squash same ApplicationInfo's in Parcel" into rvc-dev 2020-02-25 15:17:14 +00:00
Makoto Onuki
2d80ca09fc Squash same ApplicationInfo's in Parcel
ApplicationInfo now automatically tries to "squash" the same instances in a
Parcel.

NOTE: This CL still does *not* optimize the package manager APIs that return a
list. e.g. PM.queryContentProviders() still return duplicate AppInfo's.
We can optimize them by making ParcelableListSlice call "allowSquashing",
but that *could* have negative side effects, so I'm not doing it in this CL.
I think we can do that for S.

Bug: 148588589
Test: atest CtsContentTestCases # except for two preexsiting failures:
- android.content.pm.cts.PackageManagerTest#testGetIcon
- android.content.pm.cts.PackageManagerTest#testGetPreferredActivities

Test: Use the debugger and make sure bindApplication() is not receiving
duplicate AppInfo's in the provider list.

Change-Id: I3ba2c047a469169340c0f75c36bdfd394bc5d627
(cherry picked from commit 7d09275d70)
2020-02-24 22:22:13 +00:00
Automerger Merge Worker
026c077b36 Merge "Add DSU default userdata partition size" am: 59d40857ad
Change-Id: I90d675f1ff0426c751b77442c6ce1c6e09fe6c72
2020-02-24 09:26:22 +00:00
Yo Chiang
9834448ca1 Add DSU default userdata partition size
Use DEFAULT_USERDATA_SIZE as userdata partition size if the calling
Intent desn't specify the userdata size or the specified size is zero.

Bug: 145891687
Test: adb shell am start-activity \
  -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
  -a android.os.image.action.START_INSTALL \
  -d file:///storage/emulated/0/Download/aosp_arm64-dsu_test.zip

Merged-In: I52767dfefef394403c5e16fcfd40792b14ff9a71
Change-Id: I52767dfefef394403c5e16fcfd40792b14ff9a71
(cherry picked from commit f41e145480)
2020-02-24 17:13:20 +08:00
Yo Chiang
f41e145480 Add DSU default userdata partition size
Use DEFAULT_USERDATA_SIZE as userdata partition size if the calling
Intent desn't specify the userdata size or the specified size is zero.

Bug: 145891687
Test: adb shell am start-activity \
  -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
  -a android.os.image.action.START_INSTALL \
  -d file:///storage/emulated/0/Download/aosp_arm64-dsu_test.zip

Change-Id: I52767dfefef394403c5e16fcfd40792b14ff9a71
2020-02-24 15:06:56 +08:00
Sudheer Shanka
77f2a2c3dd Merge "Update BlobStoreMS to augment storage stats with blobs data." 2020-02-21 19:28:09 +00:00
Chris Ye
e078ee507e Merge "Add native Thermal Throttling API to libandroid." 2020-02-21 03:21:18 +00:00
Iavor-Valentin Iftime
4eb7c72945 Merge "Address API council suggestions for UserManager APIs" 2020-02-20 20:35:44 +00:00
Valentin Iftime
4bf82c8206 Address API council suggestions for UserManager APIs
Test: atest UserManagerTest
Bug: 149742406
Change-Id: I8b408a17de0282b91fcb5c0b66e9d0404fda54b1
2020-02-20 14:29:43 +01:00
Charles Chen
c56ce6fd08 Merge "Exempt-From-Owner-Approval: Report non-visual Context misuse" 2020-02-20 12:30:06 +00:00
TreeHugger Robot
58a8b7f51d Merge "Switch to new project ID constants." 2020-02-20 07:59:07 +00:00
Andrii Kulian
5877c7d6c0 Exempt-From-Owner-Approval: Report non-visual Context misuse
Make obtaining a visual service from non-visual Context instance
report a strict mode violation and print the stacktrace.

Make calling getDisplay() throw an exception if called on an instance
that is not associated with a display. For existing usages introduce
a new internal method that does not perform the verification until
the usages are properly fixed.

Bug: 128338354
Test: StrictModeTest#testIncorrectContextUse_GetSystemService
Test: StrictModeTest#testIncorrectContextUse_GetDisplay
Change-Id: Id25d590eca6e10066e55d7ed6436d3bc9e433beb
2020-02-20 01:29:25 +00:00
Chris Ye
48dbcaae41 Add native Thermal Throttling API to libandroid.
Add native thermal manager API of thermal mananger service into
libandroid. Export Thermal API as NDK library.

Bug: 137151587
Bug: 136285293
Test: build, atest thermalmanager-test atest CtsThermalTestCases

Change-Id: Ia49fb2133624ffcd6168af804ae612ef2bb190f2
2020-02-19 16:25:25 -08:00
Sudheer Shanka
e9232d6d6f Update BlobStoreMS to augment storage stats with blobs data.
- Any pending sessions data is attributed to the apps
  which contributed them.
- Any commited blobs data is attributed to the app which
  has a lease on it. If multiple apps have lease on a blob, don't
  attribute the blob to those apps for now.
- Remove StorageStatsAugmenter.augmentStatsForUser as it
  is not used for anything currently.
- Fix an issue in how we override existing committers and leasees.

Bug: 148694869
Test: atest cts/tests/BlobStore/src/com/android/cts/blob/BlobStoreManagerTest.java
Test: atest tests/tests/os/src/android/os/storage/cts/StorageStatsManagerTest.java
Test: atest hostsidetests/appsecurity/src/android/appsecurity/cts/StorageHostTest.java
Test: manual
Change-Id: Ia4af0a2549c75db66741f2d1979de95d2d150bc8
2020-02-19 14:45:12 -08:00
Yurii Zubrytskyi
df7c050e16 Add a version field to the v4 signature file format
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest
Bug: b/136132412 b/133435829
Change-Id: I09fd36eb5914f59d63c5c244e34db75aa4f43639
2020-02-19 14:03:23 -08:00
Ricky Wai
62048287d9 Merge "Bind mount obb directory in emulated storage." 2020-02-19 19:42:13 +00:00
Pavel Grafov
fba650eaed Merge "Add "Forgot my password" to start profile in locked state." 2020-02-19 19:09:20 +00:00
Dan Stoza
a6781c835d Merge "Add PowerManager#getThermalHeadroom" 2020-02-19 18:18:31 +00:00
Martijn Coenen
fd12f36fb9 Switch to new project ID constants.
These are used on devices without sdcardfs.

Bug: 146419093
Test: lsattr -pR
Change-Id: I87c900d409c90770fb3eaa595324dab385458c6c
2020-02-19 16:04:02 +01:00