The system is often willing to clear cached data to make room for
incoming installs, so use StorageManager.getAllocatableBytes() when
making "does it fit?" style decisions.
Add new INSTALL_ALLOCATE_AGGRESSIVE flag, which will flow through
to use StorageManager.FLAG_ALLOCATE_AGGRESSIVE when making allocation
related requests. (This can be used by installers to indicate
packages that are critical to system health or security.
Test: runtest -x frameworks/base/core/tests/coretests/src/android/content/pm/PackageHelperTests.java
Bug: 36131437
Change-Id: If8118762fd1ca1f497d2cdd1787bdb3c9759dcc0
checkpoint modifies the underlying log rather than reading timestamps.
reset replays without going back to the underlying log.
add a test
Bug: 32982362
Test: runtest --path frameworks/base/core/tests/coretests/src/android/metrics
Change-Id: I381b203a1c24fcd098d7df4d9d0a50bd8aaa1309
Allow all client targeting Android O to assume paging
support for any provider.
Adds a new PageViewCursor that adapts an unpaged cursor
to a paged request.
Updates ContentProviderNative to perform wrapping on
unpaged results.
Bug: 30927484
Change-Id: I4e225dc16761793c85ef8a195bf049113c79cd20
Test: Added for new class. Run info @ frameworks/base/core/tests/coretests/README
This CL adds the APCT tests within this project to
a similar suite as CTS known as device-tests.
The current method of running APCT tests in the infrastructure
is unaffected.
Bug: 35882476
Test: `make dist device-tests -j` and local builds of
continuous_instrumentation_tests & continuous_native_tests
Change-Id: Ifa382fe691842c1cd76897775b9e2a1653449eb5
This CL contains following clean up:
- Hide unnecessary constructors.
- Change List<XX> to XX[] since actually all fields are immutable.
- Change font's variant type from String to int.
- Decouple resource related members to FontResourcesParser.
- Add NonNull/Nullable to all fields.
Test: ran android.content.res.FontResourcesParserTest
Change-Id: If456266ffff86d41342572a19662cc8f3cd13181
Detaching a Counter from a TimeBase means you can't use it anymore.
Only newly constructed Counters are automatically attached to a TimeBase.
Bug: 34200689
Test: make FrameworkCoreTests && adb install ... && adb shell am instrument -w -e class com.android.internal.os.BatteryStatsSensorTest com.android.frameworks.coretests
Change-Id: I9309000d5625aa6fe61a3c05f135e5828137d8ce
Currently the system setting, HDMI_SYSTEM_AUDIO_ENABLED, is used to
store the latest system audio mode status so that TV can keep this
status over reboot. But because the name is a little confusing and the
behavior isn't intuitive, it is likely to use this in a wrong way.
This change renames this setting to HDMI_SYSTEM_AUDIO_CONTROL_ENABLED
and tweak the purpose of it. Now, it will act more like a switch for
System Audio Control feature, so user can disable or enable this feature
entirely. With this way, implementation of audio output option will
also become easier.
Bug: 31449672
Test: Tested on archer
Change-Id: Ice8717135272d4b86665a3452bfe7527c0d6c08b
(cherry picked from commit 7b7aa8fb31ccf0cd3f36162a52f080263dd89e77)
This was requested by the current users, need to state
that a font is unavailable (needs downloading) or that
the query is unsupported.
Also add tests :)
Test: runtest --path frameworks/base/core/tests/coretests/src/android/provider/FontsContractTest.java
Also CTS attached to topic
Bug: 35097775
Change-Id: Ib15bf4c70185d81a4c20426722eb44c4210771c2
This change will affects 2 types of apps: autofill service implementations
and apps that use autofill APIs.
Since just the former is known to be used at the moment, we're not trying
to keep backward compatibility with the latter.
Bug: 35956626
Test: CtsAutoFillServiceTestCases pass
Test: android.provider.SettingsBackupTest pass
Change-Id: Ia720083508716deae9e887f9faa7ae7c5a82f471
The BatterySaverPolicy is designed to consolidate all battery saver
knobs into a central location. Usually it is consistent to
mLowPowerModeEnabled unless it gets different data for specific
service. By adding these knobs, we can effectively tune the battery
saver.
This cl sets up the framework for BatterySaverPolicy and updates
following service to get battery saver data from BatterySaverPolicy
1. GnssLocationProvider
2. VibratorService
3. WindowManagerService
4. BackupManagerService
5. SoundTriggerService
6. NetworkPolicyManagerService
Screen brightness will come in a following cl.
Bug: 34693888
Test: FrameworksServicesTests
Change-Id: I6b040e93391614b44d136a485faa4a332c396e51
All the cool kids are using storage in increments of 1000 instead
of 1024, so find a balance somewhere between the two. We still round
to nice values like 32GB, 64GB, etc, but we represent them using
kilobytes under the hood.
Test: runtest -x frameworks/base/core/tests/coretests/src/android/os/FileUtilsTest.java
Bug: 28327846
Change-Id: I573aea43790816291e2b5c784b344b51b4444c06
To do this, the developer must specify the set of certificate
hashes that represent the authority's app. This allows us to
verify that the authority we find is indeed the one intended
by the developer.
Bug: 35025705
Test: runtest --path frameworks/base/core/tests/coretests/src/android/provider/FontsContractTest.java
runtest --path frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java
CTS attached to topic
Change-Id: I605f9a93bbca8705936ead08efb4a5b4fdcc4882
Littlemock appears to have been created as an alternative to
Mockito that would work on Android. Given that Mockito does
now work on Android and Littlemock has had no activity since
Aug 2012 it seems prudent to switch over to use Mockito instead.
https://code.google.com/archive/p/littlemock/
This is being done as part of the work to upgrade Mockito.
Bug: 32912773
Test: Build and install affected APKs, test using am instrument
Change-Id: Id0e57880ea66c5681b664bbfb534c96410544665
- When registering and notifying observers, we should use the user in the
context as opposed to current user.
- Relax the permission check while registering and notifying content observers
to use INTERACT_ACROSS_USERS instead of INTERACT_ACROSS_USERS_FULL permission.
Change-Id: I973936903d4a2272c5722f3b98a057a40c0402be
Fixes: 32955100
Test: Created managed profile and verified that there are not failures.
runtest -x core/tests/coretests/src/android/content/SecondaryUserContentResolverTest.java
runtest -x core/tests/coretests/src/android/content/ManagedUserContentResolverTest.java
Two reason for merge:
1. Currently graphicstests aren't runned as part of acpt
2. Separation was confusing: android.graphics package existed in both apks: frameworks & coretests.
Test: refactoring CL.
Change-Id: I0ade3ebbc2d06074ae81a2c390475f1f434dd873
Both inherit from package private BaseParceledListSlice.
This is still bad, but it's not as bad. The existing code that uses
this can just do Foo.bar().getList() now instead of having to marshal
to and from an oddball type at either end as well.
In the longer term ParceledListSlice<> should be eliminated, but it's
not clear how far into the future that is going to happen.
Test: runtest -x services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
Test: runtest -x core/tests/coretests/src/android/content/pm/ParceledListSliceTest.java
Change-Id: Ie69b96b5215d6e04990f6d31345772cdfee21d78