Commit Graph

8309 Commits

Author SHA1 Message Date
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
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
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
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
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
5232082243 Merge "Make FileUtils#createDir threadsafe" 2021-03-10 22:02:14 +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
2b9f0c7623 Merge "Clarify delay parameter documentation in VibrationEffect" 2021-03-09 11:46:43 +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
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
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
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
Abhijeet Kaur
b68c51d4c4 Merge "Removed unused mount mode constants" am: 14f35d5f2d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1605513

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I80d0c585e742f33ce90fac787f54b5c0903f070f
2021-03-02 20:59:46 +00:00
Remi NGUYEN VAN
4f6f17230f Merge "Move UidRange to connectivity" am: 5a81037576
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612295

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I672615b0804b9a9de4befa1ba5aea2efb9c962df
2021-03-02 20:24:20 +00:00
Chiachang Wang
fed4ec6ff6 Merge changes Ifc561b6d,I63137b24 am: 0d7553b30e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1605334

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I23cce279f53babac5b90364dd4fc0e55eb382dfa
2021-03-02 19:22:34 +00:00
Abhijeet Kaur
14f35d5f2d Merge "Removed unused mount mode constants" 2021-03-02 16:37:30 +00:00
Remi NGUYEN VAN
5a81037576 Merge "Move UidRange to connectivity" 2021-03-02 09:27:50 +00:00
Remi NGUYEN VAN
c983440dd8 Move UidRange to connectivity
UidRange is a data class that is an implementation detail of
Connectivity. Move it to the connectivity boundary.

Remaining usages of UidRange outside of Connectivity (in VPN) should be
migrated to other classes, like Range<Integer> or UidRangeParcel.

Bug: 181512874
Test: m
Change-Id: I6f2e3685ad1c07171dd90480d1e546329de8732d
2021-03-02 15:35:36 +09:00
Chiachang Wang
0d7553b30e Merge changes Ifc561b6d,I63137b24
* changes:
  Remove RouteInfo hidden depdendency in NMS
  Remove the hidden ConnectivityManager dependency in NMS
2021-03-02 05:13:22 +00:00
Hunter Knepshield
b79c80ba78 Merge "[API review] Additional detail in BugreportCallback javadoc." am: 39742a519c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1607112

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id0c2b746e1be4944a6caa05c6764f37cf960bace
2021-02-26 18:52:56 +00:00
Hunter Knepshield
39742a519c Merge "[API review] Additional detail in BugreportCallback javadoc." 2021-02-26 18:31:22 +00:00
Almaz Mingaleev
c76d1a4c26 Merge "Re-throw system server exception." am: 112cd8df86
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1608233

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I39697856d7fee18200e7405d84a45add58d60921
2021-02-26 09:19:15 +00:00
Almaz Mingaleev
112cd8df86 Merge "Re-throw system server exception." 2021-02-26 08:42:36 +00:00
Hunter Knepshield
433d357604 [API review] Additional detail in BugreportCallback javadoc.
This covers edge cases left out of the previous generalization.

Bug: 180015324
Test: make
Change-Id: I309d17cd09434469b5d88275cd59e864f4830c3a
2021-02-25 23:16:20 +00:00
Almaz Mingaleev
b0d08720dc Re-throw system server exception.
Previous "return 0" was not reachable, this makes intention
cleaner.

Bug: minor cleanup
Test: TH only
Change-Id: I50d7d1a2ed53b8f8fe245c6ac6aad4fb8b4ce6e3
2021-02-25 15:13:26 +00:00
Hans Boehm
dd81ed70c7 Merge "Add zygote native fork loop" am: 43a9a8089f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1540230

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I92e404bd6ce19df88d832127f738ec8c6305fe74
2021-02-25 00:30:09 +00:00
Hans Boehm
43a9a8089f Merge "Add zygote native fork loop" 2021-02-25 00:02:19 +00:00
Zim
e72059c0bd Removed unused mount mode constants
Since FUSE in R, there are only 4 mount modes that are used
from IVold.aidl:

REMOUNT_MODE_NONE
REMOUNT_MODE_DEFAULT
REMOUNT_MODE_INSTALLER
REMOUNT_MODE_PASS_THROUGH
REMOUNT_MODE_ANDROID_WRITABLE

Bug: 148454884
Test: Manual
Change-Id: I62b66083f2099b429474872b6f9c7cffb9fb906d
Merged-In: I62b66083f2099b429474872b6f9c7cffb9fb906d
2021-02-24 18:27:26 +00:00
Chiachang Wang
ce554e8152 Remove RouteInfo hidden depdendency in NMS
Update legecy route is replaced by calling INetd directly.
addLegacyRouteForNetId() is no longer needed. This method also
have dependency with the hidden method in RouteInfo which will
be a part of incoming connectivity module. Thus, remove the
addLegacyRouteForNetId() to resolve the dependency.

Bug: 172183305
Test: m ; atest FrameworksNetTests
Change-Id: Ifc561b6dfb45bc51dee244ae114029ae520d8556
2021-02-24 20:04:49 +08:00
Chiachang Wang
7c7ca85882 Remove the hidden ConnectivityManager dependency in NMS
NetworkManagementService that is outside the incoming
connectivity module should stop using hidden NETID_UNSET
in ConnectivityManager. The only usage in NMS is
setDnsForwarders() method which is previously used by CS.
The reference is now replaced by calling INetd directly.
The method could be removed now, so remove it to resolve
the dependency.

Bug: 172183305
Test: m ; atest FrameworksNetTests
Change-Id: I63137b240c4938b082c460bb1a25b447e7f29e80
2021-02-24 17:27:08 +08:00
Treehugger Robot
c8e42d59e7 Merge "BugreportManager API review updates." am: e0db8b998f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1584520

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I41e43baa35a660165075df1bc602cf197656df82
2021-02-23 23:58:26 +00:00
Tianjie Xu
4d208ac97e Merge "Throw an exception in RoR api on no-pin case" am: 7444774737
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1584516

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic466002e50e6125c27f52eb2e989505720fc30c0
2021-02-23 23:52:30 +00:00
Hans Boehm
69d44b0bfd Add zygote native fork loop
Do not return to Java mode between consecutive fork operations.
This greatly reduces the Zygote overhead, since we no longer need to
stop and restart Java daemons.

By not switching back to Java mode, and being careful about what memory
we touch between forks, we also keep the Zygote heaps much more stable,
facilitating page sharing between the zygote and all its children.
Under normal operation we should no longer allocate any memory in the
zygote between forks. That applies to both the Java and C++ heap.
This makes the zygote behave much more like the mental model many
of us had assumed: It has nearly constant memory contents, which are
copy-on-right cloned at each fork. This does not apply to the initial
system server and webzygote forks, that are currently still handled
differently.

This includes

1. Add ZygoteCommandBuffer, and switch the argument parsing code to use it.
This slightly reduces allocation and enables (3).

2. Support process specialization in the child, even when the arguments
are already know, Leverages existing Usap code.

3. Add support for forking multiple child processes directly to the
ZygoteCommandBuffer data structure. This directly uses the buffer
internals, and avoids returning to Java so long as it can handle the
zygote commands it sees.

FUNCTIONALITY CHANGE:

We now limit the total size of the zygote command, rather than the
number of arguments.

Initial performance observations:

[ These are not perfect, since I'm comparing to numbers before I
started. There may have been other moving parts, but they should be
minor. ]

System-server-observed launch latency:

[Not the best metric, but easy to measure. In particular, this
does not represent a significant reduction in application launch
time.]

Based on measuring the last 10 launches in a lightly used cf AOSP
instance, the system server latency from requesting an app launch to
response with the pid (which does not require the child to execute
anything) went from an average of about 10.7(25) msecs to 6.8(9) and
7.9(16) in two tries with the CL. (The parenthetical numbers are
maxima from among the 10; the variance appears to have decreased
appreciably.)

Dirty pages:

The number of private dirty pages in the zygote itself appears to have
decreased from about 4000 to about 2200. The number of dalvik-main
private dirty pages went from about 1500 to nearly zero.

Initially ART benchmarking service claim -1.88% in PSS. But this is not
consistently repeatable.

Drive-by fix:

Call setAllowNetworkingForProcess on usap / native loop path.

Bug: 159631815
Bug: 174211442
Test: Boots AOSP
Change-Id: I90d2e381bada1b6c9857666d5e87372b6a4c1a70
2021-02-23 15:03:40 -08:00
Treehugger Robot
e0db8b998f Merge "BugreportManager API review updates." 2021-02-22 21:46:41 +00:00
Tianjie Xu
7444774737 Merge "Throw an exception in RoR api on no-pin case" 2021-02-22 20:42:35 +00:00
Xin Li
be473bf819 Merge ab/7061308 into stage.
Bug: 180401296
Merged-In: I4bf82035631ccff6d5a6144d6d9b1d203b076851
Change-Id: I1b5f3a672a55eaabba0f5389bab110b395553559
2021-02-21 09:39:53 -08:00
Chiachang Wang
63bc7bd3c2 Merge changes I0a75c440,Ief9e8925,Ie03e8276,If0ac9a64,I716bd771
* changes:
  [IT06]Move INetworkActivityListener into connectivity module
  [IT05] Remove the unused network activity logic out from NMS
  [IT4.7] Add network activity info into dumpsys for debugging
  [IT4.6] Unbundle NMS out from ConnectivityManager
  [IT4.5] Update radio power from CS directly
2021-02-20 02:02:46 +00:00
Tianjie
9dbd5e7457 Throw an exception in RoR api on no-pin case
If the device doesn't have a pin, the current RoR preparation will
go through; but the lskf capture event won't happen. In order not
to confuse the caller, throw an exception instead in the no-pin
case.

Bug: 170664917
Test: remove pin, request RoR with adb shell
Change-Id: Ib04c629234b71e3f6cb36bdfe47759a715a69146
2021-02-18 15:26:33 -08:00
Hunter Knepshield
8c4887a7ce BugreportManager API review updates.
- Expand BugreportManager class javadoc
    - Explain what "privileged" means
    - Highlight only one-BR-at-a-time behavior
- Add more detail to BugreportCallback javadocs
    - Explain standard callback invocation flow
    - More detail on when BUGREPORT_ERROR_INVALID_INPUT is used
- Add @WorkerThread to {start{,Connectivity},cancel}Bugreport

Bug: 180015324
Test: make
Change-Id: Id3400b1cdd271f47bdeaf8cdc1a0dea61aafc933
2021-02-18 19:31:44 +00:00
Primiano Tucci
355753053c Merge "Do not check for debuggable / profilable for app tracing." 2021-02-18 17:52:31 +00:00