This reverts commit 871f47c2200b58e06f97c0bc1e5f99f412692857,
fixes the blacklist and enables @Presubmit. Also removes
unnecessary @TargetApi.
Test: run FrameworksCoreTests
Change-Id: I20176b4585d25a023389b3af6fbff63fca432548
When there is a very early system server runtime restart, we may not
yet have a published BatteryManagerInternal, so we need to go directly
to the "batteryproperties" native service to detect the USB state.
Test: builds, rescue is suppressed when USB is connected
Bug: 34872406
Change-Id: I949984cb95495c77de85ac322075177cff07b8b6
This reverts commit 2e7d6d64b9b16ea27634bc0e8843717a465142b4.
Bug: 35590590
Fix: 35590106
Test: runtest managed-provisioning
Test: manual verified that work profile can be inflated
Change-Id: Ie780b94053e65bca2f96b32055937c0c9e8beae8
The previous changes to these files, which inlined the behavior
of Assert.assertTrue() were done in a hurry to fix the build.
This change makes use of the existing Utils.assertTrue() method
that was created for this purpose.
Bug: 30188076
Test: make checkbuild
Change-Id: Iacd505f8c3f7cefe6de94d30b56e39600bb9b0af
Stop interning string metadata values as well as class names as it's
unlikely there will be much duplication among these.
Also make sure we intern the same set of strings when parsing packages
from their cache entries as we do when parsing them from the package
itself.
This change also improves error reporting for the unit-test and fixes
a failure that was introduced by a previous change (the addition of
static libraries).
Test: PackageParserTest
Bug: 34726698
Change-Id: Ia0d0342b91b3294bd5569756255918d1dc886e05
When passed a color, resolveThemeAttribute was not parsing the value
into the .data field.
Bug: http://b.android.com/232870
Test: Added new test
Change-Id: I9d91e3a70c24f1e71d9d89977fe79b0965e98893
When the screen is off, MediaSessionService doesn't get the volume key
long-press events from the PhoneWindowManager because PhoneWindowManager
intercepts them and only sends initial down and up events.
This is intended because users cannot see the safety warning dialog
which warns users about too loud volume.
This CL assumes that volume key is long-pressed if the key up doesn't
happen after the initial down within the long-press timeout, and notify
them with IOnVolumeKeyLongPressListener.
Bug: 35328001
Test: Manual test
Change-Id: I3b5aec4c2dd66a181bf41786f1417cc65874356c