Commit Graph

8382 Commits

Author SHA1 Message Date
Tianjie Xu
f3bde71026 Merge "Improve the error handling for armRebootEscrow" am: 246c14d6da am: cd4836d197
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649651

Change-Id: I6aabf1250d67f6a79711e89fb05c68bf84849656
2021-04-14 06:32:31 +00:00
Tianjie Xu
246c14d6da Merge "Improve the error handling for armRebootEscrow" 2021-04-14 05:23:07 +00:00
Chiachang Wang
155b09614e Merge "Make getUid a method on UserHandle itself instead of static" am: bd1cc4f2a2 am: 6b7167e807
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669185

Change-Id: Icc006ab751a1a03aa3c09c1999a6141ff061081d
2021-04-13 11:54:57 +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
3e04c95255 Merge "Remove throws RuntimeException from APIs" am: ad274e531a am: d07131cb98
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669005

Change-Id: I49359b27fb64573129cec3b1a5fe345257956521
2021-04-12 04:18:49 +00:00
Chiachang Wang
ad274e531a Merge "Remove throws RuntimeException from APIs" 2021-04-12 02:57:51 +00:00
Tianjie Xu
133568e964 Merge "Expose error code for RoR reboot system API" am: d5547af728 am: 2cf5387b09
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1656644

Change-Id: I96d48a205fb1f2d3a6b353e2b2ea36383c20eb2f
2021-04-09 23:26:15 +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
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
lucaslin
e4ea3d4c84 Expose VPN_UID
ConnectivityService will be a part of mainline module, so it
cannot access hidden API. Expose VPN_UID for ConnectivityService
to access.

Bug: 170598012
Test: m
Change-Id: I9f74fb97ba27e5feacf1820cf75e28ad73516d7d
2021-03-17 19:04:01 +08:00
Treehugger Robot
de535f6eb2 Merge "Use ro.boot.qemu to check if the device is an emulator" am: 62d82e0b33 am: 4ba8fde9ba
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625662

Change-Id: I039b17ca0bf956ee3d86c72edcbf81957938ae4b
2021-03-16 17:17:20 +00:00
Peter Collingbourne
6353c57d57 Add support for a hw_timeout_multiplier system property.
In order to test the platform in emulators that are orders of magnitude
slower than real hardware we need to be able to avoid hitting timeouts
that prevent it from coming up properly. For this purpose introduce
a system property, ro.hw_timeout_multiplier, which may be set to
an integer value that acts as a multiplier for various timeouts on
the system.

Bug: 178231152
Change-Id: I6d7710beed0c4c5b1720e74e7abe3a586778c678
Merged-In: I6d7710beed0c4c5b1720e74e7abe3a586778c678
2021-03-11 14:04:18 -08:00
Roman Kiryanov
d6a9f42566 Use ro.boot.qemu to check if the device is an emulator
`ro.kernel.qemu` is deprecated.

Bug: 182291166
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: Id42d79af90b1fe7e182a96c53c84248e81a7c259
2021-03-10 23:41:31 -08:00
Jeff Sharkey
5c1ad2c60d Merge "Make FileUtils#createDir threadsafe" am: 5232082243 am: bc1b11029b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1623101

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id70ab2f8c4a73d74e6b0e63353e66521bd6c3581
2021-03-10 23:34:36 +00:00
Jeff Sharkey
5232082243 Merge "Make FileUtils#createDir threadsafe" 2021-03-10 22:02:14 +00:00
Jeff Sharkey
dce433b181 Merge "Update OWNERS file for GraphicsEnvironment" am: 5b7186f65d am: f4a2795bb8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1623124

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib9be0b00869616ae72f6a51be4732693b7f66b22
2021-03-09 19:59:04 +00:00
Jeff Sharkey
5b7186f65d Merge "Update OWNERS file for GraphicsEnvironment" 2021-03-09 18:40:42 +00:00
Yiwei Zhang
0400f05249 Update OWNERS file for GraphicsEnvironment
Test: build
Change-Id: I077a9ea03ada04608396f40f153527cc22ea83ca
2021-03-09 18:25:37 +00:00
Lais Andrade
3afe20a305 Merge "Clarify delay parameter documentation in VibrationEffect" am: 2b9f0c7623 am: cdbc51fa52
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1622280

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iba4b8b136fae23b31a4f20ad54e66104876745b1
2021-03-09 13:05:43 +00:00
Aaron Huang
3913bb35c1 Add a new API in BatteryStatsManager for connectivity service am: 3ae5bdab6e am: 584e64df05
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1475899

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic4f99588f81a9545e91593311d6d4e8e6c64659e
2021-03-09 11:49:44 +00:00
Lais Andrade
2b9f0c7623 Merge "Clarify delay parameter documentation in VibrationEffect" 2021-03-09 11:46:43 +00:00
Aaron Huang
584e64df05 Add a new API in BatteryStatsManager for connectivity service am: 3ae5bdab6e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1475899

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I97fc5426d302d6084e8434daa3f6c9b2389be449
2021-03-09 11:11:49 +00:00
Aaron Huang
c4f2a30c20 Merge changes I1d1f0d2d,Ifbd4a978
* changes:
  Communicate with BatteryStatsService through BatteryStatsManager
  Add a new API in BatteryStatsManager for connectivity service
2021-03-09 10:33:56 +00:00
Aaron Huang
3ae5bdab6e Add a new API in BatteryStatsManager for connectivity service
Connectivity service(CS) is going to be a mainline module and
currently it uses IBatteryStats to communicate with battery
stats service directly. CS cannot use this way after becomes
a mainline module so add new system APIs to communicate with
battery stats service through BatteryStatsManger.

The new API reportNetworkInterfaceForTransports requires
system-only permission NETWORK_STACK or MAINLINE_NETWORK_STACK
so that given the only caller was in ConnectivityService.

This change only add new surface, the usage in CS will be
updated in follow-up CL.

Bug: 171686421
Test: builds, boot, mobile and wifi work.
Change-Id: Ifbd4a9784ed7664751e69d530f8204e292fa6b39
Merged-In: Ifbd4a9784ed7664751e69d530f8204e292fa6b39
2021-03-09 06:24:50 +00:00
Makoto Onuki
245befadf1 Merge "[Bugfix] Fix after performing adb shell am hang and kill this process, the phone can not resume from hang state" am: 4d83226663 am: 8f8ffd02f2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1601731

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ieff6dfbeda11d1ae6fd6cd9a28cd622f2cec7045
2021-03-09 02:19:25 +00:00
Makoto Onuki
4d83226663 Merge "[Bugfix] Fix after performing adb shell am hang and kill this process, the phone can not resume from hang state" 2021-03-09 01:10:27 +00:00
Lais Andrade
66a26003e8 Clarify delay parameter documentation in VibrationEffect
Make it clear in the javadoc for addPrimitive method the start point of the delay parameter, which is right after the previous primitive in the composition has finished.

Fix: 150715908
Test: N/A
Change-Id: Ic88b0d8a31a193b8b1726a9541d9e5955b729866
2021-03-09 00:22:45 +00:00
Jacob Abrams
1d5dbcaaf4 Make FileUtils#createDir threadsafe
Prior to this change the createDir method would return false if invoked
around the same time on two different threads for the same directory.

Test: manual
Change-Id: I34ba4f645a034f47917054af4b299f916a9cfa67
2021-03-08 14:35:44 -08:00
Christian Wailes
87287a5859 Merge changes I04ac8fba,Ia0a8548f am: db6628bb7d am: a534c95087
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1615382

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I06eb075d11b110ccbbd8dcaecb948e502d69f6bb
2021-03-05 05:10:07 +00:00
yuxi1
409fcc7207 [Bugfix] Fix after performing adb shell am hang and kill this process, the phone can not resume from hang state
After performing adb shell am hang and kill this process, the phone can not resume from hang state. The reason is that the IBinder object in runHang(PrintWriter pw) of ActivityManagerShellCommand.java is not the IBinder object of client.

Bug: 180949375
Fixes: 180949375

Test: Run adb shell am hang, and open some APPs, then the phone will hang. Then perform ctrl + c, the phone can resume from hang state.

Signed-off-by: yuxi1 <yuxi1@xiaomi.com>
Change-Id: Ie1153df2e21fc267fd131994422b7c263a17372a
2021-03-05 02:49:58 +00:00
Christian Wailes
db6628bb7d Merge changes I04ac8fba,Ia0a8548f
* changes:
  Autoformatter changes.
  Inclusivity cleanup of the Zygote.
2021-03-04 21:09:52 +00:00
Remi NGUYEN VAN
043099e934 Merge "Add Build.IS_DEBUGGABLE to public API" am: 9c16d8e25d am: 739f8a3fb1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1397947

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I19e099baa632221842cf1687fbef0bad06fda060
2021-03-04 04:23:30 +00:00
Remi NGUYEN VAN
9c16d8e25d Merge "Add Build.IS_DEBUGGABLE to public API" 2021-03-04 03:02:56 +00:00
Chris Wailes
a6f8803c85 Inclusivity cleanup of the Zygote.
Changed "whitelist" to "allowlist" in many Zygote files.

BYPASS_INCLUSIVE_LANGUAGE_REASON="compatability with vendor files"

Test: cts
Change-Id: Ia0a8548f2e254fc36a9dce7e50af8284ed0caa47
2021-03-03 14:23:32 -08:00
Remi NGUYEN VAN
e5e3843176 Add Build.IS_DEBUGGABLE to public API
For testing purposes, system components such as mainline modules may
need to relax some security restrictions on debuggable builds only, in
cases where there is no testing strategy that would be reasonable on
user builds security-wise.
One example is to test interfaces between a mainline module and the
rest of the system, which typically require very privileged permissions.

There is no particular reason or permission check to keep the symbol
non-public so add it to the public API.

Test: m
Fixes: 163699557
Change-Id: I15c093af04f024eed5567151b241a4bc35c611d4
2021-03-03 11:16:35 +09:00