Also fix bug where persistent uri access was not taken for
OPEN_DOCUMENT_TREE intents.
Change-Id: Iccc3e2434e08e42fa84dc3ceb3fbfe1db1320180
Fixes: 119519300
Test: manually using ApiDemos Content > Storage > Documents
The framework Preference APIs are deprecated, so these samples are
misleading and should be removed.
Trying to submit again now that the relevant sample tags have been removed.
Bug: b/119602280
Test: n/a
Change-Id: I7efb509f5c938122575cf4177b50872bfc089d00
This reverts commit 946280d6ce.
Reason for revert: Breaking builds due to doc generation using these samples
Change-Id: I7caf9792e84e0e1eedea4a7294a321c684be2d5c
The framework Preference APIs are being deprecated, so removing the
samples will help avoid confusion.
Bug: b/119602280
Test: n/a
Change-Id: Ib3a2c38b8fbb0f1afc9ef6a35963def46ee931f7
In particular, we have an example of a foreground-service PendingIntent
triggered by a 15-second delayed alarm following a button click. This
is enough time to exercise use cases like swiping the app out of recents
before the alarm fires, therefore entering the "starting a fg service
when the app is not in a fg state" flows.
Bug: 73559697
Test: this is it
Change-Id: If57908ab852c7a0bfab7bb1da8eda0a47493fc6b
Bug: 72696928
Test: Install and open ApiDemos > App > Activity > Max Aspect Ratio > 1:1 / 16:9 / Any
Change-Id: Ie76c8c4babd6b4c281eec8ff977a0c02a868ee0e
ApiDemos has been using private APIs from telephony-common to
demonstrate the Mms feature. However, this is causing link-type check
warning because ApiDemos itself is built with SDK (LOCAL_SDK_VERSION is
set) but telephony-common isn't. As we are working on to promote the
warnings into errors, this warnings must be fixed.
Fixing the warning by copying the PDU classes from telephony-common, so
that there is no need to link to the library. Also the package name for
the copied classes are all changed in order to prevent the collision
with the same classes in telephony-common which is in the boot class
path.
Test: m -j ApiDemos is successful and does not show any link-type check
warning.
Change-Id: Ica508cd4daf3640e4f90fa26dd11dfd03867d717
The documentation for android.app.Service includes an example from
LocalServiceActivities.java. This example now better shows and
explains the distinction between binding and connecting. It also
shows the set of conditions that require the client to call
unbindService().
Test: make ds-docs -j16
Bug: 63118511
Change-Id: I1276de3f9421e13e1964039d37db9adc87f3039f
The documentation for android.app.Service includes an example from
LocalServiceActivities.java. This example now better shows and
explains the distinction between binding and connecting. It also
shows the set of conditions that require the client to call
unbindService().
Test: make ds-docs -j16
Bug: 63118511
Change-Id: I1276de3f9421e13e1964039d37db9adc87f3039f
1) Remove the "Refresh package" demo. This was using Intent.EXTRA_ALLOW_REPLACE, which was deprecated in API 16.
2) Java code cleanup.
Test: Manually.
Change-Id: I0cbff934ca223a3fe73a1044ed68f3e079be8237
The font being used in the ApiDemos is of unclear origin, replace
it with a font we created. Also cleanup the code around it
Test: manual
Bug: 37726227
Change-Id: I7e30c3afddc731473c9bbe5a767fa0e1144a20d6
Basically this is to have sample code to include in the java docs.
Bug: 37544153 API Review: JobWorkItem
Test: none
Change-Id: Ie4ed3ce4af8239010da2647fab00ed2aadb1d348
The existing implementation will leave screen sharing running after
stop, causing the VirtualDisplay to not be destroyed. This change
makes sure any screen sharing ends on stop.
This change also addresses the the ToggleButton's state being saved.
Test: manual
Bug: 26221019
Change-Id: I51ac8bf09932a83100776c919146eed8c28f35b3