Commit Graph

8409 Commits

Author SHA1 Message Date
Tianjie Xu
4eaa49eeb6 Merge "Add a system API UpdateEngine to switch the slot back and forth" 2021-07-27 02:03:10 +00:00
Tianjie
dcbd9ea138 Add owner file for UpdateEngine
Test: th
Change-Id: I50c775874cb9ad54f049e415b6fb68ec29d7f1c8
2021-07-23 17:15:43 -07:00
Bowgo Tsai
1241c9b6f2 Revert "Add systrace tag for system property"
Revert "Add systrace tag for system property"

Revert "Adding system property tracing"

Revert submission 1403568-sysprop_trace

Reason for revert: makes property get/set non-reentrant
Reverted Changes:
I6f85f3f52:Add systrace tag for system property
Id2b93acb2:Adding system property tracing
Id78992d23:Add systrace tag for system property
I1ba9fc7bd:Add systrace tag for system property

Bug: 193050299
Change-Id: Iaf522b403e51abcf1d49804f35a184b4aa0d3209
Merged-In: Iaf522b403e51abcf1d49804f35a184b4aa0d3209
Test: build and boot a device
(cherry picked from commit 137d78bb67)
2021-07-21 09:24:29 +08:00
Tianjie
fdf7b58a43 Add a system API UpdateEngine to switch the slot back and forth
In some cases, the OTA update want to flip the slot to source
without cancelling the entire update. The functionality was
achieved by ResetStatus(). However ResetStatus() will clean up
the update progress and free up space to support virtual A/B.

Details in http://go/no-virtual-ab-switch-off

Test: build
Bug: 187321613
Change-Id: I2abcf8289f5fd573d2b55fa7004ab4dcd175252f
2021-07-20 15:29:37 -07:00
Treehugger Robot
54c9ff981e Merge "Added Ble scan APIs to BatteryStatsManager" 2021-07-19 15:32:41 +00:00
Remi NGUYEN VAN
8608d0626e Merge "Rename FIRST_SDK_INT to DEVICE_INITIAL_SDK_INT" 2021-07-19 09:47:21 +00:00
Etienne Ruffieux
29cb9a7c90 Added Ble scan APIs to BatteryStatsManager
Added missing service functions to manager to prevent directly
calling BatteryStatsService from Bluetooth package. Updated
system-current.txt accordingly.

Tag: #feature
Bug: 190442794
Test: Manual
Merged-In: Ie6c6d3688d2da45956d57ea1dbc2cc4430f27783
Change-Id: Ie6c6d3688d2da45956d57ea1dbc2cc4430f27783
2021-07-15 16:40:57 +00:00
Kalesh Singh
ecec60e0e1 Add API to get GPU private memory
Remove getGpuDmabufUsageKb since the kernel no longer
supports the sysfs nodes that this depends on.

Add getGpuPrivateMemoryKb which uses the memtrack hal
to report the system-wide GPU private memory.

Bug: 193226716
Bug: 193465681
Bug: 192621117
Test: dumpsys meminfo
Change-Id: Ib90505ec184339d5acbcd42c67dad3ad65dbd933
Merged-In: Ib90505ec184339d5acbcd42c67dad3ad65dbd933
2021-07-14 21:18:40 +00:00
paulhu
670abcd53d Rename FIRST_SDK_INT to DEVICE_INITIAL_SDK_INT
As API review feedback, rename Build#VERSION#FIRST_SDK_INT to
Build#VERSION#DEVICE_INITIAL_SDK_INT. As well as update all usage
in frameworks and tests.

Bug: 184735771
Test: m
Merged-In: I72660959cb4e638a8e80fcf2f4e96ea172969f44
(cherry-pick with minor conflicts)

Change-Id: I72660959cb4e638a8e80fcf2f4e96ea172969f44
2021-07-05 14:10:16 +09:00
Xin Li
48e70ad8bc DO NOT MERGE - Merge ab/7272582
Bug: 190855093
Merged-In: I81c036a8484d14683db9450b55bd379c7a728d73
Change-Id: I71fe9744d88740a8d95235ddb4c8ab91881473ce
2021-06-14 22:01:46 -07:00
Treehugger Robot
8ceda33e96 Merge "Add documentation to Vibrator on foreground/background app behavior" 2021-05-26 18:43:56 +00:00
Steven Moreland
58787794eb Merge "Revert "binder: race condition by parcel finalize"" 2021-05-25 17:23:35 +00:00
Steven Moreland
a926598e89 Revert "binder: race condition by parcel finalize"
Revert "binder: race condition by parcel finalize"

Revert submission 1553275-Bug139327211_V5

Reason for revert: causing a different race condition? b/187218964
Reverted Changes:
I9345f4439:binder: race condition by parcel finalize
Ib06e38e22:binder: race condition by parcel finalize

Change-Id: Iebf76febdad5e231c814f1f8de454931cb9352c5
2021-05-24 19:56:04 +00:00
Meng Wang
ffb1899ba2 Merge "PersistableBundle.restoreFromXml should return a mutable bundle." 2021-05-20 19:13:26 +00:00
Patrick Baumann
1ef34e9022 Merge changes I04dfc5c2,Idc7e1f3c
* changes:
  Updates OWNERS files
  Update OWNERS file.
2021-05-18 19:03:06 +00:00
Patrick Baumann
e6c0a4f8ce Updates OWNERS files
Bug: 186864416
Test: Builds
Change-Id: I04dfc5c2c7143825334ebc62742e335b8c889492
2021-05-14 15:45:42 +00:00
Gavin Corkery
fbc73d84cd Add per-file bugreporting OWNERS
Test: Builds
Bug: 188024968
Change-Id: Id4cf779314460ce5909ec14c84af063890b0dbca
2021-05-13 14:17:33 +01:00
Anton Hansson
dbf1544b68 Merge "Inline two constants from CorePlatform" 2021-05-11 09:00:57 +00:00
Remi NGUYEN VAN
0ef41fbca2 Add back @UnsupportedAppUsage to IS_DEBUGGABLE
The annotation was removed when adding the constant to the public API,
but it was removed from the public API in favor of Build.isDebuggable() in
a later change.

Add back the @UnsupportedAppUsage annotation that should have been
added back when removing the constant from the public API.

Change-Id: Ic2fda01a8c0e90712a1b7b435443d32f7e226d33
Fixes: 187432390
Test: m
2021-05-10 14:45:38 +00:00
Anton Hansson
4e86dcad12 Inline two constants from CorePlatform
Inlining these constants allow the public api metalava run to depend on
ART's public API rather than the "internal" CorePlatform API, which
prevents picking up unintentional classes (such as annotations) from the
CorePlatform API in the public stubs.

Because these constants get inlined in the API/stubs, and the constants
have been finalized for many years, they can never change. Because they
cannot change, reusing the constant is of limited value. I've added
some comments to point readers to other places the constant is used.

Bug: 154796679
Test: m checkapi
Change-Id: I0b347a2964cfe5a1206145fdc56934727b890469
2021-05-10 10:28:02 +01:00
Treehugger Robot
3736d7ac1b Merge "Call apexd's API to allocate space before install non-AB package" 2021-05-08 21:44:57 +00:00
Kelvin Zhang
a48c18e3df Call apexd's API to allocate space before install non-AB package
When installing a non-AB package, if the OS comtains compressed apexes,
we need to allocate space for these apexes so that they can be properly
decompressed on the next reboot.

Test: adb shell cmd recovery install-package /data/ota_package.zip
Change-Id: Ia40d0614e0e724cfb17e91720ec88a15795bd8ee
2021-05-04 15:07:56 -04:00
Inseob Kim
4055ce5313 Add an api for platform sepolicy version to vintf
PLATFORM_SEPOLICY_VERSION will be the latest version in system's
compatibility matrix. This change adds a function
getPlatformSepolicyVersion, which ultimately gets
PLATFORM_SEPOLICY_VERSION, just like getSepolicyVersion for vendor.

This will be used from the SELinux CTS.

Bug: 186596569
Test: atest CtsSecurityHostTestCases:android.security.cts.SELinuxNeverallowRulesTest
Change-Id: Ic7863ece9413b9a6a4a91ff42d3121935823fe8b
2021-05-04 12:53:52 +00:00
Steven Moreland
0da4dcceea Merge "ServiceManagerNative: update for updatableViaApex" 2021-04-21 20:17:44 +00:00
Tianjie Xu
27dcfb808c Merge "Catch security exceptions in RoR APIs" 2021-04-21 03:22:56 +00:00
Steven Moreland
021f3e3d3f ServiceManagerNative: update for updatableViaApex
See if a VINTF instance is updatable via APEX.

Bug: 185832616
Test: N/A
Change-Id: I3413707eb18beae1ac417a92e9082655f6d07f11
2021-04-21 00:28:53 +00:00
Meng Wang
9c5f71f364 PersistableBundle.restoreFromXml should return a mutable bundle.
Issue:
  Currently, restoreFromXml/readFromStream returns an immutable
  PersistableBundle.EMPTY when the underlying XML file is
  ill-formatted. Otherwise it returns a mutable one.
  This inconsistent behavior easily causes crash when returned
  PersistableBundle is mutated.

Fix:
  Make restoreFromXml consistently return a mutable
  PersistableBundle.

Bug: 185436202
Test: make
Change-Id: I3c9ab4df9f0fea2d46d1c9b72ffd4b65790180b2
2021-04-19 21:23:10 +00:00
Jing Ji
598675abef Merge "Update Kotlin sample code for CountDownTimer and Parcelable" 2021-04-19 19:23:06 +00:00
Jing Ji
18de9f0156 Update Kotlin sample code for CountDownTimer and Parcelable
Also fixed a typo in the javadoc of android.os.Debug

Bug: 155869891
Bug: 152033307
Bug: 177360175
Test: m -j ds-docs
Change-Id: I52da37d24ab224344f931fed558df86f250bf86f
2021-04-14 12:00:56 -07:00
Tianjie Xu
246c14d6da Merge "Improve the error handling for armRebootEscrow" 2021-04-14 05:23:07 +00:00
Chiachang Wang
bd1cc4f2a2 Merge "Make getUid a method on UserHandle itself instead of static" 2021-04-13 08:15:47 +00:00
Chiachang Wang
ad274e531a Merge "Remove throws RuntimeException from APIs" 2021-04-12 02:57:51 +00:00
Tianjie Xu
d5547af728 Merge "Expose error code for RoR reboot system API" 2021-04-09 22:07:29 +00:00
Tianjie
6066898f42 Improve the error handling for armRebootEscrow
The change including the following items
1. Add error code for armRebootEscrow
2. Fail the armRebootEscrow for mismatching ror providers.
3. clear the escrow data for fatal armRebootEscrow
4. clear the RoR preparation state in recovery system for fatal
   armRebootEscrow

Bug: 183140900
Test: atest FrameworksServicesTests:RebootEscrowManagerTests;
      atest FrameworksServicesTests:RecoverySystemServiceTest;
      Change provider before reboot, reboot-and-apply failed;
Change-Id: I266ea6f2e1c77994d5cc8c2713106c527c4e0722
2021-04-09 13:18:18 -07:00
Remi NGUYEN VAN
116bab20ab Merge "Replace IS_DEBUGGABLE with isDebuggable module API" am: ba77876dbd am: 4290766ae7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1667304

Change-Id: Iaec8ac01bbb518af8e14c0936cf8d8f2f75d8dd4
2021-04-09 01:24:14 +00:00
Tianjie
559ed7f0f0 Expose error code for RoR reboot system API
The clients of resume on reboot want additional information for
reboot failures, so they can handle these failures better.
Therefore expose the reboot failure error code via SystemApi.

Bug: 183646725
Test: atest FrameworksServicesTests:RecoverySystemServiceTest;
      Do an RoR with gmscore
Change-Id: Ia02655218194a070ce02e9dae6fd62e19259c9f9
2021-04-08 17:54:29 -07:00
Chiachang Wang
d171bcbd01 Make getUid a method on UserHandle itself instead of static
This commit addresses the API review feedback that getUid()
will be better to make it be a method on UserHandle itself
rather than a static method.

Update as it is and update the corresponding usages.

Fix: 184735865
Test: make update-api
Test: atest FrameworksNetTests
Test: atest CtsNetTestCasesLatestSdk
Change-Id: I33844309224d84764704255d251fadc8940202ca
2021-04-09 08:33:07 +08:00
Remi NGUYEN VAN
b5f095ebf0 Replace IS_DEBUGGABLE with isDebuggable module API
Introduce a Build.isDebuggable() getter instead of the IS_DEBUGGABLE
static member.

Also make it module API as APK modules now have access to module APIs in
S, but also TestApi so it can be tested.

Test: m
Fixes: 182345786
Change-Id: I25d0848aee758792bbaba8ab73b5dd997a7250b3
2021-04-08 13:50:31 +09:00
Chiachang Wang
221e2c77ad Remove throws RuntimeException from APIs
As API review feedback, the information provides no value to a
user. Remove it from BatteryStatsManager#reportWifiRadioPowerState
and BatteryStatsManager#reportMobileRadioPowerState.

Fix: 184735838
Test: make update-api
Change-Id: I8cce6523695ba58654cbe5d1db79045eeb46d913
2021-04-08 09:44:12 +08:00
Treehugger Robot
5c9c0e7622 Merge "Address API feedback on SKU/ODM_SKU" am: 599f545969 am: 210b7a542b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1658040

Change-Id: I21ecac025395c23702ee59e93a72b50326798d8d
2021-03-31 14:46:12 +00:00
Robin Lee
ddbe3e08ac Address API feedback on SKU/ODM_SKU
Change-Id: Iec5fe90dd172c9d45442731485da27c71039ac2f
Test: atest android.os.cts.BuildTest
Bug: 180419023
2021-03-30 17:07:02 +00:00
George Chang
f5dcd90370 Merge changes from topic "update_NFCC_Always_on" am: 7b7b809587 am: 6a6d92ff09
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655107

Change-Id: Ie96dfbcd9e37a1e76faa2efbea2fc146a42e82f9
2021-03-30 03:07:50 +00:00
Tianjie
5cdc8a48e8 Catch security exceptions in RoR APIs
The security exceptions in RoR API caused the OTA reboot to stuck.
Since the error isn't related to the input of clients and clients
already have a fallback path; catch and and rethrow the security
exception as an IOException.

Bug: 183475757
Test: OTA falls back to normal reboot upon security exceptions
Change-Id: I359f2f85bd1f0f8734011aa2db24dd7abe0aaa03
2021-03-29 14:36:04 -07:00
George Chang
ba34121efc Make NFC_UID TestApi
Bug: 182979907
Test: atest android.permission.cts.NfcPermissionTest
Test: atest android.net.wifi.cts.WifiManagerTest
Change-Id: Id007984bcd03b5892bd774673c8c0ab836032fc9
2021-03-28 22:28:06 +08:00
Steven Moreland
e86ea5d7d4 Merge "Binder: allow stability downgrade" am: 7236cf6dca am: 0852de16cb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1651544

Change-Id: I5f0e1dcb3a06dcb35bf2c68f077afbe32a4e8088
2021-03-26 03:14:29 +00:00
Steven Moreland
bf6bbc60aa Binder: allow stability downgrade
For instance, use a VINTF interface inside the system image without
adding it to the VINTF manifest (e.g. for testing, in this case, the
interface can't be used between system and vendor).

Bug: 183154648
Test: N/A
Change-Id: I9ceb5d96e6a245b9509d9c60828aa3736056909d
2021-03-24 01:26:04 +00:00
Jeff Sharkey
a7913a0656 Merge "Expose VPN_UID" am: 58f7a60187 am: 8710bc1755
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625699

Change-Id: Idb15fe2671eac19159cc7f58319cdff7d4663bee
2021-03-17 22:00:22 +00:00
Peter Collingbourne
1dec957d68 Merge "Add support for a hw_timeout_multiplier system property." am: 7fe1ca63df am: 3c8dbe30d6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556750

Change-Id: Iaec0f4e259ebb1251c534fbf01081f89272c44b7
2021-03-17 20:49:31 +00:00
Jeff Sharkey
58f7a60187 Merge "Expose VPN_UID" 2021-03-17 20:38:41 +00:00
Peter Collingbourne
7fe1ca63df Merge "Add support for a hw_timeout_multiplier system property." 2021-03-17 18:18:51 +00:00