They generally refer to the Wakelock API, but PowerManager controls more
than that these days.
Bug: 216373630
Test: compiles
Change-Id: I117460292b0da8563fbc249e7e2e27671eaf0da5
Add onWakefulnessChangedCallback which is called whenever the wakefulness of a PowerGroup changes.
Set the wakefulness for a new PowerGroup to WAKEFULNESS_AWAKE instead of the current global wakefulness. This way the newly added PowerGroup will not directly go to sleep if the device happens to be asleep.
Introduce per power group lastWakeTime and lastSleepTime.
Rename setGlobalWakefulnessLocked() to
updateGlobalWakefulnessLocked(), getGlobalWakefulnessLocked() to recalculateGlobalWakefulnessLocked() and getWakefulnessLocked() to getGlobalWakefulnessLocked().
Rename dreamDisplayGroupNoUpdateLocked() to dreamPowerGroupLocked().
Rename sleepDisplayGroupNoUpdateLocked() to dozePowerGroupLocked().
Rename reallySleepDisplayGroupNoUpdateLocked() to sleepPowerGroupLocked().
Rename wakeDisplayGroupNoUpdateLocked() to wakePowerGroupLocked().
Test: atest FrameworksServicesTests:PowerManagerServiceTest
Bug: 200653844
Change-Id: Ic90f3b0c116e8e9db7df730f1500c0e8b99fe677
Update WaveformBuilder to have a single method that adds transitions to
new sets of vibration attributes for a fixed duration. The parameters
are represented by a new type VibrationEffect.VibrationParameter, and
have two concrete types now: amplitude and frequency.
Update VibrationEffect.Composition API to add effects and repeating
effects, removing the repeat index parameter from WaveformBuilder.
Remove delay parameter from Composition in favor of a new method
addOffPeriod to make it less ambiguous when the delay is played in the
composition.
Bug: 203785430
Test: VibrationEffectTest
Change-Id: I40cbfaff2de3231378da7db6a2bc5c9252e6d8f8
Introduces a new SystemService stage that indicates that user events
(user-switch, user-starting, user-unlocked) have completed. This can be
used by services for non-urgent tasks that must be completed after the
event in question, but can be delayed until later.
As long as they happen close enough in time, only a single event will be
sent (per user) which will contain information about all the
onUser-completion events it represents.
TODO: Also trigger the call when the user-switch UX has completed
(rather than waiting for the hard-coded delay). First we need to find an
appropriate signal for "switch UX is complete".
Test: atest UserControllerTest
Test: manual confirmation using VoiceInteractionManagerService
Bug: 197344658
Change-Id: Id8e6ce8e9c46f86d48d0a76085123c0c3dd1f2ea
Change VibratorInfo.FrequencyProfile to use a linear interpolation for
the max amplitude supported by frequency values between two measurement
entries in the HAL bandwidth returned.
Bug: 203785430
Test: VibratorInfoTest
Change-Id: I56e998df40698be87a713ca9013380c0e938e165
Create public class to represent the vibrator response for the
supported frequency range to the Vibrator public API, with basic
implementation that extracts these values from FrequencyMapping.
Integrate this data with the result of Vibrator.hasFrequencyControl
method, which also checks the HAL capabilities.
Also make public the methods to provide resonant frequency and Q-factor
of the device. Update the SystemVibrator to handle multi-vibrator
scenario and return values when all vibrators have the same
configurations. This includes returning the intersection of all vibrator
max amplitude measurements in the new profile object.
Add validation to HAL values and CTS to cover expected ranges based on
the device support for frequency control.
Bug: 203785430
Test: android.os.cts.VibratorTest & VibratorInfoTest
Change-Id: I0b7cf599ae6039355a0a198f4bdaafb85fb7422c
In order to make parsing package APIs visible for mainline, moving
parsing classes to system server. The related test cases should
change appropriately. Test Plan should also follow the change.
Because com.android.server.pm.parsing.PackageInfoUserFieldsTest has
been removed , frameworks/base/core/java/android/os/TEST_MAPPING
contains '"include-filter":
"com.android.server.pm.parsing.PackageInfoUserFieldsTest"'
that doesn't work.
Test: atest \
com.android.server.pm.parsing.PackageInfoUserFieldsTest;
# It gets Class Not Found
Test: http://ab/I11400010010682351
Fixed: 215305254
Change-Id: Ib435e5d08faa663dcfd03232378998b1db6f2a0e
* changes:
Make ProcessRecord.isolated more robust.
Rename ServiceRecord.isolatedProc to isolationHostProc.
Add a new UID range for supplemental processes.
Since data usage related code is going to move to mainline module,
hidden classes and methods can no longer be accessed. Thus,
expose the needed system apis since there is no alternative.
Test: TH
Fix: 215152167
Bug: 204830222
Change-Id: I41046f90b9ff8f1755304e5d289584d39599fd13
These are processes that are spawned alongside regular app processes.
They have their own UID range, such that they can be properly isolated
from applications.
Add some APIs in Process that allows the system and mainline
modules to verify that a particular UID belongs to a supplemental
process, and to map between the supplemental process and the
corresponding app process.
Bug: 215012578
Test: N/A
Change-Id: I02aaaa1c2bcf9d141ddc97747eb6d7edd52d7b92
In order for Bluetooth to be a mainline module, we need to
remove all hidden APIs calls from and to it. NFC_UID is
used inside BluetoothManagerService so we need to be able
to access it.
Tag: #feature
Test: make
Bug: 211851706
Change-Id: Ie778c4467f5db1efa1f759c405373cc3e34747ca
As part of Android S, the restriction was enforced by CDD but the user creation flow did not
block creation of clone profile. Creating changes that will add user restriction
of type UserManager.DISALLOW_ADD_CLONE_PROFILE while setting up device
owner. This restriction is checked while user creation flow and throws
UserManager.CheckedUserOperationException. When the device owner is
removed, the user restriction UserManager.DISALLOW_ADD_CLONE_PROFILE is
removed and creation of clone profile is allowed.
Bug: 211862605
Test: 1. atest FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest
2. atest FrameworksServicesTests:com.android.server.pm.UserManagerTest
3. Manually tried creation of clone profile before setting device
owner, able to create clone profile
4. Manually set device owner and tried to create clone profile, unable to
create clone profile
5. Manually removed device owner and tried to create clone profile, able
to create clone profile.
Change-Id: Id87756601a25323e06036a3193f6a7f8f53fa71d
The LogcatManagerService monitors all privileged (in AID_LOG group)
access to logd. Only Root and System Server can read the logd data
without tracking. Whenever the logd recieve privileged read data request,
the request is forwarded to the LogcatManagerService.
The LogcatManagerService can approve or decline the request via
binder RPC on logd service. The binder call is enforced by sepolicy.
That means only LogcatManagerService can use the logd binder service.
And only logd can use the logcat binder service.
The next step will add user consent requirement for the logd access.
Bug: 197901557
Test: Reboot the device, then run "adb logcat" multiple times
both during the booting and after the booting. The control flow goes
correctly as we expected.
Ignore-AOSP-First: pending fix for logcat privacy issue
Change-Id: I5e225b65357e7bfacd5c6c9cb4fab5f309803193