Commit Graph

31 Commits

Author SHA1 Message Date
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
Bob Badour
f7cf305656 [LSC] Add LOCAL_LICENSE_KINDS to development
Added SPDX-license-identifier-Apache-2.0 to:
  apps/BluetoothDebug/Android.bp
  apps/BuildWidget/Android.bp
  apps/CustomLocale/Android.bp
  apps/DevelopmentSettings/Android.bp
  apps/Fallback/Android.bp
  apps/GestureBuilder/Android.bp
  apps/NinePatchLab/Android.bp
  apps/OBJViewer/Android.bp
  apps/PushApiAuthenticator/Android.bp
  apps/PushApiTestAppOne/Android.bp
  apps/PushApiTestAppTwo/Android.bp
  apps/SdkSetup/Android.bp
  apps/SettingInjectorSample/Android.bp
  apps/WidgetPreview/Android.bp
  apps/launchperf/Android.bp
  cmds/monkey/Android.mk
  gsi/gsi_util/Android.bp
  gsi/repack_super_image/Android.bp
  host/windows/Android.bp
  python-packages/Android.bp
  samples/AccelerometerPlay/Android.bp
  samples/AdaptiveIconSample/Android.bp
  samples/AliasActivity/Android.bp
  samples/AndroidBeamDemo/Android.bp
  samples/AppNavigation/Android.bp
  samples/AutofillKeyboard/Android.bp
  samples/BackupRestore/Android.bp
  samples/BasicGLSurfaceView/Android.bp
  samples/BluetoothChat/Android.bp
  samples/BrokenKeyDerivation/Android.bp
  samples/BrokenKeyDerivation/tests/Android.bp
  samples/BusinessCard/Android.bp
  samples/Compass/Android.bp
  samples/ContactManager/Android.bp
  samples/CubeLiveWallpaper/Android.bp
  samples/DataWiper/Android.bp
  samples/DeviceAdminWhitelistedAccount/Android.bp
  samples/FixedGridLayout/Android.bp
  samples/HeavyWeight/Android.bp
  samples/HelloActivity/Android.bp
  samples/HelloActivity/tests/Android.bp
  samples/HelloEffects/Android.bp
  samples/Home/Android.bp
  samples/HoneycombGallery/Android.bp
  samples/InlineFillService/Android.bp
  samples/JetBoy/Android.bp
  samples/LceDemo/Android.bp
  samples/LunarLander/Android.bp
  samples/LunarLander/tests/Android.bp
  samples/MultiResolution/Android.bp
  samples/MultiWindow/Android.bp
  samples/MySampleRss/Android.bp
  samples/NotePad/Android.bp
  samples/Obb/Android.bp
  samples/RSSReader/Android.bp
  samples/ReceiveShareDemo/Android.bp
  samples/SampleSyncAdapter/Android.bp
  samples/SimpleJNI/Android.bp
  samples/SimpleJNI/jni/Android.bp
  samples/SipDemo/Android.bp
  samples/SkeletonApp/Android.bp
  samples/SkeletonApp/tests/Android.bp
  samples/Snake/Android.bp
  samples/Snake/tests/Android.bp
  samples/SoftKeyboard/Android.bp
  samples/SpellChecker/HelloSpellChecker/Android.bp
  samples/SpellChecker/SampleSpellCheckerService/Android.bp
  samples/StackWidget/Android.bp
  samples/ThemedNavBarKeyboard/Android.bp
  samples/ToyVpn/Android.bp
  samples/TtsEngine/Android.bp
  samples/USB/AdbTest/Android.bp
  samples/USB/MissileLauncher/Android.bp
  samples/UiAutomator/Android.mk
  samples/Vault/Android.bp
  samples/Vault/tests/Android.bp
  samples/VoiceRecognitionService/Android.bp
  samples/VoicemailProviderDemo/Android.bp
  samples/WeatherListWidget/Android.bp
  samples/WiFiDirectDemo/Android.bp
  samples/WiFiDirectServiceDiscovery/Android.bp
  samples/Wiktionary/Android.bp
  samples/WiktionarySimple/Android.bp
  samples/XmlAdapters/Android.bp
  samples/apkcachetest/Android.bp
  samples/training/NsdChat/Android.bp
  scripts/Android.bp
  testrunner/Android.mk
  testrunner/tests/Android_native.mk
  tools/apkcheck/Android.bp
  tools/bugreport/Android.bp
  tools/etc1tool/Android.bp
  tools/idegen/Android.bp
  tools/mkstubs/Android.bp
  tools/rmtypedefs/Android.bp
  vndk/Android.bp
  vndk/tools/Android.bp
  vndk/tools/elfcheck/Android.bp
  vndk/tools/header-checker/Android.bp
  vndk/tools/header-checker/src/repr/protobuf/proto/Android.bp
  vndk/tools/header-checker/tests/integration/ifunc/Android.bp
  vndk/tools/header-checker/tests/integration/version_script_example/Android.bp
  vndk/tools/image-diff-tool/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-CPL-1.0 SPDX-license-identifier-MIT
    SPDX-license-identifier-Unicode-DFS SPDX-license-identifier-W3C
    legacy_restricted legacy_unencumbered
to:
  Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-CPL-1.0
to:
  samples/SearchableDictionary/Android.bp

Added SPDX-license-identifier-Apache-2.0 legacy_unencumbered
to:
  tools/Android.bp

Added SPDX-license-identifier-BSD SPDX-license-identifier-CPL-1.0
    SPDX-license-identifier-MIT SPDX-license-identifier-Unicode-DFS
    SPDX-license-identifier-W3C
to:
  sdk/Android.bp

Added legacy_restricted
to:
  samples/KeyChainDemo/Android.bp
  tools/line_endings/Android.bp
  vndk/tools/definition-tool/datasets/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I9847e00fb4278bc083b4debbc751003c995ea45c
2021-02-12 17:13:45 -08:00
lumark
13a549168e Create display context when switching IME to new display
To address IME service context's Resources / DisplayMetrics update
when switching IME window to another display after onConfigurationChange.

We use Context#createDisplayContext to create display specific context when
display changed, to ensure soft keyboard can re-layout with correct resources.

Bug: 126930163
Test: manual with SoftKeyboard as below steps:
     1) Settings > Developer options > enable "Simulated Display" & "Force desktop mode".
     2) Reboot device
     3) Launch app (i.e. Contacts) with bluetooth or usb mouse in Simulated display.
     4) Tap EditText on app to see see if IME window layout correctly on simulated display.
     5) Launch app (i.e Files) on primary display.
     6) Tap EditText on app to see if IME window layout correctly on primary display.

Change-Id: Ic592a1d2fb2da149220c8b503b522b3e864bcc77
Merged-In: Ic592a1d2fb2da149220c8b503b522b3e864bcc77
2019-09-11 02:04:44 +00:00
Sasha Smundak
bef01b9173 Convert Android.mk files to Android.bp
See build/soong/README.md for more information.

Bug: 122332515
Test: treehugger
Change-Id: I0f6ae8d880114d1bc83f7aac2b96eafef76dc046
2019-06-25 14:18:16 -07:00
Bo Hu
44de50be48 Merge "Revert "Emulator: enable predexopt for some sample apps"" into nyc-dev am: 4b0fd87660
am: 861f784752

* commit '861f784752c631e123b7dc6c0ec18bf1f8dab003':
  Revert "Emulator: enable predexopt for some sample apps"

Change-Id: I6fb0ba84480c19d0b982649829aa478c7fad3217
2016-05-02 17:39:35 +00:00
Bo Hu
14e8cd50f2 Revert "Emulator: enable predexopt for some sample apps"
because it breaks jank tests.
revert first


This reverts commit 59581fb6d4.

Change-Id: Ic4b07b28edd387826fc58df86b02bbab460c9074
2016-05-02 17:16:53 +00:00
Bo Hu
b33917dc92 Merge "Emulator: enable predexopt for some sample apps" into nyc-dev am: 4840343
am: 01297a1

* commit '01297a10f4b715230f02fc4a362bb4b741a1bdd4':
  Emulator: enable predexopt for some sample apps

Change-Id: I4d4cdab552915a232fd637db81340289ff2875d1
2016-04-28 00:33:44 +00:00
bohu
59581fb6d4 Emulator: enable predexopt for some sample apps
Some sample apps on emulator are placed on /data
partition and are not pre-dexopted.
Enable them to make the emulator system image a
little faster, especially for arm.
bug: 28312444

This should only impact SDK system images, not
real devices.

Change-Id: Icdb34512a3a6d95b4d6ffd2415835c6ba8c77fcc
2016-04-26 12:46:13 -07:00
Christopher Ferris
0e2da18081 Fix up the makefiles and some samples.
Add LOCAL_DEX_PREOPT := false to force the samples to build actual apks.

In addition, fix a couple of other small issues:

- TtsEngine didn't have the api level set properly.
- SimpleJNI used a non-ndk library and was using libc++.

Change-Id: I1fd7c187956eed4620049bb746f4d62babcd648a
2016-04-19 14:32:13 -07:00
Tadashi G. Takaoka
8359ac20a5 Fix sample SoftKeyboard preference activity
Bug: 17887760
Change-Id: Ibe7d1f2b9189ecee7867a2448790eddb151bd61a
2014-10-07 09:52:18 +09:00
Yohei Yukawa
88838a30af Make sample IME aware of language switching
This CL demonstrates how the new language switching functionality
should work by using the SoftKeyboard sample.

BUG: 15267645
Change-Id: I18ab25a0784979fe6028b97a22ff02bfd502d506
2014-06-02 13:00:33 +09:00
Tadashi G. Takaoka
ec1f72d17d Update SoftKeyboard sample to use InputMethodSubtype
Bug: 5475117
Change-Id: I94c70800e272e28c080edd5102adceabf06d7aff
2011-10-19 19:25:50 +09:00
Romain Guy
74192eafec Deprecate fill_parent and introduce match_parent.
Bug: #2361749.
2010-01-08 15:11:18 -08:00
Daniel Sandler
75ab82e25f hdpi artwork for development/{apps,samples}.
(drop dated 29-Sep-2009)

Change-Id: Ie022d478ed4eafc641e475dad94f507a6c358595
2009-09-29 20:41:24 -04:00
Scott Main
50992e805e docs only.
add a homepage for the searchable dictionary sample app.
and make all urls relative
2009-08-31 15:22:28 -07:00
Scott Main
04680858a0 docs only.
Add new web pages for sample apps included in the SDK.
Revise the existing sample app web pages.
Delete screenshots for notepad and lunar lander (these have
moved into frameworks/base/docs/html/guide/samples/image/.
2009-08-24 15:27:00 -07:00
The Android Open Source Project
6ffae015b4 auto import from //branches/cupcake_rel/...@140373 2009-03-18 17:39:43 -07:00
The Android Open Source Project
692ab02175 auto import from //branches/cupcake/...@137197 2009-03-09 11:52:11 -07:00
The Android Open Source Project
edd86fdaa9 auto import from //depot/cupcake/@136594 2009-03-05 14:34:30 -08:00
The Android Open Source Project
52d4c30ca5 auto import from //depot/cupcake/@135843 2009-03-03 19:29:09 -08:00
The Android Open Source Project
d4aee0c0ca auto import from //depot/cupcake/@135843 2009-03-03 18:28:16 -08:00
The Android Open Source Project
d2f2b1d7b7 auto import from //depot/cupcake/@132589 2009-03-03 14:03:58 -08:00
The Android Open Source Project
b8747bc7b1 auto import from //depot/cupcake/@137055 2009-03-02 22:54:20 -08:00
The Android Open Source Project
ff4b5f241f auto import from //branches/cupcake/...@132276 2009-02-19 10:57:29 -08:00
The Android Open Source Project
87a88c4f03 auto import from //branches/cupcake/...@131421 2009-02-13 12:57:48 -08:00
The Android Open Source Project
e3c5766074 auto import from //branches/cupcake/...@130745 2009-02-10 15:43:58 -08:00
The Android Open Source Project
5a4d0fa291 auto import from //branches/cupcake/...@127436 2009-01-22 00:13:40 -08:00
The Android Open Source Project
7b53e39377 auto import from //branches/cupcake/...@127101 2009-01-20 14:03:55 -08:00
The Android Open Source Project
b8d704a517 auto import from //branches/cupcake/...@126645 2009-01-15 16:12:07 -08:00
The Android Open Source Project
95cf464c5a auto import from //branches/cupcake/...@125939 2009-01-09 17:51:19 -08:00
The Android Open Source Project
e943f2fd8e Code drop from //branches/cupcake/...@124589 2008-12-17 18:04:04 -08:00