The new method hasExplicitIdentity will track whether the caller is
within a Binder.clearCallingIdentity/restoreCallingIdentity block based
on packing this state information into the token returned by clearCallingIdentity.
Bug: b/252975769
Test: android.os.cts.BinderTest
Change-Id: I162db933f9e52cd6f9f46796bda11ad6216d3d66
This reverts commit ee13e8d435.
Reason for revert: As discussed in b/233915142, an API that can obtain an arbitrary binder should not be exposed, and mainline modules should generally follow go/android-api-guidelines#the-moduleservicemanager-pattern.
Bug: 233915142
Test: Presubmit
Change-Id: I67e6e177d48ed213306aa0c10f83fe3b670daf1d
With ag/19901205 the permissions for this API were increased,
and calling users required 'MANAGE_EXTERNAL_STORAGE' permissions.
There is now a way to add the same functionality without
adding any additional permissions.
Bug: 235321217
Test: atest android.appsecurity.cts.StorageHostTest
Change-Id: I6b166ac191a80c600b527266f53107b8d9c78177
This is to replace ServiceManager, which the ART module is currently
using to get the "artd" service.
Only the ART mainline module will be able to access an instance of this
class.
Bug: 233915142
Test: Presubmit
Change-Id: I94953bc7fbf471e142b1ab375fe1624bebd2a4ea
This adds an API to determine if the context user is the designated
main user on the device. This user may have access to features which
are limited to a single user on the device.
In Android U, this will be the first user to go through setup.
On regular devices, this will be the system user, but on devices in
No Primary User / Headless System User Mode, it will be a different
user.
The isPrimaryUser System API is confusing because it actually always
returns the system user, even in headless mode. That API is deprecated
in this change.
On devices that are upgrading, if they are non-headless, the system user
will be the main user. If they are headless, the full user with the
earliest creation date will be given the flag.
Bug: 256624031
Test: atest UserManagerTest
Change-Id: Ib36f3b372f9bf33cbb097c4af63eb43515ac835b
artificially limited.
We may limit charging when battery is overheating, or due to dock defend
or other battery defend mechanisms. In these cases, the battery is
expected to drain while dreaming since charging is limited. Therefore,
do not exit dreams in this case.
Test: atest PowerManagerServiceTest
Fixes: 258027228
Change-Id: I10ce0c848892b42267d819d07a284d17a97899d1
ServiceManager.getDeclaredInstances is needed for Remote Key
Provisioning mainline module to get all the implementations for
IRemotelyProvisionedComponent.
Test: build + usage in Remote Key Provisioning mainline module.
Change-Id: I92545104fa9bc190fe7c2f84b33d5f8693fcc2a4
For development, it helps to be able to create users whose usertype is
disabled or their limit has been reached.
We therefore introduce a system property for this.
It can only be used on debug builds.
Bug: 255793314
Bug: 137101239
Test: adb shell setprop debug.user.creation_override 1 && try to create disabled users
Change-Id: I6ab2aa80b0387b32f1b5fe5e9c8dd0096ed7bcd7
missing frequency profile.
Some CTS tests for frequency data assume that it exists (i.e. crash when
it doesn't) when a device claims it hasFrequencyControl. Note that the
API is currently non-public.
Bug: 257032261
Test: atest VibratorTest
Change-Id: Id1c1ae555f42009cb394a6cef664624054b575ac
Ultra-wideband (UWB) is a radio technology that can use a very low
energy level for short-range, high-bandwidth communications over a
large portion of the radio spectrum. This CL adds a user restriction
for disallowing UWB on a device. A user restriction is needed for
NIAP (Common Criteria) certification (see b/239714441). One of the
requirements for the certification is to be able to enable/disable
all the radios.
Bug: 239714441
Test: m; manual testing with testDPC;
Change-Id: Icfa16258cc789c337417c2e96a4e0c37d0030d55
* Add sendHint API to HintManagerService and PerformanceHintManager
* Plumb relevant calls through the existing implementation
* Extend existing tests to cover new API calls
* Update the relevant build files to use power API v4
Bug: b/243973548
Test: atest PerformanceHintNativeTestCases
Test: atest FrameworksCoreTests:android.os.PerformanceHintManagerTest
Test: atest HintManagerServiceTest
Change-Id: Ice7ed8f32e877bd845afad77fcc6ae16f1a1b78c