... and use specific power components, such as POWER_COMPONENT_SCREEN
Bug: 184397335
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Test: mp :BatteryStatsViewer && adb shell am start -n com.android.frameworks.core.batterystatsviewer/.BatteryStatsViewerActivity
Change-Id: I551b2d37d2da77e21e622961f5290b55fb24da61
Add hidden APIs to expose the supported frequency range and maximum
amplitudes at each frequency for the device in Vibrator.java.
Also add a hidden method hasFrequencyControl().
Bug: 167947076
Test: VibratorTest
Change-Id: If2d5f8f0aa92223b4a342893f5fd3a1668dfcff1
Add a new hidden API to Vibrator and VibratorManager that allows
vibrations to be cancelled based on their usage attribute.
The new API is used by the NotificationManagerService on volume button
press to only cancel ongoing attentional haptics, triggered for alarm,
notification or ringtone.
Fix: 182440404
Test: VibratorManagerTest & BuzzBeepBlinkTest
Change-Id: I4bf55928cf3b7dd79f66d53d570001a5205ce2d0
The change makes the distinction between VibrationEffect and
CombinedVibratio clearer. The later is a combination of the former with
the extra information about the vibrator ids, allowing effects to be
played in one or more vibrators in parallel or in sequence.
The methods create/start synced where also renamed to parallel (together
with respective builder classes), to indicate they perform one or more
effects in parallel on multiple vibrators. This is also a better match
to the sequential combinations.
This change also deprecates the Context.VIBRATOR_SERVICE in favour of
the new VIBRATOR_MANAGER_SERVICE. The default vibrator can be retrieved
from the manager system service.
Same deprecation applied to InputDevice.getVibrator method.
Fix: 184123900
Test: CombinedVibrationTest
Change-Id: I44d8b225098d35fbf7783254acaf6a78f9fb4505
As per the manpage, sendfile(2) might fail for the following reasons:
1. input fd doesn't support mmap
2. output was opened with O_APPEND
If sendfile(2) fails with EINVAL or ENOSYS, we fallback to userspace
copy
Fixed failing FileUtilsTest#convertToModernFd test since
I7d6ecf4549e8ed5134d20977c2089240be804827 that stoped matching valid
files to convert to modernfd with regex
Test: atest FileUtilsTest
Bug: 184236915
Change-Id: I0955fe2a7dfb40ac1f78bde4a325eb624a34f28b
The change including the following items
1. Add error code for armRebootEscrow
2. Fail the armRebootEscrow for mismatching ror providers.
3. clear the escrow data for fatal armRebootEscrow
4. clear the RoR preparation state in recovery system for fatal
armRebootEscrow
Bug: 183140900
Test: atest FrameworksServicesTests:RebootEscrowManagerTests;
atest FrameworksServicesTests:RecoverySystemServiceTest;
Change provider before reboot, reboot-and-apply failed;
Change-Id: I266ea6f2e1c77994d5cc8c2713106c527c4e0722
As API review feedback, rename Build#VERSION#FIRST_SDK_INT to
Build#VERSION#DEVICE_INITIAL_SDK_INT. As well as update all usage
in frameworks and tests.
Bug: 184735771
Test: m
Change-Id: I72660959cb4e638a8e80fcf2f4e96ea172969f44
The clients of resume on reboot want additional information for
reboot failures, so they can handle these failures better.
Therefore expose the reboot failure error code via SystemApi.
Bug: 183646725
Test: atest FrameworksServicesTests:RecoverySystemServiceTest;
Do an RoR with gmscore
Change-Id: Ia02655218194a070ce02e9dae6fd62e19259c9f9
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
Introduce a Build.isDebuggable() getter instead of the IS_DEBUGGABLE
static member.
Also make it module API as APK modules now have access to module APIs in
S, but also TestApi so it can be tested.
Test: m
Fixes: 182345786
Change-Id: I25d0848aee758792bbaba8ab73b5dd997a7250b3
As API review feedback, the information provides no value to a
user. Remove it from BatteryStatsManager#reportWifiRadioPowerState
and BatteryStatsManager#reportMobileRadioPowerState.
Fix: 184735838
Test: make update-api
Change-Id: I8cce6523695ba58654cbe5d1db79045eeb46d913
Besides UI contexts, the context created via
Context#createConfigurationContext with a proper configuration
should be allowed to inflate views or obtain ViewConfiguration.
An example is that a wear device inflate views into bitmap and pass
the bitmap to the Wear OS Companion app on the phone.
Bug: 177847640
Test: atest StrictModeTest
Change-Id: Iab232a80a973f54bf0484262d45af3e4c2f0e5dc
This method will be used for testing and visualization purposes.
Bug: 184207674
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Change-Id: Id28ba4cbb8f27774f36248678f93ec187bc022b3
This got plumbed all the way through except for the final step of
reporting this from the Vibrator object. Doh.
Bug: 182612056
Test: manual
Change-Id: I4282ff7914266589f0f61246fe42e8ef58e70460
The definition of SystemBatteryConsumer.getConsumedPower()
has been changed to include power attributed to apps.
That power is also included in UidBatteryConsumers, so we
ended up double-counting power attributed to apps.
Bug: 183235836
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Change-Id: Ib99b3ce910b62528241e271bdb3b925a9ac01830