Commit Graph

115117 Commits

Author SHA1 Message Date
Taran Singh
e974c347fd Merge "Revert "Keeps the served view of the window when focus to the ne..."" into rvc-dev 2020-05-06 21:06:34 +00:00
Taran Singh
0dbd6c4bd6 Revert "Keeps the served view of the window when focus to the ne..."
Revert "Refine FocusHandlingTest"

Revert submission 11182377-fix_b_152373385

Reason for revert: Fix b/155781821
Reverted Changes:
If20cdb43e:Keeps the served view of the window when focus to ...
I50402165b:Refine FocusHandlingTest
Bug: 152373385
Bug: 155781821

Change-Id: I44469caf5a5ceaf247c4e6b0694da9da1f3c0eb1
2020-05-06 20:37:09 +00:00
Galia Peycheva
1255a2d20b Merge "Override DreamActivity enter and exit animations" into rvc-dev 2020-05-06 20:30:21 +00:00
Song Hu
f52438f9a2 Merge "Send onCreatePredictionSession, sortAppTargets, requestPredictionUpdate immediately instead of sending them to main thread Looper queue of ChooserActivity." into rvc-dev 2020-05-06 19:03:46 +00:00
Song Hu
d52863d12b Send onCreatePredictionSession, sortAppTargets, requestPredictionUpdate
immediately instead of sending them to main thread Looper queue of
ChooserActivity.

These methods are relatively latency-sensitive. When main thread Looper queue has many backlogs, it takes long time
to dispatch requests.

Bug: 155551642
Test: atest CtsSharesheetTestCases:android.sharesheet.cts.CtsSharesheetDeviceTest
Test: manually test on the device
Change-Id: I7d00e49c6a30fec478e620bc98180d379f801fc8
2020-05-06 10:17:29 -07:00
Hui Yu
a6099ac785 Merge "Revert "Add isUidActiveOrForeground() for camera/audio to use."" into rvc-dev 2020-05-06 16:59:34 +00:00
Marco Ballesio
ce9b47859d Merge changes from topic "developer option for app freezer" into rvc-dev
* changes:
  Resources and strings for freezer settings
  Settings option to enable/disable the app freezer
  ActivityManager API to check availability of app freezer
2020-05-06 16:35:44 +00:00
Antoan Angelov
950aca5795 Merge "Use intent resolver strings for sharesheet when picking intent" into rvc-dev 2020-05-06 14:23:13 +00:00
Galia Peycheva
3cf3520d3f Override DreamActivity enter and exit animations
Fix: 153151516

Test: atest DreamManagerServiceTests
Change-Id: I4ba741512edea23e0209b176a34478045931c891
2020-05-06 10:30:27 +02:00
Galia Peycheva
95f8aba25e Merge "Add isDreaming method to DreamManager" into rvc-dev 2020-05-06 08:18:19 +00:00
Tony Huang
e13e2229ce Merge "Aviod divider surface memory allocated after boot" into rvc-dev 2020-05-06 04:39:14 +00:00
TreeHugger Robot
a83fad74b4 Merge "Migrate remaining parsePackage V1 to V2" into rvc-dev 2020-05-06 03:57:38 +00:00
Song Hu
efa0eab058 Merge "Enable ChooserTarget ranking of the same app." into rvc-dev 2020-05-06 00:02:06 +00:00
Yuncheol Heo
73cc6b8f47 Merge "Migrate Tap exclusion logic to TaskEmbedder." into rvc-dev 2020-05-06 00:00:53 +00:00
Winson
3cb5610a99 Migrate remaining parsePackage V1 to V2
Uses ParsingPackageImpl to generate the PackageInfo for
PackageManager's getPackageArchiveInfo API.

This keeps the migration to v2 hidden and thus the API can
be shipped for this release and then deprecated entirely
if necessary.

Exempt-From-Owner-Approval: Has approval on previous patchsets,
    will need non-logic updates to resolve merge conflict and CP
    into rvc-dev properly

Bug: 135203078
Bug: 146575910
Bug: 153880854

Test: atest com.android.server.pm.parsing
Test: atest android.content.pm.PackageManagerTests

Merged-In: Ib21dbbdc556502144df8e3d7a26b7a9d33885cd9
Change-Id: Ib21dbbdc556502144df8e3d7a26b7a9d33885cd9
2020-05-05 16:35:34 -07:00
Varun Shah
2806da306b Merge "Update some ContentResolver docs." into rvc-dev 2020-05-05 23:18:55 +00:00
Yuncheol Heo
d1cfb337cf Merge "Revert "Notify the visibility change to update color views without control."" into rvc-dev 2020-05-05 22:56:42 +00:00
Yuncheol Heo
11df7e13a8 Revert "Notify the visibility change to update color views without control."
This reverts commit 02d3a8ad07.

Reason for revert: the original change caused the infinite message loop.
Bug: 155794233

Change-Id: I3d72541cd51cd8b16ce4f44124d486b4615b09da
2020-05-05 22:56:27 +00:00
Marco Ballesio
74f0159425 Settings option to enable/disable the app freezer
The new setting option allows for a local configuration to override the
Device Config flag. Device Config and experiments will be honored by
default.

Bug: 155465196
Change-Id: I978a7b6bd75d9daab3fafed58b7f3c6417e0adab
Test: the option is correctly read and written by the companion CLs
2020-05-05 15:22:56 -07:00
Marco Ballesio
240bea3f47 ActivityManager API to check availability of app freezer
A method to verify the availability of the app freezer is required for
configuration code running in places like the Settings app

Bug: 155465196
Change-Id: I5779d263536091689a099eec0815f207dfbbf6ad
Test: verified its workings through the developer options CL
2020-05-05 15:22:43 -07:00
Yuncheol Heo
8f5f53ca0f Migrate Tap exclusion logic to TaskEmbedder.
We want to pass the touches on ActivityView to the Activity inside ActivityView, not to be consumed by Activity hosting ActivityView.
To do that, we need to set a tap exclude region, so touches can go through.

Bug: 155424730
Test: Make sure the Activity inside ActivityView gets touch.
Change-Id: Ia9b2c7eba0c48512a633c798b1012e5fbec8422f
2020-05-05 14:41:43 -07:00
Andrew Solovay
9e2fa5042b Merge "docs: Fixing broken Javadoc comments" into rvc-dev 2020-05-05 20:55:50 +00:00
Galia Peycheva
e1903416bb Add isDreaming method to DreamManager
This CL adds isDreaming to DreamMaanger and changes the way it starts a
dream to use IDreamManager.dream()

DreamManager is only used for testing. So far it has been using the
DreamManagerInternal.testDream() API to start the dream. This restricts
the amount of verification that can be done in the dream tests because
it doesn't put the device in a dreaming state -
IDreamManager.isDreaming() is always false.
IDreamManager.dream() puts the device in a dreaming state and enables
better testing.

Bug: 152994058

Test: atest DreamManagerServiceTests
Change-Id: Id4d947e83eabcafa9724764b8d063357c5f2cb49
2020-05-05 21:59:24 +02:00
Varun Shah
5de2589627 Update some ContentResolver docs.
Clarify when some of the ContentResolver APIs could return null.

Bug: 112833761
Test: builds (documentation update)
Change-Id: I3af1a23bc484d05b167a86bbff0c93ff1bd364e7
2020-05-05 12:25:30 -07:00
Song Hu
60c131e869 Enable ChooserTarget ranking of the same app.
Bug: 151112858
Test: atest CtsSharesheetTestCases:android.sharesheet.cts.CtsSharesheetDeviceTest
Change-Id: If5a4edfec7116cd54ed0ae6543cab0beb011f987
2020-05-05 10:27:52 -07:00
Collin Fijalkovich
a131a0c64f Merge changes from topic "rvc-telephony-caching" into rvc-dev
* changes:
  Cache getPhoneId and getSlotIndex binder calls.
  Refactor SubscriptionManager caching code
  Cache getDefaultSmsSubscriptionId Binder calls
  Cache getActiveDataSubscriptionId Binder calls
2020-05-05 16:30:39 +00:00
Kholoud Mohamed
d4d2427c01 Merge "Fix bug in IntentForwarderActivity" into rvc-dev 2020-05-05 13:37:54 +00:00
Tony Huang
0f8981d9b1 Aviod divider surface memory allocated after boot
The divider surface buffer will be allocated even if the user does
not enter split mode. Avoid it by only copy surface when it show and
release it when it hidden.

Bug: 150190730
Test: reboot and check adb shell dumpsys SurfaceFlinger
Change-Id: Id70a2626b2a921cff6243d992c6b053e329ef92b
2020-05-05 18:52:14 +08:00
kholoud mohamed
06335279aa Fix bug in IntentForwarderActivity
Bug: 155096621
Test: atest com.android.cts.devicepolicy.ManagedProfileCrossProfileTest#testCrossProfileIntentFilters
Test: atest IntentForwarderActivityTest
Test: atest ResolverActivityTest
Test: atest ChooserActivityTest
Change-Id: Ieb99f566fa9cfc14254fecfa5897d421fd39482f
2020-05-05 09:56:07 +00:00
TreeHugger Robot
8011ca6185 Merge "Enable the settings_controller_loading_enhancement" into rvc-dev 2020-05-05 09:23:12 +00:00
Jing Ji
e9fbacf6c5 Merge "Support to pull aggregated procstats associations" into rvc-dev 2020-05-05 01:05:47 +00:00
Adam Bookatz
316bc6ff66 Merge "Listener to watch op starts" into rvc-dev 2020-05-05 00:52:12 +00:00
Yuncheol Heo
8f4363a226 Merge changes from topic "immersive" into rvc-dev
* changes:
  Add test api getStatus/NavigationBarBackgroundView.
  Notify the visibility change to update color views without control.
2020-05-05 00:14:09 +00:00
Andrew Solovay
369f2eeaf9 docs: Fixing broken Javadoc comments
Two recent checkins broke the Javadoc (in both cases, an <h3> wasn't
properly closed). Made the fix by hand to the HTML output in
cl/309818465 but we need to make the corresponding change to
the Java source or it'll get reverted next time we update the reference
docs.

Staged to:

go/dac-stage/reference/android/content/pm/LauncherApps.PinItemRequest
go/dac-stage/reference/android/service/autofill/AutofillService

go/dac-stage/reference/kotlin/android/content/pm/LauncherApps.PinItemRequest
go/dac-stage/reference/kotlin/android/service/autofill/AutofillService

BUG: 155669442
Exempt-from-owner-approval: Docs-only change
Test: make ds-docs
Change-Id: I97be9550689544304dff276cf3c9406f9cd98408
2020-05-04 16:03:17 -07:00
Adam Bookatz
182862e595 Listener to watch op starts
Currently, there is
onOpNoted - tells listeners that noteOp has occurred
onOpActiveChanged - tells listeners that an op's 'active' state has
changed, i.e. that a successfull startOp or stopOp has happened

There was, however, no way of telling a listener that a startOp has
happened (regardless of whether it was successful). This cl introduces
it, via a OnOpStartedListener.

This is required by the ForegroundServiceAppOpSessionEnded atom,
which counts the number of accepted vs. rejected attempts, and
therefore also needs to know when a rejected start happened.

This cl also contains some cosmetic moving of code so that
startOperation() and noteOperationImpl() are almost
exactly parallel.

* Also *
This cl fixes a bug I discovered in stopWatchingNoted, in which
the callback wasn't fully removed. Consequently, if a callback
was unregistered and then re-registered, the re-registration would
mistakingly be ignored (in direct contradiction to the javadoc).

Test: atest UidAtomTests#testForegroundServiceAccessAppOp
Test: atest AppOpsStartedWatcherTest AppOpsActiveWatcherTest AppOpsNotedWatcherTest
Test: manually monitor: adb shell cmd stats print-logs && adb logcat -v uid -s statsd | grep "statsd  : {" | egrep '\(256\)'
Bug: 152800926
Change-Id: Icdb9edf6b2b7c5807b339c1aabb32e882190b071
2020-05-04 21:59:29 +00:00
Yuncheol Heo
70c4bb9007 Add test api getStatus/NavigationBarBackgroundView.
Introduces new test api to access the background view of status bar and
navigation bar.

Bug: 154720832
Test: atest WindowInsetsPolicyTest

Change-Id: If38d3f57edfbb2631d4c1e47ed5347a332edacfb
2020-05-04 14:36:43 -07:00
Yuncheol Heo
02d3a8ad07 Notify the visibility change to update color views without control.
Previously, we've notified it only when we have the control.
But to update color views, we should notify it even when we have no control.

Bug: 154720832
Test: atest WindowInsetsPolicyTest
Test: make sure no regression on b/150195782, b/151425506
Change-Id: I44b88ddc206f36d8ef11dae9c1477739a185ff21
2020-05-04 14:36:28 -07:00
Jing Ji
060d68630d Support to pull aggregated procstats associations
Bug: 145203981
Test: b/152397079#comment12
Test: atest CtsStatsdHostTestCases
Change-Id: If5b9723a41a9d2eefc2cb132b3a3bf16f57872e9
2020-05-04 14:33:06 -07:00
Jorim Jaggi
98f012c304 Merge "Restore force relayout logic for apps targeting < R" into rvc-dev 2020-05-04 20:44:08 +00:00
Feng Cao
98367aef11 Merge "Make autofill requested by augmented autofill service non-manual" into rvc-dev 2020-05-04 20:30:01 +00:00
TreeHugger Robot
1e15db9ce4 Merge "SurfaceControlViewHost: Let ViewRoot release control." into rvc-dev 2020-05-04 20:19:04 +00:00
TreeHugger Robot
fcaa5a8667 Merge "Fix IME visibility after lock screen" into rvc-dev 2020-05-04 20:00:53 +00:00
Feng Cao
08abd46f61 Make autofill requested by augmented autofill service non-manual
* The use case of this API was for augmented autofill service to send
  updated suggestions
* Before this change, the dynamic autofill request by the augmented
  autofill service only triggers a manual request, but this has caused
  some regular autofill providers to always some suggestion due to
  their special handling for the manual request. Thus the augmented
  autofill service will not receive the request.
* With this cahnge, the request cancels the previous session to start a
  new session, and also it triggers a regular request (non-manual) so
  the autofill provider will not special handle the request.

Test: atest CtsAutoFillServiceTestCases
Bug: 154543563

Change-Id: I233125a6070394a102ad40b9a50b98a43d952b9f
2020-05-04 11:36:21 -07:00
Robert Carr
8644050a99 SurfaceControlViewHost: Let ViewRoot release control.
In SurfaceControlViewHost#release we currently immediately
release mSurfaceControl and then call ViewRootImpl#doDie.
However doDie executes on a handler so the ViewRootImpl may try
and use the SurfaceControl between posting and executing
the message. Actually this release is totally erroneous,
mSurfaceControl is the same object used by the ViewRootImpl
and the ViewRootImpl will release it when processing
doDie().

Bug: 155575445
Test: Existing tests pass
Change-Id: I6a4bf41ba38636ff884aa73d2653b1bab6958b00
2020-05-04 11:23:29 -07:00
Hui Yu
3e376ab5d1 Revert "Add isUidActiveOrForeground() for camera/audio to use."
Revert "Add isUidActiveOrForeground for camera/audio to use."

Revert submission 10829580-isUidForeground

Reason for revert: In CameraService.cpp, before this change, around "am.isUidActive", there was up to 300 ms retry. After this change, the code could move forward fast without retry, but at "mAppOpsManager->startOpNoThrow" call, for the same reason as uid is not updated fast enough, "mAppOpsManager->startOpNoThrow" could also fail.

This CL does not really fix the root cause, but it changes the timing and now the code fails at "mAppOpsManager->startOpNoThrow" call.

Also the timing change may also cause recent multiple CTS test failures.

Bug: 154570809, 155032617, 154849083


Reverted Changes:
Iffed63293:Add isUidActiveOrForeground() for camera/audio to ...
I3685e0c8d:Add isUidActiveOrForeground() for camera/audio to ...
I51ed1fe78:Add isUidActiveOrForeground for camera/audio to us...

Change-Id: I07cbf45949d14489404cb304c80c9ba4276ebe63
2020-05-04 18:07:16 +00:00
Kevin Hufnagle
a18b3ea71b Merge "docs: Clarify class definition of Settings.Secure" into rvc-dev 2020-05-04 17:03:25 +00:00
Song Hu
4a9bd0da70 Merge "Pass ChooserTarget sharing and impression info to AppPredictor. Rank ChooserTargets of the same component as per available scores returned by AppPredictor. These two features are guarded by flag "mChooserTargetRankingEnabled" Add relevant logging to make it easy to figure out root cause from bug report." into rvc-dev 2020-05-04 16:39:00 +00:00
Sally Yuen
a2172bb23d Merge "Add triggering the accessibility shortcut as a system action" into rvc-dev 2020-05-04 16:07:34 +00:00
Jorim Jaggi
653828d09e Restore force relayout logic for apps targeting < R
Test: Open IME in Telegram
Fixes: 153832271
Change-Id: I0c26bbaeb22b06718054fccdec0b550129ccecf8
2020-05-04 17:01:09 +02:00
Hungyen Weng
1c85c4501b Merge "Revert "BluetoothProfileConnecter now calls the ServiceListener'..."" into rvc-dev 2020-05-04 06:51:08 +00:00