| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We pass around more and more UserHandle these days because of mainline
modules, because even @SystemApi are not allowed to use integer user
IDs.
So let's make sure even in extreme cases we don't keep allocating
new UserHandle's for the same user.
Test: atest $ANDROID_BUILD_TOP/frameworks/base/core/tests/coretests/src/android/os/UserHandleTest.java
Test: atest $ANDROID_BUILD_TOP/cts/tests/app/src/android/app/cts/UserHandleTest.java
Change-Id: Iae34e1d11638ced53246d68d310ad62e058dba93
|
| |\
| |
| |
| |
| |
| |
| |
| | |
bd1cc4f2a2 am: 6b7167e807 am: 155b09614e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669185
Change-Id: Ic0b7887630c00404ff354c193b82a96930940556
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |\
| | |
| | |
| | |
| | |
| | | |
Bug: 180401296
Merged-In: I4bf82035631ccff6d5a6144d6d9b1d203b076851
Change-Id: I1b5f3a672a55eaabba0f5389bab110b395553559
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
8927357b27 am: 6ec462de05
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573942
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ia28b9c251b67344c1d4d07a2d600a53ca36b170b
|
| | |\| |
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
8927357b27
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573942
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Id31355ce04a22c27bb83793b5664a3f6358fd83d
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For the incoming connectivity mainline, it need to compute the
intersection of a set of uids and appIds for the permission
control. As @UserIdInt values are internal implementation details
of the OS, any mainline modules should use strongly-typed
UserHandle arguments. Thus, create a new API that accepts
UserHandle and appId to get the computed uid.
Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I046546d2c5c76eac7a251e63e4234776975bf2bc
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
|
| | |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13205190
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Id450db7d6874e2e1f4832b8dc0c40f972d62bf18
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The puller for the atom frequently fails. We believe it is due to the
size of the pulled atoms. No metric can be correctly build from this
atom.
To reduce the size, we apply transformations that we would likely
perform when analyzing this data. We combine times for all shared app
gids together and combine times for the same apps. We also exclude
isolated uids which are frequently recycled and removed from the
underlying data source.
If these optimization do not help, we will need to introduce different
atoms.
Bug: 157535126
Test: cmd stats pull-source 10010
Change-Id: I0d9a18c78f456e1b0f9d7ad322f15354ead9f02b
Merged-In: I0d9a18c78f456e1b0f9d7ad322f15354ead9f02b
(cherry picked from commit e69ade3545864e7271806d071825ec37486d5d37)
|
| | | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
Bug: 170729553
Test: Treehugger
Merged-In: I8285daa8530260251ecad6f3f38f98e263629ca7
Change-Id: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I ran these commands:
cd frameworks/base
grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
's/\@SystemApi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@SystemApi\1/gs'
grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
's/\@TestApi[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs'
Bug: 171179806
Test: m checkapi
Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789
Merged-In: I772790b783b0a8730b8bf680c9e569a886b8d789
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The puller for the atom frequently fails. We believe it is due to the
size of the pulled atoms. No metric can be correctly build from this
atom.
To reduce the size, we apply transformations that we would likely
perform when analyzing this data. We combine times for all shared app
gids together and combine times for the same apps. We also exclude
isolated uids which are frequently recycled and removed from the
underlying data source.
If these optimization do not help, we will need to introduce different
atoms.
Bug: 157535126
Test: cmd stats pull-source 10010
Change-Id: I0d9a18c78f456e1b0f9d7ad322f15354ead9f02b
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
This is a resubmit of ag/12929664 with some APIs excluded that caused
test failures; see bugs 171886397, 171888296, 171864568.
APIs excluded:
Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord;
Landroid/os/Process;->myPpid()I
Landroid/os/SharedMemory;->getFd()I
Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I
Bug: 170729553
Test: Treehugger
Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6.
Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397
Bug: 171886397
Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
Bug: 170729553
Test: Treehugger
Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I ran these commands:
cd frameworks/base
grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
's/\@SystemApi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@SystemApi\1/gs'
grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
's/\@TestApi[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs'
Bug: 171179806
Test: m checkapi
Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Those annotations could be inferred by some tools (like Kotlin), but the
https://checkerframework.org/ doesn't check inherited annotations
complaining about all equals() invocations that get nullable argument.
The change was generated by running
find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /'
in the frameworks/base directory and by automatically adding and
formatting required imports if needed. No manual edits.
Bug: 170883422
Test: Annotation change only. Should have not impact.
Exempt-From-Owner-Approval: Mechanical change not specific to any component.
Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an effort to modularize RollbackManager.
AIDL interfaces (IRollbackManager in this case) can’t be used across
module boundaries. We need to add a wrapper so system_server classes
can depend on this wrapper instead of IRollbackManager.
See https://docs.google.com/document/d/1d60nWwTcwrLps8dWDkxtkcUxSNt6q1x9rgAKwG-xO9E/view#heading=h.vqwoptkbpscx
for more details.
Bug: 150347230
Test: atest StagedRollbackTest
Change-Id: Ie34489aa3276f75d192ac4a08112012ef7f94509
|
| |
|
|
|
|
|
|
| |
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I534e3fd1305e2f4af076986770033478448a665c
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Migrating temp whitelist APIs to PowerWhitelistManager to allow
telephony to add apps to the temp whitelist.
Bug: 138239060
Bug: 140141678
Bug: 141155196
Bug: 142420609
Bug: 144864180
Test: atest PowerWhitelistTest
Change-Id: Iefd6ecf89aad46de042ef3a1ec0c20d6c35da5a6
|
| |
|
|
|
|
|
|
|
| |
go/testapi-enforcement
Bug: 133832325
Test: m
Change-Id: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
Merged-In: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
|
| |
|
|
|
|
|
|
|
|
| |
There will be more calls to *ForUser() APIs over time by mainline modules.
Let's avoid creating new objects in common cases.
Bug: 142134660
Fix: 140429319
Test: atest cts/tests/app/src/android/app/cts/UserHandleTest.java
Change-Id: Ie71850bd08a8d9831232ddb40807ae49e3a56841
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Throughout the codebase, sometimes an integer user ID is called
userId, and sometimes it is called userHandle. Here, we rename the
occurences of "int userHandle" to "int userId" in select files.
Additionally, we add the @UserIdInt annotation in many more places.
This certainly does not cover all uses of userHandle, which is used
widely throughout Android; doing so would be more dangerous and cause
merge conflicts. But at least the core User code can have a consistent
nomenclature.
Bug: 138384792
Test: compiles. presubmit passes.
Change-Id: I9a2684e9bfac637e0476c4b68027008ebb8a160b
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
See go/UnsupportedAppUsage for more details.
These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 137350495
Test: m
Change-Id: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
information added
So they are being moved back to the greylist for Q.
Test: Treehugger
Bug: 136102585
Change-Id: I5ac8b8b9b23c3789d80239cf456072cc7dfa1203
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For packages:
android.os
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: I4ece0a3f37f88fc2508cb965092aed7cabc61819
|
| |
|
|
|
|
|
| |
Bug: 126702077, 126701263, 126700858, 126700497
Test: manual
Change-Id: Ic6599f59e6e079097a35cb2bf24c59a87627c8b7
Exempt-From-Owner-Approval: Trivial API annotations
|
| |
|
|
|
|
|
|
|
| |
If they were null, then the Parcelable would fail to work.
Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
|
| |\
| |
| |
| |
| |
| | |
am: ac358e2951
Change-Id: I64f2353311978ac585e6a2555adedbe967e23588
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is consistent with other methods in this class, and unbundled
system apps such as the network stack need this API to verify their
callers regardless of the userid. The method is already marked as
TestApi.
Test: m
Bug: 123655057
Change-Id: I0ecef4abcd850dc641cd70681a56cb038778c04c
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
The affected constants are already SystemApi in internal.
Bug: 112869080
Test: m
Change-Id: Iacefdefa59346eaebd8b92743fe8710845edcc29
Merged-In: I261dfcc5cfdfc76bda5d70181785e11c2715a558
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Introduce a new range of app-zygote isolated UIDs, [90000..98999].
For each app that uses an application Zygote, allocate a range of
100 isolated UIDs. The application Zygote for an app will get a
UID out of that range, and all other children that are forked
from that zygote will get a UID from the same range.
Bug: 111434506
Test: app Zygote and its children run in the new range of
isolated UIDs (with SELinux disabled). New set of
tests for UID allocators pass.
Change-Id: I7a6883a5ddb95683932c93ea77f4e52d8f37fa4f
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This requires RestrictedLockUtils to change which then causes further
changes.
I left the old APIs available for non-system-api customers.
Test: RunSettingsLibRoboTests
Bug: 116798569
Change-Id: Id5384ee074bb245e615012b7e0d5298b8bf27ba4
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We created this API to make it easy to pass a given UserHandle into
all Managers obtained from a given Context, which works great for
"normal" users, but we should also support special users like ALL
and CURRENT.
Also add an AutoCloseable marker to make try-with-resources easier.
Bug: 112153259
Test: atest android.content.cts.ContextTest
Change-Id: I261dfcc5cfdfc76bda5d70181785e11c2715a558
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also make the new lib only use system-apis.
This allows mainline module to use the new
RestrictedLockUtilsSettingLib.
Unfortunately the whole RestrictedLockUtils would have caused to much
new system-api. Hence it was split into RestrictedLockUtils and
RestrictedLockUtilsInternal. This caused a lot of trivial code changes.
Bug: 110953302
Test: Built
Change-Id: I693b3bf56f3be71f0790776e3aad5694717786ef
|
| |/
|
|
|
|
| |
Test: atest CtsPermissionTestCases
Bug: 77604428
Change-Id: Ib5e9b678e98aab86dac90610ed071eb89f14fce9
|
| |
|
|
|
|
| |
Test: atest GtsOsTestCases on pi-dev:taimen and oc-mr1:sailfish
Bug: 77497338
Change-Id: I5de976991a857bfbed2faa943822af542601fa8b
|
| |
|
|
|
|
|
|
| |
Bug: 77240427
Change-Id: I057e8f50370fb1cd74ff2ebdab41990a682cec6f
Fix: 77240427
Test: build & boot
Test: "am set-standby-bucket com.google.android.apps.docs 40" will override ACTIVE
|
| |
|
|
|
|
|
|
| |
Turned out !UserHandle.isApp() doesn't mean "is system" because of isolated UIDs.
Bug: 72174012
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/ForceAppStandbyTrackerTest.java
Change-Id: Ibf6175d550ecc74677877c74db2473bf3f30132d
|
| |\
| |
| |
| |
| |
| | |
am: 42064a3aa2
Change-Id: I85979f6f70bbef34d6041495310b442cb0405d2d
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
AID_SHARED_GID is a GID shared by a specific app across all users on
the same device. Bring the UserHandle and multiuser.c implementations
into agreement, and copy/paste the unit tests that verify that both
behave identically.
Since we might now return "-1" when a GID is invalid, have
ActivityManager handle these cases by quickly swapping in the
always-valid getUserGid().
Test: bit FrameworksCoreTests:android.os.UserHandleTest
Bug: 34151068, 64548938
Change-Id: I0463aba923ae5ce1942666359a394ae6cdb7c1f8
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're not yet ready to commit to SubscriptionPlan as public API, so
relax to be @SystemApi instead. Add a new MANAGE_SUBSCRIPTION_PLANS
permission that we require apps to hold, unless they've been
delegated access via a trusted CarrierService.
Since several apps have the ability to provide plans for a single
subId, we now remember the "owner" who set the current plan
information, and we refuse to leak plan information beyond the app
that originally set it.
Relax permissions check to not require READ_PHONE_STATE, since we're
only returning data that an app provided to us earlier. Also fix
NPE when SubscriptionInfo is missing.
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Bug: 63997177, 63928277, 64156138, 63903381
Change-Id: If503378ef406dcaec438c9b41e837e0a821a3ef4
|
| |
|
|
|
|
|
|
| |
This allows CTS to pass user IDs returned by APIs as UserHandle to various
ADB commands.
Test: Exposing as TestApi only; m -j
Change-Id: Iedba6d83b717baacf9e7cf97f1d32f93c191a5ca
|
| |\
| |
| |
| |
| |
| |
| |
| | |
4b80a4a372 am: 1e1cdbead1
am: 7664e61885
Change-Id: I91c0810aad2ec530650855bcd2f1d25c309717a1
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now we're getting somewhere! This CL starts measuring disk usage
using quotactl(), which is almost instant and has much lower impact
on flash memory lifetime.
We now grant the per-app cache GID to every launched app, and the
ContextImpl logic that creates cache directories matches the logic
down in installd.
Test: builds, boots, quota stats match manual stats
Bug: 27948817
Change-Id: Ie269a2958ce0e1c17cb74dbfecc791a5c12922cf
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
bit\\"\\" into nyc-mr1-dev am: 56177bf81b
am: 5c1dc014ca
Change-Id: Ia51a5349ea826ca56ec0c5f8baf1c1afac7c6b81
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Breaks monkey in root mode.
This reverts commit 6e16714c688ed9c52763696f5a5e7b90802a471b.
Bug: 29338430
Change-Id: I238f89dad77d7dcae6d02eccbda52eb9c6c6466c
|
| |\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
nyc-mr1-dev am: e6fcebbf50
am: 9b4725d071
Change-Id: I2c6c65c9e1445e02c8e0e264090cbb4d62295d39
|