2387 Commits

Author SHA1 Message Date
TreeHugger Robot
713b869aad Merge "Expose Typeface creation APIs with ttc and font variation." 2017-03-21 22:50:20 +00:00
Seigo Nonaka
20e5d91739 Expose Typeface creation APIs with ttc and font variation.
Introduce Builder class for creating Typeface from various
sources with optional TTC index and font variation settings.

Bug: 33062398
Test: Manually verified new Builder create Typeface.
Change-Id: Ia23ee6a73516707d854c7387fe75fbb22f80673d
2017-03-21 13:27:33 -07:00
Craig Donner
dc4796c209 Allow setting a persistent VR thread.
Bug: 36215076
Test: adb shell am instrument -w -e class \
android.os.SetPersistentVrThreadTest \
com.android.frameworks.coretests/\
android.support.test.runner.AndroidJUnitRunner
cts-tradefed run cts -m CtsVrTestCases -t android.vr.cts.VrSetFIFOThreadTest
Change-Id: If2f3a5f1c8593c74ac35964f68dcbe75b4da472e
2017-03-20 13:04:36 -07:00
Jeff Sharkey
683bcd30ef Use allocatable space when measuring for install.
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
2017-03-18 17:54:54 -06:00
Chris Wren
1488055804 revise the reader semantics
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
2017-03-18 09:13:10 -04:00
TreeHugger Robot
587b60282e Merge "frameworks/base: Add APCT tests to the device-tests suite." 2017-03-16 17:35:12 +00:00
TreeHugger Robot
c2d761a445 Merge "Adapt unpaged cursors to paged requests." 2017-03-15 23:59:26 +00:00
Steve McKay
e5f868fd31 Adapt unpaged cursors to paged requests.
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
2017-03-15 15:29:52 -07:00
Simran Basi
473a16e492 frameworks/base: Add APCT tests to the device-tests suite.
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
2017-03-15 14:46:27 -07:00
Seigo Nonaka
ac873c9f25 Clean up public FontConfig APIs
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
2017-03-15 10:16:55 -07:00
Donghyun Cho
f24d7255c2 Merge "CEC: Revisit the behavior of HDMI_SYSTEM_AUDIO_ENABLED" 2017-03-14 04:54:38 +00:00
TreeHugger Robot
32d08a1440 Merge "BatteryStats: Prevent double-detaching Counter" 2017-03-14 01:34:26 +00:00
Adam Lesinski
5f212c86a4 BatteryStats: Prevent double-detaching Counter
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
2017-03-13 22:39:24 +00:00
Donghyun Cho
c1fa9afbcd CEC: Revisit the behavior of HDMI_SYSTEM_AUDIO_ENABLED
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)
2017-03-13 20:00:58 +09:00
Paul Duffin
5c318a00da Use --multi-dex native to avoid dex limit
Bug: 32912773
Test: make checkbuild
Change-Id: I70fed0e838003fb7909838696fa6ceed66e99711
2017-03-11 18:02:22 +00:00
TreeHugger Robot
a2b2a29078 Merge "Allow Font providers to return status codes" 2017-03-10 18:10:43 +00:00
Clara Bayarri
bacf2352ab Allow Font providers to return status codes
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
2017-03-10 16:24:04 +00:00
TreeHugger Robot
642028fccd Merge "Replaced auto-fill by autofill to keep it consistent with API style." 2017-03-10 07:05:41 +00:00
TreeHugger Robot
05eb84582e Merge "Address comments from API council." 2017-03-10 02:32:58 +00:00
Chris Wren
67b3eb953f add process ID to LogMaker
Bug: 32806111
Test: runtest --path frameworks/base/core/tests/coretests/src/android/metrics
Change-Id: I3efa38a6b25502def3ba7ace04b6ba76e4d1a6cb
2017-03-09 15:57:44 -05:00
Felipe Leme
640f30a776 Replaced auto-fill by autofill to keep it consistent with API style.
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
2017-03-09 08:14:49 -08:00
Lei Yu
30d69eaf86 Merge "Add BatterySaverPolicy for power save mode" 2017-03-08 20:02:46 +00:00
TreeHugger Robot
cf8a98af48 Merge "Grumble, nobody likes kibibytes." 2017-03-08 18:16:42 +00:00
Joachim Sauer
40034ccac1 Merge "Renaming Czech Republic to Czechia." am: 33bade08de am: 260b81aaf2
am: d06f548226

Change-Id: Ie7c7c3415738623c184e2e9e96d85cbe05cbfee7
2017-03-08 17:50:44 +00:00
Joachim Sauer
260b81aaf2 Merge "Renaming Czech Republic to Czechia."
am: 33bade08de

Change-Id: Ie76ebb1bd53eb4993f0d01c7d3b5ba7dae9c6504
2017-03-08 17:40:13 +00:00
Joachim Sauer
33bade08de Merge "Renaming Czech Republic to Czechia." 2017-03-08 17:31:27 +00:00
jackqdyulei
455e90add2 Add BatterySaverPolicy for power save mode
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
2017-03-08 09:20:36 -08:00
Paul Duffin
631ea26c49 Merge "Replace usages of littlemock with mockito" am: 0a11c83016 am: b29311bbba
am: 48a78f4852

Change-Id: I826f98625ce3fbc57f71d72bc0bfdabd3ff92b06
2017-03-08 15:09:13 +00:00
Paul Duffin
b29311bbba Merge "Replace usages of littlemock with mockito"
am: 0a11c83016

Change-Id: I1456ae3d07d396080a817de01796eefc71230981
2017-03-08 14:59:26 +00:00
Jeff Sharkey
09734df8bc Grumble, nobody likes kibibytes.
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
2017-03-07 20:52:29 -07:00
TreeHugger Robot
6587430d6f Merge "AdaptiveIconDrawable should handle all usage cases of setBounds Test: runtest --path=frameworks/base/core/tests/coretests/src/android/graphics/drawable/AdaptiveIconDrawableTest.java" 2017-03-08 00:02:44 +00:00
Hyunyoung Song
0bbf4f5974 AdaptiveIconDrawable should handle all usage cases of setBounds
Test: runtest --path=frameworks/base/core/tests/coretests/src/android/graphics/drawable/AdaptiveIconDrawableTest.java

b/35950873
b/35673169
b/34902453

adb  shell am instrument -e class 'android.graphics.drawable.AdaptiveIconDrawableTest' -w 'com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner'
android.graphics.drawable.AdaptiveIconDrawableTest:..

Time: 1.241

OK (2 tests)


Change-Id: I6498f6acc782a30188fc2afc50781cef83e4747b
2017-03-07 11:42:29 -08:00
Chris Wren
37d9f06e5b delete obsolete tests
this code was removed in I94732c84564e4cb25d77b63be8beb4aab4c38985

Test: tests are deleted
Change-Id: I1dd466ec8c91de3e39d8019882a92f03aba4f357
2017-03-07 13:24:18 -05:00
TreeHugger Robot
a61627935e Merge "Support non-system Font Providers" 2017-03-07 18:17:15 +00:00
Chris Wren
a7c1b80f5f add clear methods to LogMaker
To support object reuse.

Test: runtest --path frameworks/base/core/tests/coretests/src/android/metrics
Bug: 36020746
Change-Id: I09e5689da70963e9aba3bd8428a55acfcbe4e92a
2017-03-07 10:41:39 -05:00
Clara Bayarri
3c4be77db9 Support non-system Font Providers
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
2017-03-07 14:59:33 +00:00
Paul Duffin
9df5d4f715 Replace usages of littlemock with mockito
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
2017-03-07 13:55:52 +00:00
TreeHugger Robot
23f3508b2a Merge "Add @LargeTest to (Secondary|Managed)UserContentResolverTest classes." 2017-03-06 22:45:40 +00:00
Santos Cordon
25e333cb3c Merge "Add VR_DISPLAY_MODE settings to be backed up." 2017-03-06 21:56:07 +00:00
Sudheer Shanka
f5666dc801 Add @LargeTest to (Secondary|Managed)UserContentResolverTest classes.
Test: runtest -c android.content.SecondaryUserContentResolverTest frameworks-core
      runtest -c android.content.ManagedUserContentResolverTest frameworks-core

Change-Id: I2e9c944c03d1b8a99105b90348634939cea9fc7f
2017-03-06 12:57:57 -08:00
Garfield Tan
b690b4de06 Address comments from API council.
Test: Code builds and tests pass. Also some manual tests around ESP.
Bug: 35813037
Bug: 35812990
Change-Id: Ia9d3a3964e9a83d0c1c08e5db4c2e231504aa99a
2017-03-02 12:48:13 -08:00
TreeHugger Robot
c20082bd46 Merge "Change MaskableBitmap to AdaptiveBitmap Test: $ make dist -j30 b/35399620" 2017-03-02 15:15:43 +00:00
Hyunyoung Song
e4179e2c4e Change MaskableBitmap to AdaptiveBitmap
Test: $ make dist -j30
b/35399620

Change-Id: I96d6eaceaf7ce9dec7de21634a5fa2bd40b0deba
2017-03-01 15:14:02 -08:00
TreeHugger Robot
fb64de06cd Merge "Use context's userId in ContentResolver class." 2017-03-01 21:49:30 +00:00
Sudheer Shanka
b4e2ddde4f Use context's userId in ContentResolver class.
- 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
2017-03-01 12:03:10 -08:00
Sergey Vasilinets
11faa0f79a Merge "Move graphicstests to coretests" 2017-03-01 19:20:58 +00:00
sergeyv
aad8ae3e3d Move graphicstests to coretests
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
2017-02-28 18:28:27 -08:00
TreeHugger Robot
a7aaae881c Merge "Delete ParcelableString, add StringParceledListSlice" 2017-02-28 22:09:06 +00:00
Santos Cordon
5bce494b93 Add VR_DISPLAY_MODE settings to be backed up.
Test: use adb backup to backup/restore and verify value is carried over.
Bug: 34437367
Change-Id: Icefc6bb1ae2f6410580214d0fe4fe4bd40038f46
2017-02-28 12:05:37 -08:00
Robin Lee
abaa0695c5 Delete ParcelableString, add StringParceledListSlice
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
2017-02-28 18:07:08 +00:00