Commit Graph

686 Commits

Author SHA1 Message Date
Peter Visontay
e746637688 Merge "Add an ApiDemo for showing an overlay window." 2017-12-14 14:02:53 +00:00
Peter Visontay
48f2a3142e Use FileProvider (instead of a world-readable file) in the APK installer demo.
World-readable files have been disallowed since N.

Test: Manually.
Change-Id: Iab174799403023378200d75dac5e8cd02e64dbf8
2017-12-12 18:16:29 +00:00
Peter Visontay
ad360d40be Add an ApiDemo for showing an overlay window.
Test: manually.
Change-Id: I9eaa9c0eeb3bc04389c27a7fe5e74fc5acdc59fd
2017-12-12 15:44:02 +00:00
Peter Visontay
6b7860e588 Remove obsolete code from the InstallApk API demo.
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
2017-11-17 10:00:02 +00:00
Peter Visontay
75bca25be1 Add a demo of the Session-based PackageInstaller to ApiDemos.
Test: Manually.
Change-Id: If084477e8970777ef5cd90c55afe86a116ee1458
2017-11-16 21:49:17 +00:00
Clara Bayarri
a3516bc957 Replace fonts of unclear origin
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
2017-06-01 11:08:13 +01:00
Dianne Hackborn
5229a90146 Add sample for enqueuing work in a job.
Basically this is to have sample code to include in the java docs.

Bug: 37544153  API Review: JobWorkItem

Test: none

Change-Id: Ie4ed3ce4af8239010da2647fab00ed2aadb1d348
2017-04-21 15:02:25 -07:00
Ben Lin
77e01745b8 Merge "Update DocumentsContract call." 2017-03-13 17:27:18 +00:00
Ben Lin
9cf5fd65aa Update DocumentsContract call.
Test: Builds properly.
Bug: 36023174
Change-Id: I6d8c604a9660741dda1c997f949efd0f570cc506
2017-03-09 11:04:44 -08:00
Joachim Sauer
96f6845b80 Merge "Renaming Czech Republic to Czechia." am: a824f044c3 am: e7b9cff32e
am: cb632200b0

Change-Id: I79436472ad4a60803db657cbf82b2cde008558a2
2017-03-08 17:49:22 +00:00
Fredrik Roubert
3e55022b86 Renaming Czech Republic to Czechia.
Bug: 34964100
Test: n/a
Change-Id: I711723923cefa88c99585518b085a2c8df076b7d
2017-02-23 17:30:02 +01:00
Bryce Lee
f7a0b42d09 Stop screen sharing when exiting MediaProjectionDemo.
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
2017-02-16 14:09:43 -08:00
Vladislav Kaznacheev
5dab9f1f4f Add Pointer capture demo to APIDemos
Bug: 30897034
Test: manually in ApiDemos > Graphics > OpenGL ES > Touch Rotate
Change-Id: Id87b17938cf876b4886de69ffaa8a2b3c4f27143
2017-01-27 09:05:41 -08:00
Dianne Hackborn
8a416b3033 API demo for notification that starts a background service.
Test: not relevant

Change-Id: I9ad6640dccded3be0baf879a6694f9535144d80c
2017-01-23 14:20:03 -08:00
Vladislav Kaznacheev
0f87eb452f Rename View.setTooltip/getTooltip to setTooltipText/getTooltipText
Bug: 34454987
Test: adb shell am start -n com.example.android.apis/.view.Tooltips
Change-Id: I16156e5b928202f50f7290ff30ad36aa80d615d2
2017-01-19 11:05:47 -08:00
TreeHugger Robot
3d87989183 Merge "Add tooltip demo to ApiDemos" 2016-11-22 22:15:47 +00:00
Vladislav Kaznacheev
922dea9376 Add tooltip demo to ApiDemos
Test: launch com.example.android.apis.view.Tooltips
Bug: 31515376
Change-Id: I5456740c4e93105c5058c198b22f4fd7634f3b46
2016-10-20 15:28:25 -07:00
Robert Carr
3ca1a928a4 Include seamless rotation mode in API Demo.
Test: Try the RotationAnimation activity of API demos.
Change-Id: I4f3aba54d310ecbe06776190a4096c71fdf85d24
2016-10-18 14:42:10 -07:00
Dianne Hackborn
9302998b13 Add API demo for running multiple foreground services.
Change-Id: I44435f6e7750ccbbadf5e293dd10069c6cef94a4
2016-08-01 17:52:18 -07:00
Dianne Hackborn
1f502540b7 Fix issue #29058724: Improve JobScheduler API demo
Change-Id: I551d4d3376e522ee2d790331e8f83711450c9d19
2016-05-31 18:03:28 -07:00
Michael Wright
d48a67a190 Merge "DO NOT MERGE Remove Pointer Capture API." into nyc-dev 2016-05-26 13:40:24 +00:00
TreeHugger Robot
e575990583 Merge "DO NOT MERGE Rename PointerIcon and Pointer Capture APIs" into nyc-dev 2016-05-19 15:03:35 +00:00
Yohei Yukawa
2e3c5bd7cc Follow class package change: LocaleList
In order to avoid layering violation, LocaleList needs to be moved from
android.util package to android.os package [1].  This CL follows up that
package change.

No behavior change is intended.

 [1]: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18

Bug: 28819696
Change-Id: Ib331cc3a63f7a1e656573f032a1e69eb906f7c14
2016-05-17 15:47:19 -07:00
Michael Wright
10102e4d88 DO NOT MERGE Remove Pointer Capture API.
Bug: 26830970
Change-Id: I14d8facef79710eb5397cff83ddde348a39f5c5f
2016-05-17 20:03:29 +01:00
Michael Wright
71620c8898 DO NOT MERGE Rename PointerIcon and Pointer Capture APIs
This is a response to API council feedback.

Bug: 26830970
Change-Id: I19d3919dc201fdf2b949074f02490669b4a5d775
2016-05-17 20:03:23 +01:00
Adrian Roos
1052d438de Update Sample Device Admin
Adds options to exercise the newly added KEYGUARD_DISABLE_REMOTE_INPUT
and not so newly added KEYGUARD_DISABLE_FINGERPRINT.

Change-Id: I0e2a05f2a668b7d8ceacde3abcf5f8c80cb4bdb9
Fixes: 26981262
2016-05-11 15:51:11 -04:00
Dianne Hackborn
da2cd13037 Fix issue #28051399: API demos crashing on Remote service binding options
Details, details.

Change-Id: I43687a1a593b2c7bd176b33d4c9c9169be723d72
2016-05-05 18:00:07 -07:00
Vladislav Kaznacheev
a4911fcb08 Rename DropPermissions to DragAndDropPermissions
Bug: 28296057
Change-Id: If7a1186437320144252e079a29fece64950afcf5
2016-04-20 14:22:39 -07:00
Dianne Hackborn
96370959b6 Improve photos content observer demo.
This is now much more like one would write to look for
photos being added/changed.  It looks at the URIs that have
changed and filters them to only files that it cares about
(in this case those under DCIM, that is photos added by the
camera), and also explicitly understands the difference
between individual URIs changing and a more general change
requiring a full re-query of the provider.

Change-Id: I509570aa66839f8b84b5a065c4b4e49fbd0f1c29
2016-04-07 15:29:26 -07:00
Dianne Hackborn
a4a1bb7dca Add sample for observing only photos changes.
Change-Id: I954fb466fb21d73f88b1dd1bc86eac617a628073
2016-03-21 13:31:34 -07:00
Vladislav Kaznacheev
4f15403fbe Add drag and drop to VideoViewDemo
Play videos dragged from other apps (such as Files app).

Change-Id: I010eada2aed6a14bab04e6b583f07551d91a200c
2016-03-03 10:37:38 -08:00
Makoto Onuki
08d2a04420 Add a secondary DA to ApiDemos for testing
Bug 27107878

Change-Id: Id8179926d424ca8b4678ac028f4c9eab7a81a4c2
2016-02-10 11:28:49 -08:00
Vladislav Kaznacheev
8789484eab Introduce the example of pointer capture API
Change-Id: I36276669ca0c8d8b200390064deca8c42603cb0d
2016-02-09 00:36:02 +00:00
Jun Mukai
6cb3668322 Introduce the examples of pointer shape API.
Change-Id: Ib0be39d560fbc00db661f639a02c4df2e2c1867b
2016-02-03 14:54:44 -08:00
Yohei Yukawa
fa3c909d8d Merge "Add sample code for EditorInfo#hintLocales." 2016-01-27 18:00:35 +00:00
Yohei Yukawa
85a32da54f Add sample code for EditorInfo#hintLocales.
This CL adds some sample entries so that IME developers can test their
IMEs with various EditorInfo#hintLocales.

Bug: 22859862
Change-Id: Ic0bc98bc4c9cb7b874ca8d54433bde76d05e8e03
2016-01-26 13:50:50 -08:00
Dianne Hackborn
e3ad7fa9ac Add API demo for monitoring media content.
Both the classic ContentObserver API, and the new
JobScheduler API.

Change-Id: I2011389abb2f863e810ccc9012fb3c53c93c76fd
2016-01-22 11:08:37 -08:00
Alan Viverette
bfd633ad65 Update ApiDemos control samples for Material
Adds examples for a variety of Material-only control styles including
underlined Spinner and discrete SeekBar. Groups controls into cards.

For the old-style controls, moves some run-time setup tasks into XML.

Bug: 19352193
Change-Id: Ibb1c82ac6ecaca3b93f3acfd65ef67cd9784fef4
2016-01-07 16:41:10 -05:00
Yohei Yukawa
fafac8ef79 Add an API sample to show subtype enabler.
At least on AOSP InputMethodManager#showInputMethodAndSubtypeEnabler()
has been broken for long time.  Also, there has been a valid alternative
way to do the same thing.

This CL adds an API sample to officially encourage people to use
Settings.ACTION_INPUT_METHOD_SUBTYPE_SETTINGS intent rather than trying
to rely on InputMethodManager#showInputMethodAndSubtypeEnabler(), which
is highly likely to be broken.

Bug: 26189558
Change-Id: I915a2d81948598ed08b4ef9111bdd128fd93f3df
2015-12-14 18:59:44 -08:00
Dianne Hackborn
1cd11bc0ff Extend foreground service test to demonstrate doze behavior.
Change-Id: I81162b6a309a09c1041b71fce1e9a8335afa5b53
2015-12-02 14:17:08 -08:00
Alan Viverette
c3042be803 Add sample magnification controller service
Bug: 22718911
Change-Id: I25d2ca95836f7fe033accf215fd925fd06505b12
2015-11-13 10:49:10 -05:00
Teng-Hui Zhu
6324dbbae2 Add horizontal indeterminate progress bar into ApiDemos
Change-Id: Iae72019d5ecdfbc710d01bd341b6de058d3b665a
2015-11-03 15:08:20 -08:00
Teng-Hui Zhu
ac7c153cce Remove ProgressBar4, it is deprecated from Lollipop
Change-Id: Ia2a038a973eb6c6021c73d157410be6e64c2b1a7
2015-11-03 13:57:44 -08:00
Todd Kennedy
156f27b34d Merge "update show/hide button" 2015-09-21 18:01:28 +00:00
Alan Viverette
93e094856e Add number picker to ApiDemos
Change-Id: I33dc7a01f543cb5308e810f508bedc3d25eb366a
2015-09-18 09:43:08 -04:00
Todd Kennedy
5383dc24fc update show/hide button
A Fragment saves its hidden state. Update the text of the button
accodring to state of the Fragment.

Bug: 22666353
2015-07-23 12:31:33 -07:00
Chris Wren
b6ba3c5f64 remove setLatestEventInfo from API samples
Bug: 18510449
Change-Id: I26a9dbc6c92b226e28798e5a348c9357c85405ab
2015-06-11 16:51:44 -04:00
Jeff Brown
86cd5e82b9 Expand Presentation demo to test 4K mode switches.
Bug: 18241736
Change-Id: I5bedb656696bc3dfc756df35dd326ff3524152c1
2015-06-09 19:52:17 -07:00
James Cook
3a7f265938 Merge "Add more text samples to ApiDemos, move to Views/Text" into mnc-dev 2015-06-08 20:08:34 +00:00
Alan Viverette
75f0029e5f More seek bars in ApiDemos
Change-Id: I4a868da4ebfd527609d9983d5236d89624c2c011
2015-05-29 16:24:22 -07:00