Commit Graph

18553 Commits

Author SHA1 Message Date
TreeHugger Robot
a22a7c2f97 Merge "Add DevicePolicyManager.isEphemeralUser" 2017-12-12 18:40:04 +00:00
TreeHugger Robot
ec646687c3 Merge "Add Slice.Builder#addBundle" 2017-12-12 16:44:13 +00:00
Seigo Nonaka
b507df4569 Merge "Introduce PremeasuredText" 2017-12-12 16:40:27 +00:00
Jason Monk
fed72bf199 Add Slice.Builder#addBundle
Its for support lib expansion in the future, not for dev use.

Bug: 68378561
Test: atest cts/tests/tests/slice
Change-Id: Ifc73e56c391bd4abed3b8db3c597d7dc794c1a3c
2017-12-12 09:30:28 -05:00
Seigo Nonaka
fbe63bddd6 Introduce PremeasuredText
By measuring the character widths beforehand, we can save at least 40%
of the StaticLayout construction time which typically happens on UI
thread.
Also verified this doesn't cause performance regression for not
premeasured text.

Raw performance score (Not premeasured -> premeasured, median, N=100)

No Style,   Greedy, Hyphenation OFF:  7,812,975 ->    503,245 (-93.6%)
No Style, Balanced, Hyphenation OFF:  7,843,254 ->    396,892 (-95.0%)

No Style,   Greedy, Hyphenation ON : 19,134,214 -> 11,658,928 (-39.1%)
No Style, Balanced, Hyphenation ON : 19,348,062 -> 11,634,942 (-39.9%)

Styled,     Greedy, Hyphenation OFF: 14,353,673 ->    572,840 (-96.0%)

Raw performance score (w/o patch -> w/ patch, median, N=100):

No Style,   Greedy, Hyphenation OFF:  7,732,894 ->  7,812,975 (+1.04%)
No Style, Balanced, Hyphenation OFF:  7,884,510 ->  7,843,254 (-0.52%)

No Style,   Greedy, Hyphenation ON : 18,986,958 -> 19,134,214 (+0.78%)
No Style, Balanced, Hyphenation ON : 19,232,791 -> 19,348,062 (+0.60%)

Styled,     Greedy, Hyphenation OFF: 14,319,690 -> 14,353,673 (+0.24%)

Bug: 67504091
Test: bit CtsTextTestCases:*
Test: bit CtsGraphicsTestCases:*
Test: bit CtsWidgetTestCases:*
Test: FrameworksCoreTests:android.text.MeasuredTextTest
Change-Id: I0b46f04b42cc012606a9c722eca0d51147a0dcc7
2017-12-11 18:55:12 -08:00
Hall Liu
0afd2d0288 Merge "Add CarrierConfig key for RTT support" am: e5a913661d am: 79dc6fb815
am: 6365fde4c0

Change-Id: I652fb64918aaf7dbd87910d35329b2752914e937
2017-12-12 02:46:53 +00:00
TreeHugger Robot
4c2009c236 Merge "Make TelephonyManager#getEmergencyCallbackMode SystemApi" 2017-12-12 01:30:03 +00:00
Hall Liu
47ed62080f Add CarrierConfig key for RTT support
Add the carrier config key.

Test: add fake support for some random carrier, look for the capability
Bug: 63934808
Change-Id: I8a0e33a7ac10fbdcad356059913e7ddcba26bb6c
2017-12-11 14:41:31 -08:00
TreeHugger Robot
8c919fd93c Merge "Introduce API to enable existing packages on shared users" 2017-12-11 22:21:12 +00:00
Jason Monk
740a650dac Change colors to allow transport of more generic ints
This is in preparation for sliders, also add some hints/types that
will be used for sliders.

Test: atest cts/tests/tests/slice
Bug: 68378584
Change-Id: I8f6a8bb7c80854b51c421a437318975f517a2169
2017-12-11 14:44:00 -05:00
Alex Chau
5343fcb77d Introduce API to enable existing packages on shared users
- Also unhide setKeepUninstalledPackages
- installExistingPackage accpets delegation API because all app
  managemnet PIs did the same, including setKeepUninstalledPackages and
  enableSytemApp

Bug: 70017947
Bug: 65842106
Test: Install apps already installed in u0 in shared user should succeed
Test: Install apps in setKeepUninstalledPackages cache in shared user
      should succeed
Test: Install apps via delegated package should succeed
Test: Install apps via unaffiliated profile owner should fail
Test: Install apps not installed in any user or in APK cache shoudl fail
Change-Id: Iba563b2050abd0d1f46bfa06cfc0526b7b476b3b
2017-12-11 14:13:00 +00:00
Alex Chau
8d6e18c879 Add DevicePolicyManager.isEphemeralUser
Bug: 67580550
Test: The AP returns false in primary user.
Test: Create ephemeral user with createAndManageUser, ensure the API return true.
Change-Id: I1e670ca8a8c6171ddb94a1e4b1cb1a958f12919d
2017-12-11 13:44:00 +00:00
TreeHugger Robot
0b62766d27 Merge "API Review: Drop "Button" in is/setLogoutEnabled method" 2017-12-11 06:35:31 +00:00
Tarandeep Singh
521fa713bd Merge "Move IME related API methods from IMM to IMS." 2017-12-09 01:35:04 +00:00
TreeHugger Robot
21ce736414 Merge "PROTECTION_FLAG_VENDOR_PRIVILEGED as @TestApi" 2017-12-09 01:10:58 +00:00
Tarandeep Singh
d8d03a8e1b Move IME related API methods from IMM to IMS.
InputMethodManager is public InputMethod API for apps. The methods
that take Window-token as parameter are restricted to system
and/or IME developers. Such methods should really live
in InputMethodService.
This CL deprecates such methods in IMM and moves them to IMS.

This is the first step towards simplifying IME APIs.

Bug: 70282603
Test: atest InputMethodManagerTest
Change-Id: I3163f3cbe557c85103ca287bee0874a3b4194032
2017-12-08 10:40:38 -08:00
Alex Chau
d795827c31 API Review: Drop "Button" in is/setLogoutEnabled method
Bug: 70336452
Test: Logout button can still be controlled

Change-Id: I2ac24c4dec1ce90a77037a6415b4a6f77e959965
2017-12-08 11:32:23 +00:00
Jiyong Park
2f24f039c3 PROTECTION_FLAG_VENDOR_PRIVILEGED as @TestApi
The flag is used in CTS.

Bug: 70332172
Test: cts-tradefed run commandAndExit cts-dev -m CtsPermission2TestCases
-t
android.permission2.cts.PermissionPolicyTest#testPlatformPermissionPolicyUnaltered

Change-Id: Iba4ce1475991249980cc6a403037f4dd7bf722e5
2017-12-08 12:25:25 +09:00
Dianne Hackborn
f4ef6eb5f5 Changes need to implement heavy-weight gaming app tests.
We need to expose the CANT_SAVE_STATE importance for CTS to use.

I also found a serious issue with how instrumentation ApplicationInfo
is set up, where it doesn't have lots of important stuff like the
targetSdkVersion!  This is now fixed...  though ghod knows how this
will impact existing CTS tests, there could certainly be stuff relying
on code thinking it is running as targetSdk 0. :(

Finally delete the CantSaveState tests here, they are going to CTS.

Bug: 63937884
Test: ran new CTS tests
Change-Id: I42a73e0e83d799f8e5ff8ac4d4704a74ab5aab3e
2017-12-07 16:32:06 -08:00
Geoffrey Pitsch
7c95a682ba Merge "New supported QuickViewConstant feature to delete a file." 2017-12-07 21:32:29 +00:00
Jack Yu
c7efe16191 Merge "Moved data connection response into system api." 2017-12-07 19:01:29 +00:00
TreeHugger Robot
b2795710f3 Merge "DevicePolicyManager: Add key generation functionality." 2017-12-07 18:20:45 +00:00
TreeHugger Robot
734afbe61e Merge "Moar changes for Autofill Field Classification mechanism:" 2017-12-07 17:35:23 +00:00
Eran Messeri
852c8f121f DevicePolicyManager: Add key generation functionality.
This is the crux of the Verified Access feature implementation:
Adding the ability to generate KeyChain keys directly by the
secure hardware, rather than installing software-generated keys
into KeyChain.

Add generateKeyPair to the DevicePolicyManager, which delegates key
generation (via the DevicePolicyManagerService) to the KeyChainService.

Design highlights:
* The key generation is delegated via the DevicePolicyManagerService to
  check that only authorized callers request key generation in KeyChain.
* KeyChainService performs the actual key generation so it owns the key
  in Keystore outright.
* DevicePolicyManagerService then grants the calling app access to the
  Keystore key, so it can actually be used.
* Loading the public/private key pair, as well as attestation
  certificate chain, is done in the client code (DevicePolicyManager)
  to save parceling / unparceling those objects across process
  boundaries twice (for no good reason).

NOTE: The key attestation functionality (that includes Device ID) is
missing/untested. Will be added in a follow-up CL as this one is quite
big already.

HIGHLIGHT FOR REVIEWERS:
* API: New API in DevicePolicyManager.

Bug: 63388672
Test: cts-tradefed run commandAndExit cts-dev -a armeabi-v7a -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testKeyManagement -l DEBUG; adb shell am instrument 'android.security.tests/android.support.test.runner.AndroidJUnitRunner' (After building the KeystoreTests target and installing the apk)
Change-Id: I73762c9123f32a94d454ba4f8b533883b55c44cc
2017-12-07 15:12:30 +00:00
Jack Yu
e44609b158 Moved data connection response into system api.
This is a preliminary step for IWLAN refactoring, where data response
will be one of the parameter in data service callback.

Test: Telephony sanity tests
bug: 64132030
Change-Id: I7eb5318cd75ca3b7a29d5bf0da18d6b29a228ee1
2017-12-07 00:27:17 -08:00
Jeff Sharkey
2337aec921 Deeper sanity checking of emitted types.
When emitting a method or field, verify that we're able to reference
all mentioned types.  This ensures that we don't accidentally
reference undefined classes/interfaces.

Test: manual inspection of API files
Bug: 69791141
Change-Id: I84e0c87fe83daa118661f61dbdf17b58ea5282d4
Merged-In: I84e0c87fe83daa118661f61dbdf17b58ea5282d4
2017-12-07 00:22:25 -07:00
Jeff Sharkey
bc4f48b21d Emit all APIs using Predicates.
Generate APIs using updated doclava.

Test: manual inspection of API text files
Bug: 69505783
Change-Id: I2efd22998a64ebb57588b073c4a591242f4aef91
Merged-In: I2efd22998a64ebb57588b073c4a591242f4aef91
2017-12-06 21:56:12 -07:00
TreeHugger Robot
a8b9e2a545 Merge changes from topics "moar_fields", "fc_refactor_score"
* changes:
  Implemented autofill field classification on multiple fields and user data.
  Refactored the FieldsClassification score mechanism.
2017-12-06 23:03:17 +00:00
TreeHugger Robot
081be42c27 Merge "Introduce getProfileSwitchingIcon/Label In CrossProfileApps" 2017-12-06 22:56:17 +00:00
TreeHugger Robot
dac644cd4a Merge "Deprecate inKeyguardRestrictedInputMode" 2017-12-06 22:27:51 +00:00
Felipe Leme
329d04097e Moar changes for Autofill Field Classification mechanism:
- Changed max score to float (range 0.0 - 1.0).
- Replaced getTopMatch() to getMatches().
- Created a Scorer interface with a default edit-distance implementation.
- Added a isFieldClassificationEnabled() method.

Test: atest CtsAutoFillServiceTestCases:FieldsClassificationTest
Test: atest CtsAutoFillServiceTestCases:EditDistanceScorerTest
Test: atest CtsAutoFillServiceTestCases:UserDataTest
Test: atest FrameworksCoreTests:SettingsBackupTest

Bug: 68045531

Change-Id: Ice6cbf548053b86b47980d9664a3a21219c0ff08
2017-12-06 13:14:15 -08:00
Felipe Leme
bb6bfea680 Refactored the FieldsClassification score mechanism.
Before, FillEvent.getFieldsClassification() returned a map of remote ids and
scores. Now, it returns a Map of FieldClassication by AutofillId, which allows
multiple fields and scores for multiple user datas (although the initial
implementation supports only the top match for a field).

This is mostly a refactoring CL, as the implementation is still saving just one
user data entry and one field. But full support is coming next...

Test: atest CtsAutoFillServiceTestCases:FieldsClassificationTest
Test: atest CtsAutoFillServiceTestCases:UserDataTest
Test: atest CtsAutoFillServiceTestCases:FieldsClassificationScorerTest

Bug: 68045531

Change-Id: I08b29f24efbd527216f9bce2343e1bcd4b4554c0
2017-12-06 11:20:10 -08:00
TreeHugger Robot
a044c1d27e Merge "Introduce more user management APIs" 2017-12-06 19:10:34 +00:00
Pengquan Meng
7f16a8d17d Merge "Add connection serivce focus api interface" 2017-12-06 18:53:10 +00:00
Chris Tate
f10f83d507 Merge "Introduce ServiceConnection#onNullBinding()" 2017-12-06 18:47:17 +00:00
Sunny Goyal
839edb1781 Merge "Adding widgetFeatures so that a provider can indicate a set of supported features" 2017-12-06 18:25:32 +00:00
TreeHugger Robot
9e33289902 Merge "Adds metadata to InstantAppResolveInfo" 2017-12-06 18:05:32 +00:00
Geoffrey Pitsch
bc02b77463 New supported QuickViewConstant feature to delete a file.
Bug: 65368139
Test: compiles
Change-Id: I45e31f9ee063a9bd1330b3031bc770f7f0bf312e
2017-12-06 12:48:29 -05:00
TreeHugger Robot
57a69f683c Merge "Revert "Don't generate irrelevant a11y events - framework"" 2017-12-06 16:48:16 +00:00
Patrick Baumann
709ee1551d Adds metadata to InstantAppResolveInfo
This change introduces a metadata Bundle to the InstantAppResolveInfo
type to be passed along to the Instant App installer in the case of
resolution. This can be used by the resolver and installer to improve
launch by avoiding IPC to fetch needed data that lives in the resolver.

Change-Id: I0b9c168dd8803f5398d222384ebd436c787e1a48
Fixes: 68223794
Test: manual - modified resolver to populate data, verified in installer
2017-12-06 15:38:59 +00:00
Alex Chau
af9bb8d99e Introduce more user management APIs
- boolean stopUser(ComponentName admin, UserHandle userHandle)
- boolean logoutUser(ComponentName admin)
- List<UserHandle> getManageableUsers(ComponentName admin)
- Introduced Injector.binderWithCleanCallingIdentity

Bug: 67580550
Test: manually try each added API with a DPC on both primary and non-prijmray user.
Test: CTS tracked in b/67581357
Change-Id: I9789b9b29978d47bc22be6ecad6c5577e0f8eb5b
2017-12-06 14:38:25 +00:00
Sunny Goyal
f5e0fd78fd Adding widgetFeatures so that a provider can indicate a set of
supported features

Bug: 63931362
Bug: 36537581
Test: Added CTS for new APIs
Change-Id: I2bd3278bfdf40d88fc8e6f72bfbc7505c64accff
2017-12-05 16:23:46 -08:00
Hugo Benichi
fc9696e489 Merge "Expose the MacAddress class in the api" 2017-12-05 23:58:32 +00:00
TreeHugger Robot
c3e9e8ae13 Merge "Add new SystemApi InputMethod attr isVrOnly." 2017-12-05 23:51:48 +00:00
Chien-Yu Chen
1f272d89e3 Merge "camera: Add AF scene change key" 2017-12-05 22:19:39 +00:00
Tarandeep Singh
b360b995c9 Add new SystemApi InputMethod attr isVrOnly.
In order to support VR-only InputMethod, new attribute 'isVrOnly' is
added.

Bug: 63037786
Test: atest InputMethodInfoTest
Change-Id: Iab936df9972212f56277ef9c18d9e1f67f92a913
2017-12-05 13:37:14 -08:00
Eugene Susla
d4128ec0df Revert "Don't generate irrelevant a11y events - framework"
This reverts commit 8ddfb4794f.

Test: presubmit
Bug: 69975306
Change-Id: I05cb545eb0adc77298dddf2dea2997ef36b58a5f
2017-12-05 13:08:51 -08:00
Alex Chau
1beccb0fc2 Merge "Introduce logout button and DevicePolicyManager API to enable it" 2017-12-05 20:16:24 +00:00
Dianne Hackborn
d5b9266f01 Merge "Add major version code to platform." 2017-12-05 20:12:17 +00:00
Hall Liu
c823b876c1 Merge "Un-hide Connection-side RTT APIs for Dialer" 2017-12-05 19:40:14 +00:00