Commit Graph

8193 Commits

Author SHA1 Message Date
TreeHugger Robot
4bc37846a2 Merge "Propagate AudioAttributes flags to VibrationAttributes" into rvc-dev am: 863c82fa76 am: 61e32caa0b am: 38570d081d am: f06368ec86
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12218307

Change-Id: Ibf79adc0effaaa074fdd0634b0773cda5752d3e1
2020-07-25 00:59:08 +00:00
TreeHugger Robot
38570d081d Merge "Propagate AudioAttributes flags to VibrationAttributes" into rvc-dev am: 863c82fa76 am: 61e32caa0b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12218307

Change-Id: I4018198636aa327dee326842e3e0c25478583d7b
2020-07-25 00:27:55 +00:00
Steven Moreland
d811429b4b Merge "Allow module libs to use VINTF AIDL." into rvc-dev-plus-aosp am: b9440149be am: 88cab6ba53 am: 178e6ff50a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12219679

Change-Id: I4a454f847575eddd84439614a49be4f2ee9e3e1e
2020-07-24 21:39:36 +00:00
Steven Moreland
95dd53bb5f Allow module libs to use VINTF AIDL.
Currently a native APEX can get and use a VINTF AIDL. However, this
can't be passed over JNI to be used by Java code.

This does not open VINTF AIDLs to any type of apps, where AIDL as an API
is completely disallowed. Also, no Java ServiceManager APIs are
available, and they couldn't be until b/139325468 is fixed.

Bug: 161501127
Test: atest binderVendorDoubleLoadTest

Change-Id: I1ab977248b1c39a7d08e0ca34389a7ba168c05b0
2020-07-24 18:35:55 +00:00
Steven Moreland
b617da0ef8 Merge "android.os.Parcelable: isStable->getStability" am: d1568567ec am: da7e355785 am: c9a09ffd92 am: f2aee92d75 am: 5f924b2218
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1371499

Change-Id: Icb0883ebdab525e13942fe7d3e8e58841c4dfaa2
2020-07-24 18:34:19 +00:00
Steven Moreland
c9a09ffd92 Merge "android.os.Parcelable: isStable->getStability" am: d1568567ec am: da7e355785
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1371499

Change-Id: I0f62379a8de4d7b1622ed0667b785d8a74a11ccb
2020-07-24 17:48:23 +00:00
Lais Andrade
c2777148df Propagate AudioAttributes flags to VibrationAttributes
Set supported flags from AudioAttributes into VibrationAttributes on the
builder constructor.

Fix: b/161761418
Test: manual
Change-Id: I4a8e1db278843b2f9f19aba43b0b8f264cb696bd
2020-07-23 18:05:09 +00:00
Steven Moreland
82679a6931 android.os.Parcelable: isStable->getStability
In preparation for APEX stability, make this API support arbitrary
stability levels.

Bug: 139325195
Test: AIDL's run_integration_test.py
Change-Id: I0c1b50f228683717db2978aa909befa46de5302c
2020-07-23 01:23:47 +00:00
Lais Andrade
278a28dfb4 Remove powerHint from IPowerManager.aidl
Also removes sendPowerHint, setInteractive and setFeature from
PowerManagerService, replacing calls to these methods to existing
setPowerBoost and setPowerMode native methods.

This is a relanding CL whose original is ag/10891954

Reason for revert: Reverting the original changes had no effect on the perf regression:
https://dashboards.corp.google.com/google::_233805d0_deb2_44ce_8f21_d31f71af27e0?f=build_creation_timestamp:bt:1594364400000000,1595228400000000&f=build_target:in:flame-userdebug&f=build_branch:in:git_master&f=metric_key:eq:gfxinfo_com.android.systemui_jank_percentile_95-mean&f=atp_test_name:eq:health%2Fmicrobench%2Fsystemui%2Fsystemui-jank-suite&f=test_name:eq:android.platform.test.scenario.sysui.power.PowerMenuMicrobenchmark%23testPower_verifySystemPowerMenuAppears

Reverted Changes:
I52bb144d6:Revert removal of power hint from PowerManager.aid...
Id087f6867:Revert removal of power hint from PowerManager.aid...

Bug: b/150878220
Test: atest FrameworksServicesTests:PowerManagerServiceTest
Change-Id: Ic53a97c006668cfb4013f67ef163a0e7af97519c
2020-07-21 13:38:43 +00:00
Mohammad Samiul Islam
c301f98c60 Merge "Replace reference equality with value equality" 2020-07-20 10:42:42 +00:00
Philip P. Moltmann
22187fa9a0 Merge "Carry attributionTag for DropBoxManager" 2020-07-16 23:23:13 +00:00
Philip P. Moltmann
1cb4c72c3a Carry attributionTag for DropBoxManager
- Use PermissionChecker instead of manully implement permission check
- Need to keep old @UnsupportedUsage method

Fixes: 161443379
Test: atest CtsAppOpsTestCases:android.app.appops.cts.AppOpsLoggingTest#getNextDropBoxEntry
Change-Id: I5c3290c23312e8009a9345e8a58a6f734885f928
2020-07-16 13:09:56 -07:00
Mohammad Samiul Islam
0d5531b9df Replace reference equality with value equality
Reference equality will always be false since parentSession.getUser()
creates a new object.

While at it, fixed some minor warning from IDE.

Bug: 161431858
Test: atest RollbackTest
Change-Id: I880852a811e3bd9bf910c251bf020466ca48160d
2020-07-16 13:12:02 +01:00
TreeHugger Robot
5b53ffc9a5 Merge "Revert removal of power hint from PowerManager.aidl" 2020-07-10 18:57:16 +00:00
Dmitri Plotnikov
530da16652 Add @CriticalNative to getNativeTid to improve performance
Bug: 158232997
Test: atest FrameworksCoreTests:com.android.internal.os.BinderCallsStatsTestBug
Change-Id: I5a5022921ba54354db59083f015d193d929ae0d5
2020-07-09 14:27:47 -07:00
Steven Moreland
492a139922 Merge "HwBinder.setTrebleTestingOverride" am: 3804ae082c am: 8b6e909cbf am: cd5a2a3037 am: c6f1fb4a80 am: 6f32ec03b8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1358164

Change-Id: I2c5a7e44058749a969b290aec09405d4310aeed1
2020-07-09 17:55:58 +00:00
Lais Andrade
cf9f27ecd5 Revert removal of power hint from PowerManager.aidl
Reverts all changes on PowerManagerService.cpp and bring back power hint
methods and usages.

This cl stops using the new PowerHalController, to confirm it is the cause
of the perf regression from b/157483189. Once confirmed it can be
reintroduced later once the root cause is fixed within the new code.

Forrest run: https://android-build.googleplex.com/builds/forrest/run/L68600000629276407
android.platform.test.scenario.sysui.power.PowerMenuMicrobenchmark#testPower_verifySystemPowerMenuAppears
gfxinfo_com.android.systemui_jank_percentile_95-mean:12.28

Bug: b/157483189
Test: atest FrameworksServicesTests:PowerManagerServiceTest
Change-Id: Id087f6867174a15c74617f3bb1cccb3569a358ac
2020-07-09 17:23:59 +00:00
Steven Moreland
cd5a2a3037 Merge "HwBinder.setTrebleTestingOverride" am: 3804ae082c am: 8b6e909cbf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1358164

Change-Id: Ia8da014470547dc469b2de12700aa57fea4c9af1
2020-07-09 17:19:18 +00:00
Zim
a813bc1f05 Remove persist.sys.fuse == false code paths
Since Android R, the FUSE prop is always on and FUSE-off is no longer
supported

Test: m
Bug: 160159282
Change-Id: Ia815c39d898b05bf8082ec5b7dfd903cc9e150bc
2020-07-09 11:54:45 +01:00
Dmitri Plotnikov
ce28b2572e Collect native TIDs for binder threads
This information will be used for attribution of CPU
usage to work source UIDs.

Bug: 158232997
Test: atest FrameworksCoreTests:com.android.internal.os.BinderCallsStatsTest

Change-Id: Ic9fcc1d62515dd11a1fbade80264412615014919
2020-07-08 23:48:44 +00:00
Steven Moreland
5f9914e6b1 HwBinder.setTrebleTestingOverride
To replace usages of environment variable TREBLE_TESTING_OVERRIDE which
is problematic for some clients using setenv in a multi-threaded
environment.

Bug: 156668058
Test: hidl_test_java
Change-Id: I7f7c51b9cfb01a81941154dc406a599cc6edd151
2020-07-08 18:03:34 +00:00
Alex Buynytskyy
f4f1218d18 V4 signature check refactors.
- expose all v2/v3 digests to compare against v4: this is more robust
and don't rely on a comment to maintain compatibility,
- renamings and cleanups.

Bug: 160605420
Test: refactoring CL

Change-Id: Ib46855e0e1985fae244bb8aabbb40a7231a3736d
2020-07-08 00:52:11 +00:00
Nicolas Geoffray
4be379bbf0 Merge "Remove unused / unimplemented CorePlatformAPI methods." am: ebe415b310 am: 4d150059e3 am: a97d2afc1e am: 2f5a81e8c1 am: 535afd5bbd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1352354

Change-Id: I1d309aeee010b0281d75efd1a5610b8f8efbd396
2020-07-02 11:46:16 +00:00
Nicolas Geoffray
a97d2afc1e Merge "Remove unused / unimplemented CorePlatformAPI methods." am: ebe415b310 am: 4d150059e3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1352354

Change-Id: Ife8fad22006a2817d04e9f7238dcd84b198c8869
2020-07-02 10:50:28 +00:00
Nicolas Geoffray
ebe415b310 Merge "Remove unused / unimplemented CorePlatformAPI methods." 2020-07-02 10:44:44 +00:00
TreeHugger Robot
a578b1a6f6 Merge "Revert "Throw an explicit exception if content provider process times out"" 2020-07-01 19:00:54 +00:00
Kholoud Mohamed
567adca54b Revert "Throw an explicit exception if content provider process times out"
This reverts commit 16e83d2a45.

Reason for revert: Droidcop-triggered revert due to breakage 
https://android-build.googleplex.com/builds/quarterdeck?testMethod=testConstructor_protectedCancellableEsc&testClass=android.app.cts.DialogTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6633955&lkbb=6642068&lkgb=6633902&testResults=true&badBuildCount=147&branch=git_master&target=cf_x86_phone-userdebug

, bug https://buganizer.corp.google.com/issues/160310602

Change-Id: I3b04175290a9044ff26800ecc4b382c68f76597e
2020-07-01 14:22:04 +00:00
Nicolas Geoffray
1ce94d5409 Remove unused / unimplemented CorePlatformAPI methods.
Test: m
Bug: 154796679
Change-Id: I7dc1ad23894c8067c3d7bfb7dab526e7f2596918
2020-06-30 13:17:15 +01:00
Jing Ji
7c4341473f Merge "Add support to detect and log excessive incoming binder calls" 2020-06-29 20:33:21 +00:00
Jorim Jaggi
41bd44e606 Merge "Pass in callsite of SurfaceControl constructor explicitly (1/3)" into rvc-dev am: 37cf2279c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11920862

Change-Id: I19b6f83b3777bfeccbe90f1c531efcc59e41f54e
2020-06-27 00:14:24 +00:00
Dmitri Plotnikov
16e83d2a45 Throw an explicit exception if content provider process times out
Fixes: 149110957
Test: atest FrameworksCoreTests:android.content.ContentResolverTest

Change-Id: If4beac53d8b47c31503fd980f9a1e38d34e9c671
2020-06-26 13:40:14 -07:00
Jorim Jaggi
543db32125 Pass in callsite of SurfaceControl constructor explicitly (1/3)
Creating a new Throwable (and filling in the stack trace) can take
up to 150us. Since we do this on the critical path when sending
over SurfaceControl via binder multiple times, this is too much.
Instead, add an option to pass in callsite manually.

Bug: 159056748
Change-Id: I46c339c15a07192d61c4c546e46f260684a47120
Exempt-From-Owner-Approval: Large scale refactor
2020-06-26 13:40:07 +00:00
Jorim Jaggi
d42ab1b938 Pass in callsite of SurfaceControl constructor explicitly (1/3)
Creating a new Throwable (and filling in the stack trace) can take
up to 150us. Since we do this on the critical path when sending
over SurfaceControl via binder multiple times, this is too much.
Instead, add an option to pass in callsite manually.

Bug: 159056748
Change-Id: I46c339c15a07192d61c4c546e46f260684a47120
Merged-In: I46c339c15a07192d61c4c546e46f260684a47120
Exempt-From-Owner-Approval: Large scale refactor
2020-06-26 15:35:23 +02:00
Jing Ji
f48aecf05b Add support to detect and log excessive incoming binder calls
Make estimation on incoming binder calls. If there are too many
binder transactions from certain caller with certain transaction
code, log it. The threshold is configurable via device_config.

The estimation here is based on the heavy hitter detection on
steams. It's less accurate than the actual stats, but also less
usage with the memory.

Currently there are two sets of watcher configurations:
the default one with a higher threshold and an "auto" one with
a lower threshold. The former one overrides the later one;
while the later one will be activated to run for a while in case
there are consecutive ANRs, but it's throttled to run only
up to once an hour. For now both of them are turned ON by default.

Example of the output:

06-19 22:31:49.695  1000  1523  1609 W ActivityManager: Excessive incoming binder calls(>33.3%,2000,1744ms): [1041,com.android.server.appop.AppOpsService,checkAudioOperation,8,34.2%]
06-19 22:32:32.744  1000  1523  1609 W ActivityManager: Excessive incoming binder calls(>33.3%,2000,4938ms): [10160,com.android.server.am.ActivityManagerService,refContentProvider,25,50.7%]

Bug: 155522521
Test: Pick up a service & code and loop "adb shell service call ..."
Test: atest HeavyHitterSketchTest
Test: atest FrameworksCoreTests:BinderHeavyHitterTest
Change-Id: I4cdcce5d02797ef71190172e40a09b543478760f
2020-06-25 12:49:54 -07:00
Dieter Hsu
4e593f7fd5 Merge "Enable bug report tests in pre/postsubmit" 2020-06-25 15:13:42 +00:00
Vladimir Marko
3924cd27f1 Merge "Use @CriticalNative for writes in Parcel." 2020-06-25 08:17:58 +00:00
Vladimir Marko
bfac2652b0 Use @CriticalNative for writes in Parcel.
Make Parcel.nativeWrite{Int,Long,Float,Double}() return an
error code instead of throwing exceptions on error. This
allows markiong them as @CriticalNative but we must pass on
any errors from Java back to native for throwing exceptions.

This is a follow-up to commit
    b148b6c3c8

ParcelPerfTest results on blueline-userdebug with little
cores at fixed frequency 1420800, big cores off and the
vendor.thermal-engine stopped:
                    before after
timeWriteInt_mean:  168    68
timeWriteLong_mean: 164    67
(No benchmarks for writeFloat and writeDouble.)

Test: blueline-userdebug boots.
Change-Id: Iea4ef2a933a7e8115459ab1bc4d6235282b1ceb8
2020-06-24 19:15:38 +01:00
TreeHugger Robot
cedb11cc84 Merge "Add additional info to device ID docs in TelephonyManager and Build" into rvc-dev am: 3fa2d86fd0 am: e71ed27853 am: 4cad6acf29 am: 5a0c835564
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11980365

Change-Id: I7a2952c907c8ac8081413b7eeafcd6d466597897
2020-06-24 17:01:22 +00:00
TreeHugger Robot
e71ed27853 Merge "Add additional info to device ID docs in TelephonyManager and Build" into rvc-dev am: 3fa2d86fd0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11980365

Change-Id: I70c91479f8f8557f1e0abbd125c6a4e24c262bd8
2020-06-24 16:29:17 +00:00
TreeHugger Robot
3fa2d86fd0 Merge "Add additional info to device ID docs in TelephonyManager and Build" into rvc-dev 2020-06-24 16:15:32 +00:00
Luke Huang
3cd122f485 Disable sockets and DNS if process lacks INTERNET permission.
This is a Client-only solution.
  - Add to NetdClient a per-process std::atomic_boolean
    similar to netIdForProcess and netIdForResolv.
  - The boolean says whether the process should be
    allowed Internet connectivity.
  - Add an @hide method to NetUtils.java to set the boolean;
    call it from the initialization code of the new
    process just after forking from zygote.
  - Make netdClientSocket and dnsOpenProxy check the
    boolean. If the boolean is false, return EPERM from
    socket calls.

Bug: 150028556
Test: atest NetworkUtilsTest
Test: atest CtsAppSecurityHostTestCases:UseProcessTest
(cherry-pick from internal branch, ag/11881939)
Merged-In: If002280fbad493dfc2db3d9d505c0257d49a9056
Change-Id: If002280fbad493dfc2db3d9d505c0257d49a9056
2020-06-24 11:58:57 +00:00
Dieter Hsu
848113e595 Enable bug report tests in pre/postsubmit
Bug: 155604488
Test: atest --test-mapping --dry-run \
          services/core/java/com/android/server/os:presubmit
Test: atest --test-mapping --dry-run core/java/android/os:presubmit
Change-Id: I054d05d4fa8ff02f1c404d0883c382a2d5911f88
2020-06-24 12:20:32 +08:00
Michael Groover
e0de018109 Add additional info to device ID docs in TelephonyManager and Build
Android 10 introduced additional restrictions to access persistent
device identifiers. This commit updates the javadocs for
TelephonyManager and Build to provide additional details regarding
the requirements and how to check if these requirements are met.

Fixes: 158471988
Test: m docs -j
Change-Id: I02932a22ecc5b761aa1a92d59d09d31863c34235
2020-06-23 19:52:51 -07:00
Jing Ji
643bab1a3e Merge "Fix memory leak in StrictMode violation throttling" into rvc-dev am: 471ef84e33 am: 7298b685dd am: d889dd91b9 am: 31d2ea9252
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11902484

Change-Id: Iecb676fa467c612b025dda9cdcc8343e00072413
2020-06-23 01:04:31 +00:00
Jing Ji
31d2ea9252 Merge "Fix memory leak in StrictMode violation throttling" into rvc-dev am: 471ef84e33 am: 7298b685dd am: d889dd91b9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11902484

Change-Id: I28f46978da7fd7d30fd5a4b57defcde29c38cb62
2020-06-23 00:42:13 +00:00
Jing Ji
341fd0c6c7 Merge "Fix memory leak in StrictMode violation throttling" into rvc-dev am: 471ef84e33
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11902484

Change-Id: I88b40ce6b018492e4e329e06c9718aa55dd76ca7
2020-06-23 00:17:00 +00:00
Jing Ji
471ef84e33 Merge "Fix memory leak in StrictMode violation throttling" into rvc-dev 2020-06-23 00:04:49 +00:00
TreeHugger Robot
5d1c4c4b38 Merge "Revert non-API changes to not throw UserOperationException any more" into rvc-dev am: 960e49335a am: 35d7e8ba30 am: cd966a42d3 am: 62caef01d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11859726

Change-Id: I77f454eee55d84217f3b5ec96f0ea90ee0970b52
2020-06-22 22:03:19 +00:00
TreeHugger Robot
cd966a42d3 Merge "Revert non-API changes to not throw UserOperationException any more" into rvc-dev am: 960e49335a am: 35d7e8ba30
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11859726

Change-Id: I377aee77ec9e8f70473c5c8ae9caf4106b7711b7
2020-06-22 21:24:31 +00:00
Jing Ji
6985fb39f0 Fix memory leak in StrictMode violation throttling
* Add hashCode() to the base Violation class for dup detections
* Discard obsoleted violation fingerprints if possible

Bug: 159128771
Bug: 159626227
Test: run cts -m CtsOsTestCases -t android.os.cts.StrictModeTest
Test: Manual - Loop generation of StrictMode violations
Test: Manual - Check heap dump
Change-Id: I19a0922fe010fad97b6b819e73acb7db08f84930
2020-06-22 14:22:32 -07:00