16085 Commits

Author SHA1 Message Date
Jason Monk
5be50f7d29 Method to allow testing of Loopers
Add a wrapper object that provides some control and access to
the package hidden methods on Looper only for the purpose of
testing. Will not work on non-instrumented apps.

Test: none
Change-Id: I55cdfeac17ddc0d251852ab764501544079fc888
2017-03-21 14:24:20 -04:00
Przemyslaw Szczepaniak
f3638be2b2 Track libcore commit a2d9879b
Test: make -j 32
Bug: 36461944
Change-Id: I0cf924a0f07d3d048f75edb4061b20f065ba80b1
2017-03-21 17:23:50 +00:00
Doris Ling
2cb4bab1a8 Allow multi line preference title.
Add an attribute to Preference to specify whether single line is to
be used for the preference

Change-Id: I578b496cdc4c5b0e3b3146183c6c30c4dee02eab
Fix: 36389770
Test: manual
2017-03-21 10:19:43 -07:00
TreeHugger Robot
2bcca1d624 Merge "BZZZZZZT! BZZZZZT! New Vibrator APIs" 2017-03-21 13:40:36 +00:00
Felipe Leme
5311206f34 Add custom presentation (RemoteViews) on Dataset values.
New tests on LoginActivityTest:

- testAutofillOneDatasetCustomPresentation()
- testAutofillMultipleDatasetsCustomPresentations()
- testAutofillMultipleDatasetsCustomPresentationSameFields()
- testAutofillMultipleDatasetsCustomPresentationFirstDatasetMissingSecondField()
- testAutofillMultipleDatasetsCustomPresentationSecondDatasetMissingFirstField()

Fixes: 36067706
Test: CtsAutoFillServiceTestCases pass

Change-Id: Iacb660bf5a5cf311dea4bfcbfe1b3722aab34715
2017-03-20 18:20:28 -07:00
Felipe Leme
1a1e4687e4 Improved WebView -> ViewStructure mapping for Autofill.
Added setIdEntry() on ViewStructure and documented how WebView can map HTML
tags and attributes into ViewStructure.

Test: VirtualContainerActivityTest pass
Test: m update-api
Bug: 36056207

Change-Id: Idaee9612d2c1b1adac99f354c8f87137ee9ef877
2017-03-20 17:54:33 -07:00
Pankaj Kanwar
b8ce44443c Merge "Updated javadocs for sendUssd APIs." 2017-03-21 00:45:55 +00:00
Winson Chung
248278fc82 Merge "Update PiP AppOps flag to enforce all PiP functionality." 2017-03-21 00:29:05 +00:00
Felipe Leme
f8a8174cd5 Changes on Assist structure to handle virtual child for autofill:
- Removed overloaded newChild() methods.
- Added a setAutofillId(parent, virtualId).
- Changed view so AutofillId is set on all relevant methods.

Test: VirtualContainerActivityTest (with new tests) pass
Bug: 36056207

Change-Id: Ia11344f95c2756e83307c54052878e9dbe471873
2017-03-20 16:21:41 -07:00
Jakub Pawlowski
2eb54b6bd8 Merge "Bluetooth 5 AdvertisingSet implementation (1/4)" am: f0c963a5b6 am: 375741e99a
am: d7714c45e0

Change-Id: I71d5455248a9840aadf02859ba8652bd80eca559
2017-03-20 22:41:06 +00:00
TreeHugger Robot
a0c5f7d869 Merge "More RecoverableSecurityException docs." 2017-03-20 22:37:25 +00:00
Jakub Pawlowski
375741e99a Merge "Bluetooth 5 AdvertisingSet implementation (1/4)"
am: f0c963a5b6

Change-Id: Ia401ccf8935b8cb315849803c5c82d1d7dd64b81
2017-03-20 22:26:42 +00:00
Winson Chung
f4ac063f3e Update PiP AppOps flag to enforce all PiP functionality.
- Previously it only enforced whether an app could enter PiP as it was
  hiding.
- Also updating metrics constant name to reflect the change.
- Adding public OPSTR for apps to check if it the user has disabled PiP

Bug: 35957404
Test: android.server.cts.ActivityManagerPinnedStackTests
Change-Id: I979b5c6d4c85946623999ced1cfb197d830ccecb
2017-03-20 15:15:52 -07:00
TreeHugger Robot
3f1fb26bbc Merge "Batch autofill() calls to views with virtual children." 2017-03-20 22:03:25 +00:00
TreeHugger Robot
a7353961bf Merge "Add token to the resolver APIs" 2017-03-20 21:25:34 +00:00
Dianne Hackborn
532ea26c7b Add new "storage not low" job scheduler constraint.
This allows you to say that your job should run only when device
storage is not low.

Adds new command line interface to DeviceStorageMonitor to help
with driving the tests (modelled after BatteryService).

Test: new StorageConstraintTest suite.
Change-Id: I96bfb761cd8257b6f68dde43ce9cfb1a3b9d0acb
2017-03-20 13:41:08 -07:00
Jeff Sharkey
780861f245 More RecoverableSecurityException docs.
Mention convenience methods in class docs, and require a valid
NotificationChannel to be provided to match O best-practices.

Also mention that notifyChange() should be triggered when the action
is finished.

Test: builds, boots
Bug: 34676491
Change-Id: I0e6c6d43a93cbce1a5de02621290cc2ff9423274
2017-03-20 14:38:17 -06:00
pkanwar
67819e0ae7 Updated javadocs for sendUssd APIs.
Bug: 35766546
Change-Id: I40f0addc15331184b3409b3d1b5c9dc1455d8b5b
Test: manual
2017-03-20 13:27:09 -07:00
Jakub Pawlowski
6a55da9018 Bluetooth 5 AdvertisingSet implementation (1/4)
Test: manual
Bug: 30622771
Change-Id: Ia89718c0c2ab2eaa71b158ecdcae989af907769f
2017-03-20 20:00:36 +00:00
Todd Kennedy
d3c5106940 Add token to the resolver APIs
Change-Id: Ia6d4f6d88ec265480a4dca94fe77ef42592a328c
Fixes: 35442315
Test: Build and make sure instant apps still resolve
2017-03-20 11:23:06 -07:00
TreeHugger Robot
7d50ff11db Merge "Notify caller if none of settings are effective." 2017-03-20 17:37:15 +00:00
Michael Wright
7121697a5e BZZZZZZT! BZZZZZT! New Vibrator APIs
Replace the existing Vibrator APIs with a new class to encapsulate the
haptic effect information, and add the ability to control the vibration
strength.

Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibratorTest
      cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibrationEffectTest
      runtest systemui-notification
      Manual testing with $T/google_experimental/users/michaelwr/Vibrator

Bug: 30961353

Change-Id: Idbb9864a7b084c85e7b7de3257a0e6b40d9d91d6
2017-03-20 16:09:51 +00: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
Felipe Leme
28afe0e1d8 Batch autofill() calls to views with virtual children.
This is useful in the cases where the virtual children hierarchy is rendered
by a different process.

Test: VirtualContainerActivityTest pass
Bug: 36056207
Change-Id: Id9bf3a9e9366b616dc2a6e0a204e238a2bee3a20
2017-03-18 11:25:23 -07:00
Eric Laurent
2eb39497bc Add missing type for USB headset devices
Change-Id: Ib3195442bfefd00edf46592e743617fe37b81a33
Test: audio playback and capture regression tests
2017-03-17 17:25:15 -07:00
Adam Lesinski
10eb1455b9 Merge changes from topic 'configForSplit'
* changes:
  libandroidfw: Search all packages for an identifier
  AAPT2: Finish support for feature splits
  Add support for configForSplit
2017-03-17 23:19:13 +00:00
Jakub Pawlowski
def6fee7f5 Merge "Bluetooth 5 move timeout parameter (1/2)" am: d9f2f67a5f am: 07d79aa3b0
am: acd3953ea1

Change-Id: Ic2c7bd33d558bb4e8cfff063c95f2fa137aeaae0
2017-03-17 23:09:10 +00:00
Jakub Pawlowski
07d79aa3b0 Merge "Bluetooth 5 move timeout parameter (1/2)"
am: d9f2f67a5f

Change-Id: Iee7d485461f5e02ab65ec9f7311e962deb603543
2017-03-17 22:34:24 +00:00
Jakub Pawlowski
adbf2eef2f Bluetooth 5 move timeout parameter (1/2)
Timeout is not a parameter, it is a property of enabling the
advertising. Move it into more proper place.

Test: manual
Bug: 30622771
Change-Id: I09ebc6c770bc02938ea16a9738a7e03dc8006fde
2017-03-17 22:23:57 +00:00
TreeHugger Robot
9e284db838 Merge "Make SYNC_PARENT_SOUNDS a @SystemApi" 2017-03-17 21:38:51 +00:00
TreeHugger Robot
ef8297e275 Merge "Send broadcast when user restrictions change." 2017-03-17 20:48:36 +00:00
TreeHugger Robot
741a898514 Merge "Adding an extras Bundle to MessagingStyle messages." 2017-03-17 19:38:02 +00:00
Robin Lee
c74d85fee8 Make SYNC_PARENT_SOUNDS a @SystemApi
Since there is a CTS test depending on it which is currently hardcoding
the string. Let's not do that.

Bug: 30658854
Test: make full -j30
Change-Id: I6f6b1044ac664589b8fe76ced9961e80024b0b29
2017-03-17 19:11:20 +00:00
TreeHugger Robot
2fb89f45b9 Merge "Removed 'virtual' from autofill method names." 2017-03-17 17:54:37 +00:00
TreeHugger Robot
6e4075bde6 Merge "Adding enabled state for remote actions." 2017-03-17 17:51:45 +00:00
Felipe Leme
81f01d9efd Removed 'virtual' from autofill method names.
Fixes: 36126001
Test: VirtualContainerActivityTest pass

Change-Id: I3b8fe835cd7c7f39c8e2cb8f2daca71b03236a1f
2017-03-17 09:09:31 -07:00
Julia Reynolds
f619bc5211 Removing 'delegate' from constant names
Change-Id: I2ac4e3ae08f1084da34ea74fdd5177e2d58987af
Fixes: 35812334
Test: build
2017-03-17 08:43:22 -04:00
Jakub Pawlowski
7800604d0d Merge "LE Maximum Advertising Data Length (1/4)" am: 74f2e1a303 am: 2fc3834f4d
am: 066e8551f1

Change-Id: If9ee85705e7c47820e23ad79a048e4c04c4cc11a
2017-03-17 05:31:07 +00:00
Jakub Pawlowski
2fc3834f4d Merge "LE Maximum Advertising Data Length (1/4)"
am: 74f2e1a303

Change-Id: I3b6599937ddd04a9c13573d156cc721152c0005a
2017-03-17 05:19:57 +00:00
Felipe Leme
24aae15218 Added a new AutofillCallback.EVENT_INPUT_UNAVAILABLE event.
This event is called when:

- After notifyViewEntered() when autofill is disabled.
- After service returns an "empty" FillResponse to FillCallback.onSuccess().

BUG: 36056207

Test: LoginActivityTest.testAutofillCallbackDisabled
Test: LoginActivityTest.testAutofillCallbackNoDatasets
Test: VirtualContainerActivityTest.testAutofillCallbackDisabled
Test: VirtualContainerActivityTest.testAutofillCallbackNoDatasets

Change-Id: I7b8636473f738bf600aa96b28c77827b2cc78815
2017-03-16 19:40:22 -07:00
Philip P. Moltmann
389d1c2b43 Merge "TRON log important auto-fill events" 2017-03-17 02:23:35 +00:00
Jakub Pawlowski
ad10affa4e LE Maximum Advertising Data Length (1/4)
Add ability to check maximum advertising data length.

Bug: 30622771
Test: manual
Change-Id: I281f7e9f294c40a47a67a22809cc753b6693f7c4
2017-03-16 18:27:01 -07:00
Winson Chung
6b88baf1e8 Adding enabled state for remote actions.
- Actions can specify whether they are enabled (default) or disabled, and
  SystemUI will reflect the state in the PiP actions.

Bug: 36363677
Test: Expand pip with dismissed action
Change-Id: I36994868f82d8ba0fc87947a722d9f20b39425a1
2017-03-16 18:05:30 -07:00
Chris Craik
97b4ccbd97 Merge "Expose color filter mutate methods" 2017-03-17 00:32:21 +00:00
Makoto Onuki
e72f81b64d Send broadcast when user restrictions change.
- Send UserManager.ACTION_USER_RESTRICTIONS_CHANGED, which is a runtime receiver
only broadcast.

Bug 36355208

Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.UserRestrictionsTest#testUserRestrictions_deviceOwnerOnly'
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.UserRestrictionsTest#testUserRestrictions_primaryProfileOwnerOnly'
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.UserRestrictionsTest#testUserRestrictions_secondaryProfileOwnerOnly'
Change-Id: Ifd82e39ce2c08ed5accdf017f4a1ea3af6face63
2017-03-16 15:51:11 -07:00
Chris Craik
6097eca721 Expose color filter mutate methods
Bug: 36025103
Test: cts-tradefed run singleCommand cts-dev --module CtsGraphicsTestCases

Now, similar to Shaders, we defer native creation until Paint is being
used, and ensure that we have an up to date filter when drawing.

Also implements ColorMatrix#equals to behave like Matrix#equals.

Change-Id: I5f74addd97f5662800802e6f660fead58d518725
2017-03-16 15:45:43 -07:00
Adam Lesinski
1665d0f028 Add support for configForSplit
Applications with the android:isolatedSplits="true" attribute in
their AndroidManifest.xml would have their Split APKs loaded in
isolation of each other, based on a set of dependencies.

Configuration Splits generated for a Feature split would not be properly
loaded before, so this change, along with a tools change, fixes this
issue and completes support for isolatedSplits.

Bug: 30999713
Test: CTS test coming (depends on some tool changes)
Change-Id: Ia4e7b0e69168a9d6637867558e306f7031720fb3
2017-03-16 15:45:10 -07:00
Philip P. Moltmann
7b77116802 TRON log important auto-fill events
Example log from
android.autofillservice.cts.LoginActivityTest#testAutoFill#testAutoFillOneDatasetAndSave
(translated from numbers of human readable string):

AUTOFILL_SESSION_STARTED
   package=android.autofillservice.cts
AUTOFILL_REQUEST
   type=TYPE_SUCCESS
   package=android.autofillservice.cts
   FIELD_AUTOFILL_SERVICE=android.autofillservice.cts
   FIELD_AUTOFILL_NUM_DATASETS=1
AUTOFILL_FILL_UI
   type=TYPE_ACTION
   package=android.autofillservice.cts
   FIELD_AUTOFILL_NUM_DATASETS=1
   FIELD_AUTOFILL_FILTERTEXT_LEN=0
AUTOFILL_DATASET_APPLIED
   package=android.autofillservice.cts
   FIELD_AUTOFILL_NUM_VALUES=2
   FIELD_AUTOFILL_NUM_VIEWS_FILLED=2
AUTOFILL_SAVE_UI
   package=android.autofillservice.cts
   FIELD_AUTOFILL_NUM_IDS=2
AUTOFILL_DATA_SAVE_REQUEST
   type=TYPE_SUCCESS
   package=android.autofillservice.cts
   FIELD_AUTOFILL_SERVICE=android.autofillservice.cts
AUTOFILL_SESSION_FINISHED
   package=android.autofillservice.cts

Test: Ran auto-fill tests and looked at event log.
Change-Id: I58aaa58e4435e7d04c8cd91878411943d3eb13de
2017-03-16 15:41:33 -07:00
TreeHugger Robot
2bd3c49eb4 Merge "Add feature tag android.hardware.vr.headtracking." 2017-03-16 20:28:03 +00:00
Craig Donner
279dd66dfd Add feature tag android.hardware.vr.headtracking.
Different versions of this feature specify different levels of
headtracking capability.

Bug: 36294374
Test: build
Change-Id: I00273c9093321661b5ca519d7cd065ae0105c3b2
2017-03-16 11:48:27 -07:00