Commit Graph

81896 Commits

Author SHA1 Message Date
Hongming Jin
8e2bfc11ce Add shell command handler for account manager to allow enabling service
binding for instant app.
Test: cts-tradefed run cts -m CtsAccountManagerTestCases
cts-instant-tradefed run cts-instant -m CtsAccountManagerTestCases
Bug: 79367659

Change-Id: I3ac968ebc20be68da08293d9b685a01920f11b76
2018-06-04 09:41:01 -07:00
Hongming Jin
dbc6052022 Merge "Enforce permission check before returning application info Test: atest CtsAppSecurityHostTestCases:ApplicationVisibilityTest Bug: 77821568" into pi-dev 2018-06-01 17:15:21 +00:00
Makoto Onuki
079f6d7fa6 Merge "Serialize AM.getContentProvider() calls in client side" into pi-dev 2018-06-01 05:35:02 +00:00
John Reck
b559512508 Merge "Attempting to fix the black flicker" into pi-dev 2018-06-01 03:05:51 +00:00
Hongming Jin
83e162615f Enforce permission check before returning application info
Test: atest CtsAppSecurityHostTestCases:ApplicationVisibilityTest
Bug: 77821568

Change-Id: I7554805c36c0c2552163dad7b07cfc5f552b624e
2018-05-31 17:20:14 -07:00
Makoto Onuki
b6c79ea065 Serialize AM.getContentProvider() calls in client side
Th wait() call in AMS.getContentProviderImpl() can cause a deadlock when it
starts a new process for a target provider and all system server binder threads
are reaching out to the same provider at the same time, because AMS won't be
able to receive a callback from the provider process.

Let's serialize access to AM.getContentProvider() to avoid this scenario.

Longer team, we should stop waiting in the system server and instead do so in
the client side.

Bug: 74523247
Test: Boot, add a google account, and let syncs run and finish.
Test: Watch free video on Coursera

Change-Id: If5be2dc4b6f22f72d1bb3aa1b5b4d49f20c8d94d
2018-05-31 14:52:51 -07:00
TreeHugger Robot
d4c5d1e448 Merge "Camera: add new detailed error callback" into pi-dev 2018-05-31 21:11:24 +00:00
TreeHugger Robot
fe8c263011 Merge "Camera: Document getNumberOfCameras behavior for logical camera" into pi-dev 2018-05-31 20:50:33 +00:00
TreeHugger Robot
2f898c4df5 Merge "Ensure permission held for MATCH_KNOWN_PACKAGES" into pi-dev 2018-05-31 20:41:01 +00:00
John Reck
5b02c629bd Attempting to fix the black flicker
Bug: 79231206
Test: Repro steps from bug

Merged-In: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
Change-Id: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
2018-05-31 12:56:28 -07:00
Yin-Chia Yeh
a07cd32684 Camera: add new detailed error callback
For the legacy shim layer to tell the difference between evction
and disable error.

Test: CTS CameraEvictionTest + IdleUidTest
Bug: 77486868
Change-Id: I5b68f55460287634903c9b8b42188d9dec8744d5
2018-05-31 12:24:55 -07:00
Shuzhen Wang
e7d3cd0a76 Camera: Document getNumberOfCameras behavior for logical camera
For camera1 API, framework only exposes one camera id for every
logical/physical camera id group. Document this behavior accordingly.

Test: Build
Bug: 80075565
Change-Id: I32c2de84d27a603d485014255bf1fad5031aa08e
2018-05-31 12:21:37 -07:00
Jason Monk
ce1beadc09 Don't use stable providers for slices
Because they aren't what we want.

Test: manual + existing tests
Bug: 80532760
Change-Id: Ib69799a2ef9440d0d67cea02e6b3c61844535755
2018-05-31 14:12:52 -04:00
Evan Rosky
7ba4c2b254 Merge "Fixed a bug where sometimes unhandled handler would consume all keys" into pi-dev 2018-05-30 21:47:25 +00:00
Todd Kennedy
ef9acb6ed9 Ensure permission held for MATCH_KNOWN_PACKAGES
There's an escape clause that passes the cross user permissions
if the caller UID is identical to the target user ID [eg. we're not
operating across users]. However, the method getInstalledPackagesList()
uses android.permission.INTERACT_ACROSS_USERS to filter the results and
a calling UID check is not sufficient. Ensuure the permission is
actually held, regardless of the calling UID or target user.

Change-Id: Iebf88668766d387a15246d6eea6420610665105a
Fixes: 80435086
Test: atest CtsAppSecurityHostTestCases:ApplicationVisibilityTest
2018-05-30 13:56:17 -07:00
Michael Wright
0dbb516a43 Allow for any default vibration intensity level.
Because we can't always create the range of effects we'd like, we may
need different default intensity levels for different devices. This
works fine for prebaked effects, but for application defined amplitudes
we need to provide a scaling function. In addition, this scaling
function should leave amplitude values untouched in the default state so
that application developers produce the effects they expect.

Bug: 80275800
Test: manual
Merged-In: Ibb552ddfa60891853ebcb1a5567ed6745bb5defe
Change-Id: Ibb552ddfa60891853ebcb1a5567ed6745bb5defe
2018-05-30 00:21:38 +01:00
TreeHugger Robot
8c4c359b25 Merge "Fix for missing location icon" into pi-dev 2018-05-29 20:09:21 +00:00
Glenn Kasten
a5d8c3718d Merge "Resolve conflict between javadoc and CDD re: audio output" into pi-dev 2018-05-29 19:09:31 +00:00
TreeHugger Robot
14e605d7e9 Merge "Enable systemui_theme feature flag" into pi-dev 2018-05-29 18:22:16 +00:00
Amith Yamasani
a1ce963743 Fix for missing location icon
OpEntry.duration was being used to indicate that the
operation was still running if -1 is returned. A recent
change caused a regression.

Adding a new mRunning field in OpEntry to explicitly
hold the running state, even when partial duration is
updated.

Change-Id: Ib29f4c903f990aaa202e84f964959aedfc24abdb
Fixes: 80242152
Test: atest FrameworksServicesTests:AppOpsActiveWatcherTest
Test: Launch maps and verify the location icon is visible
      in the status bar
2018-05-28 21:20:56 -07:00
Adrian Roos
8997b7e4c9 Merge "WindowInsets: Never dispatch negative insets" into pi-dev 2018-05-28 14:40:20 +00:00
TreeHugger Robot
879d09f946 Merge "Dump proxy debug info when exceeding proxy limit." into pi-dev 2018-05-26 09:05:14 +00:00
TreeHugger Robot
9d19487b1c Merge "Added TestApi to ActivityInfo.isTranslucentOrFloating" into pi-dev 2018-05-26 02:23:25 +00:00
Evan Rosky
cd80e611ca Fixed a bug where sometimes unhandled handler would consume all keys
In a situation where a focused view consumed only the UP of a key
and the unhandled key manager would focus a listener, it wouldn't
drop focus unless the original key was pressed/released again.

This updates the record of captured keys before it can be consumed
in the view hierarchy.

Bug: 79993136
Test: Added a test for this to cts ViewTest#testUnhandledKeys
Change-Id: I5dfdcf16c5c41e9ad51cb62b385580c5493e8520
2018-05-25 16:18:57 -07:00
TreeHugger Robot
64a33d695d Merge "Final cleanups to permission slices" into pi-dev 2018-05-25 22:10:20 +00:00
Selim Cinek
c4e19963f4 Merge "Fixed the behavior of group conversations when targeting P" into pi-dev 2018-05-25 20:06:52 +00:00
Jason Monk
b14dde0793 Final cleanups to permission slices
- Add icons to the right and shortcut modes
 - Add color
 - Make sure dialogs are secure

Test: manual
Bug: 79960669
Change-Id: I6d251b0ea5bd3c1b3eed32b184e4aae22c52ffb5
2018-05-25 15:42:16 -04:00
Martijn Coenen
eebac6d6b5 Dump proxy debug info when exceeding proxy limit.
If a process gets killed because it sends too many proxies,
dump proxy debug info so we can see what types of interfaces
it sends.

Bug: 71353150
Test: builds, output generated
Change-Id: I3a7787cb3fa73b0b4ad223b18cd79f44e22b9ef5
2018-05-25 20:13:24 +02:00
Wale Ogunwale
30eab1f430 Added TestApi to ActivityInfo.isTranslucentOrFloating
This would be use to determine the right activity state during CTS
test for products that have windowSwipeToDismiss set.

Also, dump ActivityRecord.fullscreen to proto for the same reason.

Bug: 76207986
Bug: 79167358
Test: atest CtsActivityManagerDeviceTestCases:ActivityLifecycleTests
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerAssistantStackTests
Change-Id: Iadc088e9129be088b8a083ebbafd8d20fe26b673
2018-05-25 10:24:14 -07:00
Selim Cinek
ce8794fbbc Fixed the behavior of group conversations when targeting P
Fixes an issue where the group conversation heuristic was still
applied even when the app is targeting P. We're now following
the isGroupConversation completely and only do the migration
for apps targeting < P.

Change-Id: I471d58e8a8f5e6270f0dcce8691d08a2bdd1c582
Fixes: 78450835
Test: add messaging notification, observe correct display
2018-05-25 09:16:38 -07:00
TreeHugger Robot
1ffdec20b4 Merge "Fix monkey crash in smart selection animation" into pi-dev 2018-05-25 15:59:07 +00:00
TreeHugger Robot
568ccfe0b6 Merge "Camera: Clarify multi-camera id selection logic" into pi-dev 2018-05-25 15:27:43 +00:00
Mihai Popa
6e8e27bf9a Fix monkey crash in smart selection animation
In Id65443e93d277c106ea955c867d39e94192cc55d we fixed a monkey crash
happening when the smart selected text had changed while the smart
selection animation was running. However, the change introduced a new
crash, happening when the smart selection result was null. This CL fixes
it, and lets startSelectionActionMode run even when the result is null,
as there seems to be some logic there which should happen in this case.

Bug: 80244201
Test: none
Change-Id: I7f0304446dec85578bdcd5011d2e9ea2737d3c36
(cherry picked from commit a9d27ea869)
Merged-in: I7f0304446dec85578bdcd5011d2e9ea2737d3c36
2018-05-25 14:01:23 +00:00
Adrian Roos
7419a17d92 WindowInsets: Never dispatch negative insets
Bug: 80204753
Test: atest ViewRootImplTest
Change-Id: Idace95ae57c6a3a1667b95ce8c3ac7d2bfe06f94
2018-05-25 14:54:09 +02:00
Felipe Leme
ce3ae87da9 New Autofill field: FIELD_AUTOFILL_SESSION_ID
This field contains the autofill session id (Thank You, Captain Obvious!), which
is useful to correlate autofill metrics that are not logged on
AUTOFILL_REQUEST.

Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything
Test: manually run some test and watched
      'adb shell logcat -b events | grep sysui'. Example:
     [757,913,758,4,806,android.autofillservice.cts,871,android.autofillservice.cts.LoginActivity,914,2,915,2,1456,-2045861404

Fixes: 80093094

Merged-In: If4b1c9ab616b2ba580745096894997eb7edb3e34
Change-Id: If4b1c9ab616b2ba580745096894997eb7edb3e34
2018-05-25 06:22:25 +00:00
Lucas Dupin
94eca2cbd4 Enable systemui_theme feature flag
Turning flag on even though translations are not ready in order to
expose feature and make sure it was properly tested before release

Change-Id: I10f515b1bdcae45d1ed6d6d293afe1853f44dc02
Bug: 63903361
Fixes: 75498812
Test: manual
2018-05-24 20:07:44 -07:00
TreeHugger Robot
41a60f4033 Merge "Added the class name of activity being autofilled on (most) autofill metrics." into pi-dev 2018-05-25 00:55:42 +00:00
TreeHugger Robot
94594d1290 Merge "Merged many autofill session metrics into AUTOFILL_REQUEST:" into pi-dev 2018-05-25 00:18:41 +00:00
Makoto Onuki
621fd20f55 Merge "Tweak exemption for sync requests made by FG apps" into pi-dev 2018-05-24 23:22:09 +00:00
Felipe Leme
212b1614f4 Added the class name of activity being autofilled on (most) autofill metrics.
Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything
Test: manually run some test and watched
      'adb shell logcat -b events | grep sysui'

Fixes: 80151641

Change-Id: I5b83e6ceb549a641d10c39bbfd4f24d0a43d1a23
2018-05-24 13:59:06 -07:00
Michael Wachenschwanz
14c61286c4 Merge "Revert "Revert "Write UsageEvents Parcel data as a Blob""" into pi-dev 2018-05-24 20:45:34 +00:00
TreeHugger Robot
cf2c35dca6 Merge "Revert "WallpaperColors hint computation"" into pi-dev 2018-05-24 20:00:27 +00:00
TreeHugger Robot
56cc567dfd Merge "Hide system apps until installed (1/2)" into pi-dev 2018-05-24 18:01:43 +00:00
Michael Wachenschwanz
76d03fcd7e Revert "Revert "Write UsageEvents Parcel data as a Blob""
This reverts commit 8520e56998.

Reason for revert: Bug Fixed
Bug:79860717
Bug:80215357

Change-Id: Ibaabe3c6bab72f417b24121a91ec5f953ad18ff7
2018-05-24 17:36:47 +00:00
Felipe Leme
f61ba5cabf Merged many autofill session metrics into AUTOFILL_REQUEST:
- AUTOFILL_UI_LATENCY
- AUTOFILL_AUTHENTICATED;
- AUTOFILL_DATASET_AUTHENTICATED
- AUTOFILL_INVALID_AUTHENTICATION
- AUTOFILL_INVALID_DATASET_AUTHENTICATION

At least one AUTOFILL_REQUEST is created on each session; additional ones are
created for each additional request made to the service (which is tracked by
FIELD_AUTOFILL_REQUEST_INDEX).

Also:
- Added TYPE_CLOSE to indicate a timeout waiting for the service response.
- Added FIELD_AUTOFILL_REQUEST_ORDINAL to indicate the order of the request in
  the session.
- Added FIELD_AUTOFILL_NUMBER_REQUESTS on AUTOFILL_SESSION_FINISHED.
- Created an AUTOFILL_FIELD_FLAGS to avoid conflict with FIELD_FLAGS.

Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything
Test: manually run some test and watched the result of
      'adb shell logcat -b events | grep sysui', as described below.

1) LoginActivityTest#testAutoFillNoDatasets:

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,-1,1454,1]
[757,919,758,4,806,android.autofillservice.cts,908,android.autofillservice.cts,1455,1]

Where 907=AUTOFILL_REQUEST, 919=AUTOFILL_SESSION_FINISHED,
1454=FIELD_AUTOFILL_REQUEST_ORDINAL, 1455=FIELD_AUTOFILL_NUMBER_REQUESTS,
758:10 = TYPE_SUCCESS, 909 = FIELD_AUTOFILL_NUM_DATASETS (-1 == null response)

2) LoginActivityTest#testAutoFillTwoDatasetsSameNumberOfFields:

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,2,1145,60,1454,1]

Where 1145=FIELD_AUTOFILL_DURATION (60ms UI latency)

3) LoginActivityTest#testCancellationSignalCalledAfterTimeout:

[757,907,758,2,806,android.autofillservice.cts,908,android.autofillservice.cts,1454,1]

Where 758:2 = TYPE_CLOSE (timeout)

4) LoginActivityTest#testAutofillManuallyOneDataset:

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,1,1145,67,1452,1,1454,1]

Where 1452=FIELD_AUTOFILL_FLAGS and 1=FLAG_MANUAL_REQUEST

5) FillEventHistoryTest#testNoEvents_whenServiceReturnsFailure:

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,1,1145,48,1454,1]
[757,907,758,11,806,android.autofillservice.cts,908,android.autofillservice.cts,1454,2]
[757,919,758,4,806,android.autofillservice.cts,908,android.autofillservice.cts,1455,2]

Where 758:11 = TYPE_FAILURE

6) AuthenticationTest#testFillResponseAuthJustOneField

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,0,1145,91,1453,912,1454,1]

Where 1453:912 is FIELD_AUTOFILL_AUTHENTICATION_STATUS = AUTOFILL_AUTHENTICATED

7) AuthenticationTest#testDatasetAuthTwoDatasets

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,2,1145,64,1453,1126,1454,1]

Where 1453:1126 is FIELD_AUTOFILL_AUTHENTICATION_STATUS =
                   AUTOFILL_DATASET_AUTHENTICATED

8) AuthenticationTest#testFillResponseAuthServiceHasNoData
[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,0,1145,49,1453,1128,1454,1]

Where 1453:1128 is FIELD_AUTOFILL_AUTHENTICATION_STATUS =
                   AUTOFILL_INVALID_AUTHENTICATION

9) VirtualContainerActivityCompatModeTest#testAutofillSync

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,1,1145,53,1414,1,1454,1]
[757,919,758,4,806,android.autofillservice.cts,908,android.autofillservice.cts,1414,1,1455,1]

Where 1414 is FIELD_AUTOFILL_COMPAT_MODE

10) FieldsClassificationTest#testHit_manyUserData_manyDetectableFields

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,0,1271,2,1454,1]
Where 1271 is FIELD_AUTOFILL_NUM_FIELD_CLASSIFICATION_IDS

11)PartitionedActivityTest#testAutofill4PartitionsMixManualAndAuto

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,1,1145,109,1454,1]
[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,1,1452,1,1454,2]
[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,1,1454,3]
[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,1,1452,1,1454,4]
[757,919,758,4,806,android.autofillservice.cts,908,android.autofillservice.cts,1455,4]

Bug: 80093094
Fixes: 80095814

Merged-In: I87424834fc925a3bcba410eec5aa32fcd6253367
Change-Id: I87424834fc925a3bcba410eec5aa32fcd6253367
2018-05-24 09:43:27 -07:00
Lucas Dupin
b5e5053ebc Revert "WallpaperColors hint computation"
This reverts commit c50f47d970.

Fixes: 79465234
Reason for revert: Google still does it using private APIs and apps were relying on this behavior, not good for the ecosystem.

Change-Id: I62e2b4cd1e6e562fcdd89c97e599bcdade83381a
2018-05-24 16:33:14 +00:00
TreeHugger Robot
87631c2d29 Merge "Use TCM context if application context is unavailble." into pi-dev 2018-05-24 16:30:16 +00:00
Michael Wachenschwanz
d55c618340 Merge "Revert "Write UsageEvents Parcel data as a Blob"" into pi-dev 2018-05-24 15:54:05 +00:00
Michael Wachenschwanz
8520e56998 Revert "Write UsageEvents Parcel data as a Blob"
This reverts commit f5bae21c5e.

Reason for revert:
Bug: 79860717
Fixes: 80215357

Change-Id: I0768e5ce0a95afe7ff091c0035335437bb33c46c
2018-05-24 15:45:17 +00:00
Michael Wright
b112f26cce Use TCM context if application context is unavailble.
In TextClassificationManager, we use the application context to reduce
the likelihood of leaking the underlying Activity. Unfortunately, some
places (e.g. auto, system_server) don't actually provide us an
application context, so we need to fall back to whatever context was
passed in to TCM in the first place.

Bug: 80188317
Test: none
Change-Id: Ib4b2e6ed543d3ed56cefd8f56717855158cdc0fe
2018-05-24 14:15:04 +01:00