Commit Graph

19842 Commits

Author SHA1 Message Date
Hieu Dang
2fb98cdab1 Revert "Remove an unused param from IMMS#showInputMethodPickerFromClient()"
This reverts commit 3efbbb5e49.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=aosp_bramble-userdebug&lkgb=9245415&lkbb=9246274&fkbb=9245423, bug https://buganizer.corp.google.com/issues/256952514

Change-Id: I343828ad83d50436211004753f1b9ba1b13b60ca
Bug: 256952514
2022-11-02 07:19:39 +00:00
Yohei Yukawa
3efbbb5e49 Remove an unused param from IMMS#showInputMethodPickerFromClient()
This is a follow up CL to our previous CL [1], which introduced

  InputMethodManagerService#showInputMethodPickerFromClient(
          @NonNull IInputMethodClient client,
          int auxiliarySubtypeMode, int displayId);

Somehow the "client" has never been used, which is fine because the
actual caller verification is done by requiring WRITE_SECURE_SETTINGS
permission.

Let's remove such an unused parameter for simplicity.

There must be no observable behavior change.

 [1]: Ic7d7c5a7ad8005a3fbd9d1c1b73e3c5a39a07001
      0b05f9e49d

Bug: 234882948
Test: presubmit
Change-Id: I2f27160cbe7d83201c8f52dbb6dcb774a5b8ae43
2022-11-01 13:12:09 -07:00
Yohei Yukawa
cba800ef2f Require TEST_INPUT_METHOD instead in IMM#addVirtualStylusIdForTestSession()
This is a follow up CL to our previous CL [1], which introduced an @TestApi

  InputMethodManager#addVirtualStylusIdForTestSession(),

which internally requires INJECT_EVENTS permission.

Now that TEST_INPUT_METHOD is also available [2], let's require it
instead of INJECT_EVENTS for better consistency with other test APIs
defined in InputMethodManager.

This CL also add @RequiresPermission(TEST_INPUT_METHOD) to

  InputMethodManager#addVirtualStylusIdForTestSession()

to make it clear that it's guarded with the permission.

 [1]: I7399c0a56c04f024d65c16d459818cc2c5cdbc7f
      d96ef57bc4
 [2]: Ie79a3e9d41ce22605ae083594d639c37d08b7def
      b869c78380

Bug: 256239860
Test: atest CtsInputMethodTestCases:StylusHandwritingTest
Change-Id: Icdbb4ade2bd4b5066984e209efcf0ca93bfa08ca
2022-10-28 19:53:46 -07:00
Victor Hsieh
adb0627c62 Merge changes I70a8fc39,I80bbbd88
* changes:
  VerityUtilsTest: add a test case of external signature
  Provide a method to verify a PKCS#7 signature
2022-10-28 22:47:33 +00:00
Yohei Yukawa
f629ddf28b Rename IInputMethodManagerGlobal to InputMethodManagerGlobal
This is a mechanical renaming for classes outside
android.view.inputmethod package.

For non IMF classes, let's expose InputMethodManagerGlobal rather than
IInputMethodManagerGlobal.

In the next CL [1], we want to merge IInputMethodManagerGlobal and
IInputMethodManagerInvoker into a single class, and this CL is just a
preparation.

There must be no observable behavior changes.

 [1]: I310a33f27b876419b6a3058202dcbd663b541079

Bug: 234882948
Test: presubmit
Change-Id: I9b728560369179d5ee17c3570a2543b49b3f14ce
2022-10-26 12:47:56 -07:00
Victor Hsieh
66ec7b279a Provide a method to verify a PKCS#7 signature
There is existing PKCS#7 signature used in the kernel for verifying
fs-verity digest. The purpose of this change is to pave the way to
migrate the existing signature check to userspace (and longer term,
migrate away from PKCS#7).

To mitigate the complexity of PKCS#7, only the configuration we're
currently using is supported.

Bug: 253668864
Test: atest FrameworksCoreTests:com.android.internal.security.VerityUtilsTest
Test: Manually added some code to use the API with correct and incorrect
      signatures. Saw the API behave expectedly.
Change-Id: I80bbbd88881303c0b9a261b1fe59e9682e43bcad
2022-10-26 09:07:35 -07:00
Tiger Huang
2f8c5fe063 Merge changes from topic "requestedVisibleTypes2"
* changes:
  Describe requested visibilities in public types (3/n: server side)
  Describe requested visibilities in public types (2/n: client-server)
  Describe requested visibilities in public types (1/n: client side)
2022-10-26 06:10:04 +00:00
Hai Zhang
a0667ba5f8 Merge "Move binary XML into modules-utils." 2022-10-25 19:04:00 +00:00
Yohei Yukawa
f141979613 Merge "Decouple DisplayImeController and IInputMethodManager" 2022-10-25 18:50:24 +00:00
Riddle Hsu
1178705e53 Merge "Only set locale in config for updating locale" into tm-qpr-dev am: b553c74619 am: ada9d7accb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20235235

Change-Id: I88c62a628a57f8f39bd5d9b849372e0f74e0e430
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-25 14:18:11 +00:00
Riddle Hsu
ada9d7accb Merge "Only set locale in config for updating locale" into tm-qpr-dev am: b553c74619
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20235235

Change-Id: I1cb0b923aa4673e4d04abbf65f143d142cdb0ac5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-25 13:40:11 +00:00
Riddle Hsu
b553c74619 Merge "Only set locale in config for updating locale" into tm-qpr-dev 2022-10-25 13:07:32 +00:00
Hai Zhang
5611f58784 Merge "Move TypedXml{Parser,Serializer} to modules utils package." 2022-10-25 02:44:29 +00:00
TreeHugger Robot
f8a4152cd9 Merge "Extract four byte sequence modified UTF-8 into separate classes." 2022-10-25 00:23:38 +00:00
Riddle Hsu
df86b40c33 Merge "Optimize luminance calculation for rotation animation" 2022-10-24 01:03:38 +00:00
TreeHugger Robot
c4675c024d Merge "Fix labels loading regression" into tm-qpr-dev am: ea523a0c22 am: 2df43628c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20252644

Change-Id: I90e81125fe22af0e1c5ec0dbe1ba97ea7298cef6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-22 13:12:49 +00:00
TreeHugger Robot
2df43628c6 Merge "Fix labels loading regression" into tm-qpr-dev am: ea523a0c22
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20252644

Change-Id: I16b913cd6485caf4aa2001d3ef422e4436a9f27d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-22 12:40:37 +00:00
TreeHugger Robot
ea523a0c22 Merge "Fix labels loading regression" into tm-qpr-dev 2022-10-22 12:11:12 +00:00
Josep del Río
af8e76c75d Merge "Add global microphone mute key for keyboard" am: e85f271021 am: 13e8df2c0a am: 34b40ae557
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2263102

Change-Id: I735e363e875dd6f4a8aca6bb2d01f83322865787
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 21:43:50 +00:00
Josep del Río
34b40ae557 Merge "Add global microphone mute key for keyboard" am: e85f271021 am: 13e8df2c0a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2263102

Change-Id: I31dc6e7e492de91da9def8b0ff33888edfbc0fd6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 21:19:45 +00:00
Josep del Río
13e8df2c0a Merge "Add global microphone mute key for keyboard" am: e85f271021
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2263102

Change-Id: Idf4643df3f011352ae07b1920ba2ded863ab7165
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 20:51:05 +00:00
Fabian Kozynski
c5976b7166 Merge "Proto dump from SystemUI." into tm-qpr-dev am: f50de68685 am: af3547caa4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19789974

Change-Id: I188db1d4b3bb3d179ba0ed029ec1f026f997c505
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 20:12:25 +00:00
Fabian Kozynski
af3547caa4 Merge "Proto dump from SystemUI." into tm-qpr-dev am: f50de68685
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19789974

Change-Id: Id649cad109553285502acd5160799dd86b831d0d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 19:36:58 +00:00
Fabian Kozynski
f50de68685 Merge "Proto dump from SystemUI." into tm-qpr-dev 2022-10-21 19:22:55 +00:00
Sihua Ma
753498698e Merge "Add function to AppWidgetService for updating widget visibility" into tm-qpr-dev am: d776e8d5b3 am: a5186e8243
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20003665

Change-Id: I40681069bbb22b4da1e8e7284ba0441afa7b83b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 18:06:55 +00:00
Sihua Ma
a5186e8243 Merge "Add function to AppWidgetService for updating widget visibility" into tm-qpr-dev am: d776e8d5b3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20003665

Change-Id: Iea5183e4816b06d3ada1098966014423b322fec8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 18:04:37 +00:00
Sihua Ma
d776e8d5b3 Merge "Add function to AppWidgetService for updating widget visibility" into tm-qpr-dev 2022-10-21 17:57:07 +00:00
Andrey Epin
814b4dd00c Fix labels loading regression
DisplayResolveInfo#getDisplayLabel() internally loads the display label
if it is missing and a ResolveInfoPresentationGetter is set for the
instance.
Current view binding logic unconditionally calls getDisplayLabel method
which could trigger label resolution on the main thread and a
consequently scheduled label loading asynchronous task a no-op.

Test: manual functionality testing
Test: introduce artificial into LoadLabelTask, observe labels lading
asynchronously and does not reload when scrolling through a long list
of options.
Test: atest FrameworksCoreTests:ResolverActivityTest
Bug: 245934835

Change-Id: I392d6c8424617820bde58887d92ae99bc39c5b7b
2022-10-21 08:02:37 -07:00
TreeHugger Robot
cac8f25981 Merge "Fixing system language is not in all languages" into tm-qpr-dev am: 686f5b9cb2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20161323

Change-Id: I6c8138d4fb71ebb28ace0a3fffdf02f4b7ecee0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 11:31:59 +00:00
Hai Zhang
f0960b3893 Move binary XML into modules-utils.
Bug: 243194720
Test: presubmit
Change-Id: I5252cf235cedc85aadebbecc078e753b7b54dcdd
2022-10-21 04:28:37 -07:00
Hai Zhang
e55b8eeb28 Move TypedXml{Parser,Serializer} to modules utils package.
A subsequent change will actually move the files to the other git
project.

Bug: 243194720
Test: presubmit
Change-Id: If126bb68f74852528c4da8df79831b49b5129983
2022-10-21 04:28:13 -07:00
Hai Zhang
b90e6818c3 Extract four byte sequence modified UTF-8 into separate classes.
The four byte sequence modified UTF-8 is now handled by classes
prefixed with ART, whereas the base classes implements the standard
modified UTF-8 and should be used by new clients in modules.

Bug: 243194720
Test: atest -rerun-until-failure 10 FastDataTest BinaryXmlTest \
      FrameworksCoreTests:XmlTest FastDataPerfTest
Change-Id: I08cea54c2a27249e00b7e155af0cf11949486375
2022-10-21 04:28:10 -07:00
TreeHugger Robot
686f5b9cb2 Merge "Fixing system language is not in all languages" into tm-qpr-dev 2022-10-21 11:02:16 +00:00
Riddle Hsu
f33d163457 Optimize luminance calculation for rotation animation
- Apply sampling for the border to reduce the amonut of pixel
  for calculating luminance.
- Use getInt to get color rather than get a byte 4 times.
- Use a simpler formula to approximate luminance.
- Replace median with mode to represent the luminance. It is more
  efficient (no need sort) and the visual result may be better if
  the distribution is U-shaped.
- Extract common code to policy package to reduce duplicated
  code in system server and shell.

The calculation is 10 times faster for the first execution,
and 5 times faster on average.

Bug: 253610885
Test: atest RotationAnimationUtilsTest

Change-Id: Ieca9968e843b68d733e178edd725b628c542e872
2022-10-21 18:31:14 +08:00
Sihua Ma
45b60acb7b Add function to AppWidgetService for updating widget visibility
Currently, when the widget host stops listening to the widget updates,
the callback will be set to null and the updates to the widget will be
stashed on the service side. Additionally, the visibility of the widget
will be changed. For an upcoming change to the launcher side, a function
that only changes the visibility should be added.

Test: N/A
Bug: 235358918
Change-Id: I9a0f244ca76b378d9c337e0a364bca5955f5ae96
2022-10-20 20:25:03 +00:00
Fabian Kozynski
afa802a889 Proto dump from SystemUI.
Needs to be called by doing `adb shell dumpsys statusbar --proto`
because using `dumpsys activity service` adds text to the dump.

Will also be dumped as part of the BR

Test: atest SystemUITests
Test: Used in CTS
Test: manual dump and BR
Fixes 237786667

Change-Id: I74abf65a76c059ea9bb5a14728192b6b683b7fc7
2022-10-20 14:25:24 -04:00
TreeHugger Robot
89535d3447 Merge "Add CUJ_RECENTS_SCROLLING" into tm-qpr-dev am: 259321ee9a am: a6138b6392
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20236064

Change-Id: I671493d5872518b1aea5292886a55ab72762e79f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-20 16:55:59 +00:00
TreeHugger Robot
a6138b6392 Merge "Add CUJ_RECENTS_SCROLLING" into tm-qpr-dev am: 259321ee9a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20236064

Change-Id: If00d04c22eb1c58c12beef41b4c7d075d089c814
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-20 16:38:27 +00:00
TreeHugger Robot
259321ee9a Merge "Add CUJ_RECENTS_SCROLLING" into tm-qpr-dev 2022-10-20 16:35:49 +00:00
LiZhihong
95c1165bb8 Add global microphone mute key for keyboard
This change will enable the "mic mute" key on keyboards to globally mute
the microphone using the SensorManager, which has UI implemented in
multiple places (quick shortcuts, privacy center, settings...).

Test: manual
Bug: 237355207
Signed-off-by: LiZhihong <lizh52@lenovo.corp-partner.google.com>
Signed-off-by: DingYong <dingyong2@lenovo.corp-partner.google.com>
Change-Id: I492e501503b0ab9f56e1fa84fcc77a8c798bcb83
2022-10-20 14:59:19 +00:00
Riddle Hsu
03f0f57e6b Only set locale in config for updating locale
To update locale, it doesn't need a full configuration because
system only applied the diff of config from non-undefined fields.

IActivityManager#getConfiguration actually gets the configuration
according to the pid, which is process configuration. And process
configuration can be overridden by the activity running in its
process. So the returned value shouldn't be used to update the
system persistent configuration.

Therefore it is enough to use a new Configuration instance with
setting the necessary fields. This is also more efficient that
saves a binder call to system.

Bug: 253386061
Test: atest LocaleManagerTests
Change-Id: Icdce437fcf1a3bef0562cfc4dd5ad3ba52ea08ef
2022-10-20 14:41:47 +00:00
Yohei Yukawa
b1160b18c7 Merge "Stop using notification for IME switcher" 2022-10-20 14:08:10 +00:00
Sarp Misoglu
ae5ef2ef3a Merge "Add BackupTransport#getBackupManagerMonitor" 2022-10-20 08:58:23 +00:00
TreeHugger Robot
9d747a7909 Merge "Introduce StartInputReason.SCHEDULED_CHECK_FOCUS" 2022-10-19 21:27:45 +00:00
Justin Ghan
316f451fb6 Merge "TextView implementation of select range and delete range gestures" 2022-10-19 20:48:54 +00:00
Yohei Yukawa
90ce33c315 Introduce StartInputReason.SCHEDULED_CHECK_FOCUS
With this CL,

  adb shell dumpsys input_method,

tells us about whether startInputInner() is triggered by

  InputMethodManager.DelegateImpl#onScheduledCheckFocus()

or

  InputMethodManager#checkFocus().

Other than that there must be no observable behavior change.

Bug: 234882948
Test: presubmit
Change-Id: I54ebf1a4e1f749ce265756908ef52fc63f1218e5
2022-10-19 11:34:31 -07:00
Yohei Yukawa
e23a4c1328 Stop using notification for IME switcher
InputMethodManagerService has had logic to show notifications when the
IME switcher icon cannot be shown on NavigationBar[1][2][3][4][5].

With this CL, such a fallback behavior is completely removed.  Devices
and form-factors that need a special handling need to come up with
their own solution rather than relying on this historical notification
mechanism.

 [1]: I2b9e955003c1f6703978824c947d5f322a039714
      7cfc0ed21a
 [2]: Id36c8c34159bea8b72557b40bcf024d401f580b6
      01065a5719
 [3]: I34a95732ef3e7c20d6549b57230c11f0c3db04d6
      d4b625994f
 [4]: I58421143bee25be459f4f744688b37614a750051
      f62c0b837a
 [5]: I6ad818fc9ef08991e24c5020498243f1fc417998
      24ab9e18a7

Bug: 245989733
Test: atest CtsPermission2TestCases:ProtectedBroadcastsTest
Test: presubmit
Change-Id: I3b09d2b05ba9bde686b360b9f720b5d4258551c3
2022-10-19 09:37:38 -07:00
Nicolo' Mazzucato
c75bae06cc Add CUJ_RECENTS_SCROLLING
This adds Jank instrumentation every time recent tasks are scrolled.

Bug: 231130484
Bug: 228969045
Test: recorded prefetto trace while scrolling
Change-Id: I48201e73d7025ec2ff38c7f9158eec27ed9cbafa
2022-10-19 14:25:11 +00:00
Sarp Misoglu
f7fbe355ed Add BackupTransport#getBackupManagerMonitor
This allows the framework to ask for a monitor to use for backups that
are initiated by the framework (i.e. scheduled backups). Previously
the only way to pass a monitor in was through the
BackupManager#requestBackup API.

I also moved BackupManagerMonitorWrapper to a separate class now that
it's shared by three different classes.

Bug: 252763821
Test: atest CtsBackupHostTestCases
  Also manually by implementing a simple monitor inside LocalTransport
  and calling the new getBackupManagerMonitor.
Change-Id: I84d56a3e80d6c94f9a327f7d71876d1bc27fe5ac
2022-10-19 13:26:03 +00:00
Nicolas Geoffray
5260ad78ee Merge "Cleanup and consistency around system server profiling." am: 6cbc807a6f am: e60487c7b6 am: 40b18ebda4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2251513

Change-Id: I1c7e329acf9d7e3d0443150e937fa9c58e001343
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-19 07:55:23 +00:00