(Finally) introduce a new ServiceConnection callback to
tell you when the binding has died. This allows you to robustly
have a weak service monitoring, and also is an easy way to find
out about breakages due to app updates etc.
Also clean up some debug output.
Test: moved to own suite and ran them.
Change-Id: I526cc00816c384fa9eb1312b92406f38085cbff9
- This CL has two main changes:
1) It modifies the activity multi-window and picture-in-picture mode
changed callbacks to provide the configuration of the activity with
the mode applied.
2) It modifies the order in which the multi-window and picture-in-picture
mode callbacks are made, to ensure that when going in and out of
picture-in-picture: first PiP, then MW, and then the config change.
- Previously, the ordering of the two callbacks was inconsistent. When
calling moveActivityToPinnedStack(), we reparent the task into the pinned
stack (triggering the picture-in-picture mode change), followed by the
resize animation (causes configuration changes). Inversely, when we
expand the task to fullscreen (and not just remove it), we run the
animation first, which resizes the task to the final size (causes
configuration changes) then reparent after the animation completes
(triggering the picture-in-picture mode change).
In this CL, we ensure that for both the transition in and out of PiP, we
defer to the bounds animation to trigger the PiP mode change. Normal
calls to reparent or adding a new task are unchanged. When the PiP
mode change is called from the animation, it provides the final target
bounds which we use to calculate the target configuration of the activity
for the callback. If the bounds animation is interrupted, an update will
also be scheduled if we change the fullscreen state we are animating to.
To work around the issue where we are scheduling MW/PiP mode changes in
both the animation and the configuration change, we also now keep track
of each state internally in the ActivityRecord.
Bug: 36099777
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testConfigurationChangeOrderDuringTransition
Change-Id: I03513bc3a4d4a72c250983f22f079ce9d7a2cb40
Signed-off-by: Winson Chung <winsonc@google.com>
This reverts commit 58fc95dc578244b7beb687a48184045dcce788b8.
Bug 36186790
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 CtsShortcutHostTestCases
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 CtsShortcutManagerTestCases
Also all unit tests, except for the known failrues.
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests
Change-Id: I733ee7e12a419ee7ea17ca67c56afe7b039d189a
CALL_PRIVILEGED and CALL_EMERGENCY APIs are used
by vendors and Android Wear and should be moved
to @SystemApi to pass CTS tests.
Bug: 36566521
Test: CTS tests
Change-Id: I73a0b2c4e551b4738c4c322d9822a85ee19d269b
Yum!
Also needed to have a Context.revokeUriPermission() variant that is sane,
so reasonable CTS tests can be written.
Test: new ClipDataJobTest added.
Change-Id: Ia3135ea788a6e32c971bae7dab3a844d0ef4139c
This follows the pattern established by other "out" fields
in BitmapFactory.Options
Bug: 32984164
Test: CtsGraphicsTestCases
Change-Id: Ie72e47338b578b41c550453e2698d2d49eddf6da
- Add API guide for developers giving an overview of what they need
to implement.
- Add @hide setLabel method in PhoneAccount; used when registering a
self-managed CS's phone account; we override it with their app label to
ensure they don't try to give themselves another name.
Test: Unit
Bug: 34159263
Merged-In: I0c890dc2feeb3ee438a80ed425db2aaf1f4c1fdd
Change-Id: I0c890dc2feeb3ee438a80ed425db2aaf1f4c1fdd
Removes @removed methods.
See: I24e86272cf58bf6864505bee3b06978c1c0d46e5
Test: Checked that API is removed.
Change-Id: I93e7f64740671b5ff856f8b38eddc04417f6486e
Replace the QUICK_VIEW_ADVANCED extra.
Also restrict quick viewers not to send file content out of the device.
Test: It builds.
Bug: 36484539
Bug: 36755024
Change-Id: I921230eac6e497a615624202c741ef03432b2690
The ViewStructure typically represents a View, but it it can also be a virtual
view; in particular, WebView uses virtual views to represent HTML elements.
Although most of the properties of the HTML element maps to properties of
Android Views, some properties (such as 'name' and 'id' on <INPUT> fields)
don't, and those are crucial for autofilling web pages.
Rather than trying to artificially map these properties, it's better to create
a generic representation, for the following reasons:
1. Web standards move in a different velocity than Android APIs
2. Android APIs cannot be changed easily. Deprecated APIs continue to work,
and new added APIs don't work in older versions
3. The data used for autofill is opaque to the Framework - it's only relevant
to the node producers (like WebView) and consumers (Autofill services).
Also removed the setIdEntry() that was used for the same purpose.
Fixes: 36696757
Bug: 36718508
Test: VirtualContainerActivityTest with new checks pass
Change-Id: Ia626bd1f640b0b5861e81a5915504b95029874c9
Rather than require an a-priori Notification be supplied in order to
start a service directly into the foreground state, we adopt a two-stage
compound operation for undertaking ongoing service work even from a
background execution state. Context#startForegroundService() is not
subject to background restrictions, with the requirement that the
service formally enter the foreground state via startForeground() within
5 seconds. If the service does not do so, it is stopped by the OS and
the app is blamed with a service ANR.
We also introduce a new flavor of PendingIntent that starts a service
into this two-stage "promises to call startForeground()" sequence, so
that deferred and second-party launches can take advantage of it.
Bug 36130212
Test: CTS
Change-Id: I96d6b23fcfc27d8fa606827b7d48a093611b2345
(cherry picked from commit 79047c62b58fb0a0ddf28e2b90fe4d17e05bc528)