Commit Graph

3833 Commits

Author SHA1 Message Date
Hongwei Wang
ec0d9449a1 Add demo for content PiP
Bug: 165793661
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/e9Mp5rvxYBrNOdGSUoSXHO
Test: manual, see Video
Change-Id: I026844cf5eabf30fe553641b36daed6e31e4f893
2022-02-09 16:19:12 -08:00
Bob Badour
e0439a3892 Merge "Fix license texts." am: 632da0a501 am: b375f76135 am: 54cfa4d443 am: 298e88bee0
Original change: https://android-review.googlesource.com/c/platform/development/+/1955284

Change-Id: I1de3210c96da09546589794781f8f12cbe7ed128
2022-01-21 20:03:42 +00:00
Bob Badour
298e88bee0 Merge "Fix license texts." am: 632da0a501 am: b375f76135 am: 54cfa4d443
Original change: https://android-review.googlesource.com/c/platform/development/+/1955284

Change-Id: I1cb05b611a14d2ff227af99ca5b1cc1acd68d883
2022-01-21 19:44:54 +00:00
Bob Badour
082705bfb3 Fix license texts.
Push specific licenses down the tree toward the leaf directories.

Remove extra Apache 2.0 license texts--just use Android-Apache-2.0

Test: m nothing
Change-Id: Ibee25f75f5933699d6f43acdc192b2ada6823757
2022-01-20 19:04:52 +00:00
Ming-Shin Lu
f306c31e0b Using IME context to inflate layout from S_V2 am: e0caa3b4af am: d45b8f1d4f
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/16600245

Change-Id: I944480434df78d6a51547b10bc475c6bd010f175
2022-01-11 17:35:24 +00:00
Ming-Shin Lu
d45b8f1d4f Using IME context to inflate layout from S_V2 am: e0caa3b4af
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/16600245

Change-Id: I73a467cff499f9e2a239d375b50b0ce803479fd1
2022-01-11 17:23:18 +00:00
Ming-Shin Lu
e0caa3b4af Using IME context to inflate layout from S_V2
With CL[1],[2] to migrate InputMethodService as the subclass of the new
introduced class WindowProviderService in S_V2, IME context resources
can be managed by associating the window container of IME window when
its display/window configuration changed.

So in SoftKeyboard#getDisplayContext, we can get rid of
createDisplayContext logic from S_V2 with gated by SDK version and
refining the method documentation to make it clear.

[1]: Ie565e30ed5dd3f2cfe27355a6dded76dc3adc14b
[2]: I64a1614f32d097785915f6105b1813a929e0fe32

Bug: 213118079
Bug: 133825283
Test: manual with below steps
    1) adb install -r EditTextVariations.apk
    2) adb install -r SoftKeyboard.apk
    3) adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
    4) adb shell ime set com.example.android.softkeyboard/.SoftKeyboard5
    5) Enable screen auto-rotation
    6) Launch EditTextVariations from launcher's shortcut
    7) Tap the first EditText field to show IME
    8) Rotate the device to the landscape mode
    9) Expect the IME should not be shrunk

Change-Id: I9a512a90ca43f07236a041d9e82dbd875206f99e
2022-01-10 23:42:17 +08:00
Yohei Yukawa
bb7d04778d Support non-default back-disposition in ThemedNavBarKeyboard
With this CL, you can let ThemedNavBarKeyboard call

  InputMethodService#setBackDisposition(int)

with either the following values

  * BACK_DISPOSITION_DEFAULT
  * BACK_DISPOSITION_ADJUST_NOTHING

so that you can see how those two flags work.

Bug: 213337792
Test: Manually verified as follows
 1. Flash aosp_coral-userdebug into the device
 2. make -j ThemedNavBarKeyboard
 3. adb install -r $ANDROID_PRODUCT_OUT/system/app/ThemedNavBarKeyboard/ThemedNavBarKeyboard.apk
 4. adb shell ime enable com.example.android.themednavbarkeyboard/.ThemedNavBarKeyboard
 5. adb shell ime set com.example.android.themednavbarkeyboard/.ThemedNavBarKeyboard
 6. Tap any edit field
 7. Make sure that the back button is left-pointing triangle
 8. Tap "BACK_DISPOSITION_ADJUST_NOTHING" on the IME
 9. Make sure that the back button is down-pointing triangle
Change-Id: I71aa1dd23d72e8891cb3887efe5db1a48b6a017d
2022-01-05 15:34:50 -08:00
Hongwei Wang
b0e7eff1b5 Merge "Consolidate PiP demos in ApiDemos app" 2021-12-22 04:15:43 +00:00
Hongwei Wang
17aab38616 Consolidate PiP demos in ApiDemos app
Put various configurations for PiP into one Activity, access by navigate
to `App > Activity > Picture in Picture`. Current supports

- Enter PiP with on-screen button
- Enter PiP by swiping up to home or tap on home button
- Toggle the auto enter PiP flag on and off
- Toggle the source rect hint on and off
- Toggle the seamless resize flag on and off
- Change the position of current and next source rect hint
- Tablet layout on foldables

The upcoming content PiP will also be hosted here.

Added also support passing the intent extra, full command

```
adb shell am start \
    --ez auto_pip [true|false] \
    --ez source_rect_hint [true|false] \
    --ez seamless_resize [true|false] \
    --es current_position [start|end] \
    com.example.android.apis/.app.PictureInPicture
```

Bug: 175727044
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/gdcklbUsT7SmbUhNcVSXfd
Test: manual, see Video
Change-Id: I60233f2d6e428d11d4ab1b566e36c38fd4c4f937
2021-12-21 13:48:31 -08:00
Yohei Yukawa
f2464f70f2 Set targetSdkVersion=31 to ThemedNavBarKeyboard
With this CL, ThemedNavBarKeyboard sameple IME will have an explicitly
set targetSdkVersion=31 so that it can be installed on older version
of Android OSes.

This CL also explicitly sets "android:exported", which has been
required in AndroidManifest.xml since API 31.

Fix: 211463997
Test: Manually verified as follows
 1. Flash SQ1A.211205.008 aosp_coral-userdebug into coral
 2. make -j ThemedNavBarKeyboard
 3. adb install -r $ANDROID_PRODUCT_OUT/system/app/ThemedNavBarKeyboard/ThemedNavBarKeyboard.apk
Change-Id: Idd88031a6b65cca58add8abe42794bc5f01b1973
2021-12-20 10:34:34 -08:00
Treehugger Robot
83b075db80 Merge "Update lint baseline for AutofillKeyboard" am: 62ce42ad0a am: 676489f321 am: 3cc9d5c708 am: 5dee47eff2
Original change: https://android-review.googlesource.com/c/platform/development/+/1827714

Change-Id: I558e2d7ad72cbf659583dede082ae8498406a2e1
2021-12-03 17:15:49 +00:00
Treehugger Robot
62ce42ad0a Merge "Update lint baseline for AutofillKeyboard" 2021-12-03 16:26:41 +00:00
Colin Cross
e915cf2a80 Update lint baseline for AutofillKeyboard
The new lint version finds more NewApi errors.

Test: m lint-check
Change-Id: I190bbf97000312dc4911552594374d36d8782d7b
2021-09-20 11:56:38 -07:00
Aurimas Liutikas
33be7cbcbe Add explicit exported tags
Bug: 195988762
Test: make javac-check
Change-Id: Ifd07672da0141c74ad32613a17691c6cd09e54de
Merged-In: Ifd07672da0141c74ad32613a17691c6cd09e54de
(cherry picked from commit 7512a62755)
2021-09-14 11:09:20 -07:00
Anton Hansson
cf4b9a604d Merge "Add sdk extension version info to prop templates" 2021-09-01 09:00:15 +00:00
Anton Hansson
48c492ed9f Add sdk extension version info to prop templates
This adds two new properties alongside AndroidVersion.ApiLevel:
- AndroidVersion.ExtensionLevel: The sdk extension version if the SDK
- AndroidVersion.IsBaseSdk: Whether the extension level is the the one
  that the ApiLevel shipped with (true), or if is an extension SDK
  release (false).

While we're here, dedupe the recipe that processes these templates.

Bug: 195281582
Test: m out/host/linux-x86/development/sdk/platform_source.properties
      and inspect the substitution is working
Change-Id: Ieea20731aed2e0f35bbe4cfd8ca596cf11f4b3bc
Merged-In: Ieea20731aed2e0f35bbe4cfd8ca596cf11f4b3bc
(cherry picked from commit cf2f42c36b7997e9ce87682bb3a5511bdb72936f)
2021-08-31 17:42:12 +00:00
Anton Hansson
29d3b22bf9 Merge "Add sdk extension version info to prop templates" into sc-dev-plus-aosp am: 538c18b677 am: 310344483f am: f9355bc2cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/15684826

Change-Id: I78a43228828ae28c503856ce30ecfebee97fb768
2021-08-31 11:26:02 +00:00
Anton Hansson
786bf26e3a Add sdk extension version info to prop templates
This adds two new properties alongside AndroidVersion.ApiLevel:
- AndroidVersion.ExtensionLevel: The sdk extension version if the SDK
- AndroidVersion.IsBaseSdk: Whether the extension level is the the one
  that the ApiLevel shipped with (true), or if is an extension SDK
  release (false).

While we're here, dedupe the recipe that processes these templates.

Bug: 195281582
Test: m out/host/linux-x86/development/sdk/platform_source.properties
      and inspect the substitution is working
Change-Id: Ieea20731aed2e0f35bbe4cfd8ca596cf11f4b3bc
(cherry picked from commit cf2f42c36b7997e9ce87682bb3a5511bdb72936f)
2021-08-27 17:41:03 +01:00
Bo Hu
2e9178c68e Merge "Cube 3d live Wallpaper can't be set on android 11" am: a7fbe75b82 am: 95e1a86c7f am: 3c2d039c54 am: 222f23559e am: ac33f427ab
Original change: https://android-review.googlesource.com/c/platform/development/+/1364437

Change-Id: Ib87075d9d9f01537abf5b765747462fbf0eaf980
2021-08-26 19:43:49 +00:00
Bo Hu
3c2d039c54 Merge "Cube 3d live Wallpaper can't be set on android 11" am: a7fbe75b82 am: 95e1a86c7f
Original change: https://android-review.googlesource.com/c/platform/development/+/1364437

Change-Id: I4d80b2dfb81831ce1176740b2004f3b63d6e5b0a
2021-08-26 18:50:36 +00:00
Bo Hu
95e1a86c7f Merge "Cube 3d live Wallpaper can't be set on android 11" am: a7fbe75b82
Original change: https://android-review.googlesource.com/c/platform/development/+/1364437

Change-Id: Ie6b4595ffaf9c889f9ce363e08098db15823a2fb
2021-08-26 18:38:42 +00:00
Bo Hu
a7fbe75b82 Merge "Cube 3d live Wallpaper can't be set on android 11" 2021-08-26 17:33:36 +00:00
Anton Hansson
b6edd7aa51 Add sdk extension version info to prop templates
This adds two new properties alongside AndroidVersion.ApiLevel:
- AndroidVersion.ExtensionLevel: The sdk extension version if the SDK
- AndroidVersion.IsBaseSdk: Whether the extension level is the the one
  that the ApiLevel shipped with (true), or if is an extension SDK
  release (false).

While we're here, dedupe the recipe that processes these templates.

Bug: 195281582
Test: m out/host/linux-x86/development/sdk/platform_source.properties
      and inspect the substitution is working
Merged-In: Ieea20731aed2e0f35bbe4cfd8ca596cf11f4b3bc
Change-Id: Ieea20731aed2e0f35bbe4cfd8ca596cf11f4b3bc
2021-08-26 17:11:15 +01:00
Aurimas Liutikas
c82a810842 Add explicit exported tags
Bug: 195988762
Test: make javac-check
Change-Id: Ifd07672da0141c74ad32613a17691c6cd09e54de
Merged-In: Ifd07672da0141c74ad32613a17691c6cd09e54de
(cherry picked from commit 7512a62755)
2021-08-17 12:18:12 -07:00
Aurimas Liutikas
7512a62755 Add explicit exported tags
Bug: 195988762
Test: make javac-check
Change-Id: Ifd07672da0141c74ad32613a17691c6cd09e54de
2021-08-11 21:55:40 +00:00
Yuntao Xu
6158f42467 Merge "Convert Levels/Android.mk to Android.bp" am: ec91659823 am: 7c7034f02a am: cc5ca54b05 am: 6de473cbe7
Original change: https://android-review.googlesource.com/c/platform/development/+/1709407

Change-Id: Ib005479e4d973c46dd261d580e5041f574085607
2021-07-28 19:25:28 +00:00
Yuntao Xu
cc5ca54b05 Merge "Convert Levels/Android.mk to Android.bp" am: ec91659823 am: 7c7034f02a
Original change: https://android-review.googlesource.com/c/platform/development/+/1709407

Change-Id: I690b09534e94577dcc91686789678efe58e004e9
2021-07-28 18:29:17 +00:00
Yuntao Xu
ec91659823 Merge "Convert Levels/Android.mk to Android.bp" 2021-07-28 17:56:13 +00:00
Yuntao Xu
2ab71a2936 Convert Levels/Android.mk to Android.bp
1. converted the Make file to a Soong one;
2. handled the .rscript files by genrule (to include the same commands used when build
with the former .mk file);
3. the differences observed in the apks before and after the conversion
are the same as in http://b/192521178, which should not affect the
conversion here;
4. the same result was observed when run the two apks on a physical
phone(Pixel 3a XL (bonito));
5. test commands:
mma -j LevelsRS
adb install -r ~/aosp/out/target/product/bonito/system/app/LevelsRS/LevelsRS.apk
adb shell am start -S -n com.android.rs.levels/.LevelsRSActivity
adb shell am start -S -n com.android.rs.levels/.LevelsDalvikActivity

Bug: 124261647
Test: compared the two apk files built by Make and Soong
Test: run two apks on a Pixel 3a XL (bonito) phone
Test: TreeHugger
Change-Id: I93876654215de98ec3160912676589ae143a4071
2021-07-26 19:25:52 +00:00
Yuntao Xu
bed3ca1d79 Merge "Convert HelloCompute/Android.mk to Android.bp" am: 287e52bff6 am: 1185764fe4 am: b8d0a3a9fa am: 41efa982cf
Original change: https://android-review.googlesource.com/c/platform/development/+/1711177

Change-Id: I7be35624009767ffc20808cb64f5c0a6895d5555
2021-07-23 18:54:39 +00:00
Yuntao Xu
b8d0a3a9fa Merge "Convert HelloCompute/Android.mk to Android.bp" am: 287e52bff6 am: 1185764fe4
Original change: https://android-review.googlesource.com/c/platform/development/+/1711177

Change-Id: Ic6fb03d83685ddf7103362f0100a65ec82cda9ab
2021-07-23 18:23:51 +00:00
Yuntao Xu
4945a032a0 Convert HelloCompute/Android.mk to Android.bp
1. converted the Make file to a Soong one;
2. handled the .rscript files by genrule (to include the same commands used when build
with the former .mk file);
3. the differences observed in the apks before and after the conversion
are the same as in http://b/186244109, which should not affect the
conversion here;
4. the same result was observed when run the two apks on a physical
phone(Pixel 3a XL (bonito));
5. test commands:
mma -j RsHelloCompute
adb install -r ~/aosp/out/target/product/bonito/system/app/RsHelloCompute/RsHelloCompute.apk
adb shell am start -S -n com.example.android.rs.hellocompute/.HelloCompute

Bug: 124261647
Test: compared the two apk files built by Make and Soong
Test: run two apks on a Pixel 3a XL (bonito) phone
Test: TreeHugger
Change-Id: I93a536ccedd9abe5ceb99d73d96668f0a861fb51
2021-07-22 16:25:28 -07:00
Hongwei Wang
ede9b8a1e5 Merge "Use FixedAspectRatioImageView to demo auto-enter-pip" into sc-dev am: 0e4d25a19e am: c87def1edb
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/15055021

Change-Id: I8892827e3e9566c57edae397a4ce13c4ef408d57
2021-07-15 00:19:46 +00:00
Hongwei Wang
e60d337804 Merge "Use FixedAspectRatioImageView to demo auto-enter-pip" into sc-dev am: 0e4d25a19e
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/15055021

Change-Id: Idc4f1d75aae9c5e6aeb493c9585c9215cd282d2c
2021-07-15 00:07:30 +00:00
Hongwei Wang
31c5071a72 Use FixedAspectRatioImageView to demo auto-enter-pip
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/bpKcGg1eoOo5Jz5U6IwBYK
Bug: 191310680
Test: manually auto-enter-pip from landscape, see video
Change-Id: I30a728331f0ffa48c537be7b2611dba0b2df053a
2021-07-12 16:07:23 -07:00
Yuntao Xu
0f12207fa2 Merge "Convert Android.mk to Android.bp" 2021-06-23 21:19:46 +00:00
Yuntao Xu
61c260b138 Merge "Convert Android.mk to Android.bp" into sc-dev-plus-aosp am: 7a80636fa6 am: 49fb313b62
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/14637455

Change-Id: I7b34fc06ae4ab62a3f2e2299bb47e407b3013705
2021-06-23 18:49:14 +00:00
Yuntao Xu
7a80636fa6 Merge "Convert Android.mk to Android.bp" into sc-dev-plus-aosp 2021-06-23 18:06:36 +00:00
Wilson Wu
16c483359a Merge "Remove sample multi-client IME" 2021-06-16 06:08:56 +00:00
Yuntao Xu
e6ce052eaa Merge "Convert UiAutomator/Android.mk to Android.bp" am: 34c918d55b am: 68c0d71fb3
Original change: https://android-review.googlesource.com/c/platform/development/+/1715514

Change-Id: I6bc54933df1488e030603a25139953b85ef29e7c
2021-05-26 00:44:58 +00:00
Yuntao Xu
34c918d55b Merge "Convert UiAutomator/Android.mk to Android.bp" 2021-05-26 00:10:23 +00:00
Colin Cross
86786ee8ae Update lint baseline for AutofillKeyboard
An androidx update triggered some NewApi errors.

Bug: 189179560
Test: m out/soong/.intermediates/development/samples/AutofillKeyboard/AutofillKeyboard/android_common/lint/lint-report.html
Change-Id: I219130d6f8ee791566ddeb4542a52225f124500d
2021-05-25 08:11:26 -07:00
Nikita Dubrovsky
0eac02491d Merge "Update ReceiveContentDemo to follow the API docs for URI permissions" into sc-dev 2021-05-22 05:06:06 +00:00
Yuntao Xu
d690d16db5 Convert UiAutomator/Android.mk to Android.bp
Convert the Make file to a Soong one

Bug: 188694412
Test: compared the two jar files built by Make and Soong
Test: TreeHugger
Change-Id: I84b6e1311d0e35d4bce1c86d9c6eff1ce051c7f8
2021-05-20 17:41:05 -07:00
Nikita Dubrovsky
522bfd9e79 Update ReceiveContentDemo to follow the API docs for URI permissions
Bug: 186122267
Test: Manual
Change-Id: I2720a5856222220849502ccc017a9c8c22f23fd4
2021-05-19 22:30:25 -07:00
Yuntao Xu
aba34f50cc Convert Android.mk to Android.bp
1. Convert ApiDemos/Android.mk to ApiDemos/Android.bp;
2. Convert ApiDemos/tests/Android.mk to ApiDemos/tests/Android.bp

Bug: 186778349
Test: compared the apk files built by Make and Soong
Test: TreeHugger
Change-Id: I7b72a998b56804e647d0908be5a118f9bf2cd896
2021-05-18 23:08:25 -07:00
Yuntao Xu
49de3c50b5 Convert Android.mk to Android.bp
1. Convert ApiDemos/Android.mk to ApiDemos/Android.bp;
2. Convert ApiDemos/tests/Android.mk to ApiDemos/tests/Android.bp

Bug: 186778349
Test: compared the apk files built by Make and Soong
Test: TreeHugger
Change-Id: I7b72a998b56804e647d0908be5a118f9bf2cd896
Merged-In: I7b72a998b56804e647d0908be5a118f9bf2cd896
2021-05-14 12:30:19 -07:00
Hongwei Wang
d1cc26450c Fix flicker in ApiDemos when auto enter PiP from landscape
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/cNwi8qI0qukRlaIwutzclD
Bug: 179720719
Test: auto enter PiP from landscape using ApiDemos app, see video
Change-Id: Ic421b3766fbc15bf699885863710a14c3178867f
2021-05-12 19:39:23 -07:00
Wilson Wu
a2c938f437 Remove sample multi-client IME
We have CL[1] to remove the multi-client IME mechanism,
remove the corresponding sample app as well.

[1]: I0bdc8fe3d32ccabc8ea7996fc689543c3f99331a

Bug: 173341412
Test: Build
Change-Id: I355d4309dca1ee712de729921a184f5e40e1730c
2021-05-11 15:57:56 +08:00