18642 Commits

Author SHA1 Message Date
Amith Yamasani
e878931414 Allow multiple standby buckets to be set in one IPC
SystemApi to pass a map of packagename to bucket mapping.
Reduces the number of IPC calls to be made by bucketing
ML app.

Bug: 63527785
Test: atest CtsAppUsageHostTestCases
Change-Id: I4172fd30cc310092a1f182ae26267de9148009b7
2017-12-10 18:52:20 -08: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
Jack Yu
b592e29f28 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
Merged-In: I7eb5318cd75ca3b7a29d5bf0da18d6b29a228ee1
Change-Id: I7eb5318cd75ca3b7a29d5bf0da18d6b29a228ee1
(cherry picked from commit e44609b15866d080e0f8813b99d04b51a6f32929)
2017-12-08 13:28:07 -08: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 8ddfb4794f128ad6ac10fed72c73fdec61ea7bcb.

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
Calin Juravle
d3392daa3b Merge "Add SystemApis to expose runtime profile information" 2017-12-05 19:10:34 +00:00
TreeHugger Robot
df12954187 Merge "Change TelephonyManager#getCdmaPrlVersion() from hidden to @SystemApi" 2017-12-05 19:00:12 +00:00
Abodunrinwa Toki
358b028f01 Merge "Add a signature to TextSelection and TextClassification" 2017-12-05 16:39:28 +00:00
Neil Fuller
814f73f81a Merge "Track API changes in libcore" 2017-12-05 09:43:02 +00:00
Jeff Sharkey
e888a8c606 Merge "API for apps to tag sockets with their own UID." 2017-12-05 05:00:46 +00:00
TreeHugger Robot
5fe8eee682 Merge "Add Preferred Phone Account columns" 2017-12-05 02:49:57 +00:00
TreeHugger Robot
05c1a6ca4c Merge "New Autofill API: let service set optional header and footer for dataset picker." 2017-12-05 02:46:37 +00:00
Pengquan Meng
731c1a38c0 Add connection serivce focus api interface
This add new api interface to ConnectionService to support the
connection service focus api.

Bug: 69651192
Test: manually

Change-Id: Iea49d95b086d32a0ebaf8e9f34fe4556953a0fd5
2017-12-04 18:38:25 -08:00
TreeHugger Robot
8587adc41e Merge "Add DIRTY_RETAIN constant" 2017-12-05 02:01:48 +00:00
Hugo Benichi
12981ff2d8 Expose the MacAddress class in the api
Test: built,  flashed, $ runtest frameworks-net
Bug: 69390696
Change-Id: Ica5efdf5ffe8ad2500a87f574508a2bcd074b33d
2017-12-05 10:30:31 +09:00
Christopher Tate
5d73b6d7a9 Introduce ServiceConnection#onNullBinding()
Historically, if a service returns null from onBind(), the binding app
gets no information about the outcome:  the ServiceConnection is never
invoked.  We now introduce a new connection callback, onNullBinding(),
for apps that need to detect this situation.  When the service rejects
the binding by returning null, the onNullBinding() callback in the
associated ServiceConnection is invoked instead of onServiceConnected().

onNullBinding() has an empty default implementation, so there is no
binary-compatibility impact of this new interface method.

Bug: 67377345
Test: atest android.app.cts.ServiceTest

Change-Id: I224512c118f7d6e5c1c2bb69eca1902882e73594
2017-12-04 17:11:31 -08:00