ANDROID_ID for Instant Apps now has the following properties:
1) per-app scoped
2) reset if the user clears the Instant App
3) remains the same if the Instant App gets upgraded to an installed
app.
Note that if the user goes instant -> installed_1 -> uninstall ->
installed_2 the ANDROID_ID at installed_1 will not be the same as
installed_2. This was deemed better than the id changing on the upgrade
step.
Test: manual
Change-Id: I532975c50049c94ff80902a897e001dd35a69f9f
The NotificationManager.startServiceInForeground() experiment is over,
and will not ship as API, so it's time to tidy up and get rid of it.
Bug 36130212
Test: manual
Change-Id: I834d1ce059aa464ff27f69f5e5d3625cc5e61d8a
javalib.jar is now only used for jars that contain dex files, so
host java libraries are now always called classes.jar. Update
layoutlib's custom rules to match. Also remove built_ext_data,
the classes.jar in built_ext_classes already contains the
resources.
Bug: 36902714
Test: layoutlib-tests
Change-Id: I522d9e3786ad7deeb291c7c1a61ec4b86be03dc2
(cherry picked from commit 15d18782065c05d6566841da43ce311e5000eddd)
This CL cleans up APIs around font variation settings.
- Remove FontConfig and FontManager public API.
- Remove FontManagerService from system service.
- Extract inner class FontConfig.Axis as top-level class FontVariationAxis.
This is used by Typeface.Builder public API to create new Typeface.
- Introduce and expose FontVariationAxis utility functions from/to string.
- Throws if the invalid font variation settings is passed.
Test: android.text.cts.FontVariationAxisTest passes
Test: android.graphics.cts.TypefaceTest passes
Test: android.graphics.cts.PaintTest passes
Change-Id: I9ccafe7a53935960566243e2856e166878ca59ae
Do not dispose Bridge on tearDown. The concept of disposing the Bridge
only made sense when we were loading it dynamically. Some classes have
static initializers that will fail after the dispose (like Typeface).
Test: N/A
Change-Id: I9c934432232bda02a4d26425587096fb6dc957b0
(cherry picked from commit f1532e36e16e2b55f175a24f11df91cf344833ff)
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
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)
In some cases, if an error happens, no session will exist in
BridgeRenderSession.
Test: Added small regression test
Change-Id: Ic9be381767626766395c65044542c197ed7649e7
In many cases, throwing an exception will stop the inflation or
rendering of a layout. Sometimes, we could recover from some of the
failures and render a layout that is "usable".
I've done a first pass trying to follow the following rules:
- Try simple recoveries by choosing sensible defaults. Not trying
complex recoveries.
- Only recover if the exception is not part of the class behaviour.
Avoided removing declared exceptions or exceptions that are expected by
the framework.
- I've kept assertions in place so, in most cases, the behaviour will
be almost identical to the previous one with assertions enabled.
Test: Checked with existing tests
Change-Id: I0001fdd3c808cf405c4eb8d734b9bbe63493e05c
This Intent will be used in Settings to show the settings UI for the
Ephemeral resolver. Settings can get the correct component to send the
Intent to by calling
PackageManager.getInstantAppResolverSettingsComponent
Bug: 35918998
Test: Boots
Change-Id: I0edcf85704f2c19e0ee27f91b6ef057d52e32778
(cherry picked from commit aa49cb86e6d5f23d82c97db32c848bc4ea2b81bc)
Updates the resource handling after the changes to the ResourceUrl API
changes.
Test: Existing tests should pass
Change-Id: I314a20673cf94e4ef27e9712d3fa7b6f69bba796
There is some flakiness in View#onConfigurationChanged callback -
if ViewRootImpl receives config update earlier than ActivityThread,
it may not detect the configuration change and skip inner updates.
Also now ViewRootImpl assumes that it receives the global config as
a param, but instead it gets merged config from WM. This means that
ViewRootImpl#sConfigCallbacks was sending incorrect values to the
recipients.
This CL switches to sending global and override configuration to the
client separately. Also in case if there is a corresponding activity,
it first updates it and waits for update callback to ViewRootImpl.
This way global config and override config for activity will always
be set first and resources will be updated before inner state of
ViewRootImpl is updated.
Bug: 35870157
Bug: 34164473
Test: android.server.cts.ActivityManagerDisplayTests
Test: testOnMovedToDisplayCallback
Change-Id: Ic9e7541cf25ecfac6ec90e48f7efb0ece91f657e
repositionChild, performDeferredDestroy, and SurfaceControl with
background were all only used by SurfaceView and are now no longer
required in the wm.
Test: Only red.
Change-Id: Icb773572e6d6202f78a6d23b2431fbfacbe272c6
This CL contains following clean up:
- Hide unnecessary constructors.
- Change List<XX> to XX[] since actually all fields are immutable.
- Change font's variant type from String to int.
- Decouple resource related members to FontResourcesParser.
- Add NonNull/Nullable to all fields.
Test: ran android.content.res.FontResourcesParserTest
Change-Id: If456266ffff86d41342572a19662cc8f3cd13181
Ostensibly for instant apps, we allow play to mark an app as having
an update available. This will trigger instant app resolution even
if the instant app is already installed on device.
Bug: 35143464
Test: Manual; launch URI of installed instant app, see it runs w/o resolution. set bit. launch URI of installed instant app, see it runs resolution
Change-Id: I511df2b2a3eab39377167c770255ccbe02d5dad2
This removes the need of using BitmapShader while we debug the problem
in layoutlib.
Bug: 36204957
Test: Added new test for adaptive icons
Change-Id: I4ff9968b996a1563be8caa0873e7aec8fb5cb151
Displays can be rotated separately and rotation watcher clients
are only interested in rotation of some specific display. This CL
adds displayId to rotation watchers and only informs them about
changes on their display.
Bug: 34242678
Test: Manual and debug.
Change-Id: If0f03804da0392c2b14a4e7c2d6a06068ad8760b
This allows to avoid A11yManager -> A11yManagerService IPC, when there's no
subscribers to a given event
Test: steps:
- Enable A11yManager.DEBUG
- Navigate through a few random activities
- In logcat, ensure log messages are present, notifying that certain events
won't be dispatched
Change-Id: Ia019fb66053f10095b3651407d09de8e89cdd227