- 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
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
Since Android R, the FUSE prop is always on and FUSE-off is no longer
supported
Test: m
Bug: 160159282
Change-Id: Ia815c39d898b05bf8082ec5b7dfd903cc9e150bc
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
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
- 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
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
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
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
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
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
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
* 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
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
Change-Id: If002280fbad493dfc2db3d9d505c0257d49a9056
Exempt-From-Owner-Approval: OWNERS already approved identical patchset 5