Commit Graph

19949 Commits

Author SHA1 Message Date
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
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
Nicolas Geoffray
40b18ebda4 Merge "Cleanup and consistency around system server profiling." am: 6cbc807a6f am: e60487c7b6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2251513

Change-Id: I7bf89839c1f053bf78db23ac49b59ca828fb7fb8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-19 07:49:15 +00:00
Justin Ghan
1ce033402e TextView implementation of select range and delete range gestures
Bug: 247570808
Test: atest android.widget.cts.TextViewHandwritingGestureTest
Change-Id: I2cfd579c1dd213fa1847f302b56d22bda0c96f19
2022-10-19 00:32:21 -07:00
Nicolas Geoffray
e60487c7b6 Merge "Cleanup and consistency around system server profiling." am: 6cbc807a6f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2251513

Change-Id: I24ab6f204063e46a7c08023fac0fd0583de3dc91
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-19 07:18:49 +00:00
Nicolas Geoffray
6cbc807a6f Merge "Cleanup and consistency around system server profiling." 2022-10-19 06:39:04 +00:00
Joanne Chung
a94f5bbcbc Merge "Dump App exit reason if the remote service died." 2022-10-19 04:40:19 +00:00
Calvin Pan
80d389495c Merge "Fixing system language is not in all languages" 2022-10-19 03:46:49 +00:00
Michael Wachenschwanz
d6a834dddc Merge "Rate limit BatteryStats' ModemActivityInfo querying" into tm-qpr-dev am: c3ea7bd98c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20227643

Change-Id: Ia513d7975da9a105d367afc778043e0a921b3126
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-18 23:46:27 +00:00
Michael Wachenschwanz
c3ea7bd98c Merge "Rate limit BatteryStats' ModemActivityInfo querying" into tm-qpr-dev 2022-10-18 23:21:53 +00:00
Michael Wachenschwanz
9c841db321 Rate limit BatteryStats' ModemActivityInfo querying
Frequent mobile radio power state changes results in frequent
ModemActivityInfo queries. To limit the unnecessary churn, a Modem
update due to mobile radio power state change will only occur some
amount of time after the previous update. Modem updates due to other
signals (plug/unplug events, battery percent change, etc) will be
unaffected.

Fixes: 239715259
Test: atest BatteryStatsNoteTest
Merged-In: Ie0af28dbc2ad4836ef6437c0656dc20eec2285ea
Change-Id: Ib3ee18113ac381b8912bb58974b5d41ceefb7131
2022-10-18 13:49:35 -07:00
TreeHugger Robot
e806917442 Merge "Introduce IInputMethodManagerGlobal" 2022-10-18 17:11:05 +00:00
Ruslan Tkhakokhov
657489474d Merge "Add B&R OWNERS to internal/backup" am: c17fd7ca9e am: 6b7e9ae939 am: b0233fc231
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2259601

Change-Id: Id108b164f4bd6d11faa6e103dc52a2b2343cf936
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-18 15:19:22 +00:00
Ruslan Tkhakokhov
b0233fc231 Merge "Add B&R OWNERS to internal/backup" am: c17fd7ca9e am: 6b7e9ae939
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2259601

Change-Id: Ifb447f28685beed92fa68ee12de75474d498bc1c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-18 14:57:20 +00:00
Ruslan Tkhakokhov
6b7e9ae939 Merge "Add B&R OWNERS to internal/backup" am: c17fd7ca9e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2259601

Change-Id: If47e4091b2e855a9a1ae7814ee2e2d48f9f082c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-18 14:29:50 +00:00
Nicolas Geoffray
1c2e7ed14c Cleanup and consistency around system server profiling.
The profiling currently works by accident: only because we profile the
boot classpath which executes in JIT zygote do we not load system server
AOT artifacts.

So make the not loading AOT artifacts in system server explicit when the
system server is being profild.

Test: system server profiling
Change-Id: I8d787c8f8524d9d6074dc0f552a856640f11cef0
2022-10-18 12:38:33 +00:00
Ruslan Tkhakokhov
bcc956623e Add B&R OWNERS to internal/backup
Bug: 254231632
Change-Id: If8e0d5c2ef7bed5e6acd05a0301b2d7f373412c3
Test: n/a
2022-10-18 12:36:58 +00:00
Riddle Hsu
4c4a9a77c5 Remove PooledConsumer
Those methods are not used anymore. And the regular lambda is
already good in performance.

Bug: 120160274
Test: atest LambdaPerfTest
Change-Id: Id3d736da726d003ce9b57ff72193d33e244b6b30
2022-10-18 12:30:20 +00:00
Islam Elbanna
c91429e80e Merge "Allow profiling for standalone system server jars." am: bda789c641 am: 8ac01a2856 am: bde4635f43
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2257205

Change-Id: Ibdfb3d01617dc049897755e8f62cc06b89e6ab14
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-18 10:48:07 +00:00
Islam Elbanna
bde4635f43 Merge "Allow profiling for standalone system server jars." am: bda789c641 am: 8ac01a2856
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2257205

Change-Id: I2010d63fae74c06a24cad3d1959892249a798298
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-18 10:15:08 +00:00
Islam Elbanna
8ac01a2856 Merge "Allow profiling for standalone system server jars." am: bda789c641
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2257205

Change-Id: I28c7e16af0795ccd25850cc07beb7057af24cdd4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-18 09:46:50 +00:00
Calvin Pan
fe7b9a7e0c Fixing system language is not in all languages
- Seperate System language and app language logic to different
  controller

- Fixing system langauge only show in suggested langage and not show in
  all languages.

Bug: 228596568
Test: set system/app languages
Change-Id: I3b7ab0a78a77a71794dfd4a59c807637fb7b912d
2022-10-18 17:14:26 +08:00
TreeHugger Robot
90aa94625b Merge "Merge WINDOW_FOCUS_GAIN_REPORT_WITH{,OUT}_CONNECTION again" 2022-10-18 04:45:37 +00:00
Tom Hsu
0f5526c366 Merge "Hanlde NPE when context from default phone is null." 2022-10-18 02:06:49 +00:00
Shan Huang
a7027095ff Merge "Add AndroidX SpringAnimation library to core." into tm-qpr-dev am: a24bed9f38 am: bcb5bd5c00
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20171590

Change-Id: Ia65f28796447db9234079963b79248096fdf820b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-18 01:43:27 +00:00
Shan Huang
bcb5bd5c00 Merge "Add AndroidX SpringAnimation library to core." into tm-qpr-dev am: a24bed9f38
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20171590

Change-Id: I40d68291f995c5db5adda9e3ed6d7b8fa3ea6840
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-18 01:15:44 +00:00
Shan Huang
a24bed9f38 Merge "Add AndroidX SpringAnimation library to core." into tm-qpr-dev 2022-10-18 01:06:42 +00:00
Yohei Yukawa
62f93a5cf9 Merge WINDOW_FOCUS_GAIN_REPORT_WITH{,OUT}_CONNECTION again
This is the 5th CL after our CLs [1][2][3][4] for IME visibility
issues.

While the last CL [4] logically reverted most of changes made in
previous CLs [1][2][3], there remain some unintentional changes around
WINDOW_FOCUS_GAIN*.  The biggest issue is the invocation of

  IMM#mServedInputConnectionWrapper.isActive(),

from startInputOnWindowFocusGain() added in the 3rd CL [3].  This is
really problematic because it internally

  IMM#checkFocus(),

which is not intended to be called from startInputOnWindowFocusGain().

This CL addresses that problem by effectively removing the call path.

App compat risk is supposed to be low because IMM#checkFocus() was not
called before the 3rd CL [3], which was introduced in Android R.

There are CTS tests to verify that related issues are not regressed
again [5][6][7].

 [1]: I45a9814d812ad906f417c24200fd4219959e2423
      6ecbf08772
 [2]: I2da99ae67b9ce4051dec0c0f0e975ebe6e1ab118
      48bfc3165c
 [3]: I1ef3d341af9d473d94d52fd1890deafbae2bc9e1
      d43b75cf0e
 [4]: I022ad658844142ff4a4cf3b91953013f2bfbb58a
      a24622cfcd
 [5]: Ie029c109e257be81a1ad6327a706bb6bc1e8316c
      3045df602f061a185f6fff18e81f5af1a2c51270
 [6]: Id48eedc1a2d5597bbba5f1d3fc01540e2f6de4c5
      3ed79ab2de600bce312b4ce59b319da0ad9a8dac
 [7]: I022ad658844142ff4a4cf3b91953013f2bfbb58a
      a24622cfcd

Bug: 152373385
Bug: 155781821
Bug: 160391516
Bug: 161273049
Bug: 182259171
Test: presubmit
Change-Id: I64412e87c4881018ea67140f9472e10ea41836e4
2022-10-17 17:02:49 -07:00
Shan Huang
80c44686c2 Add AndroidX SpringAnimation library to core.
This allows core libraries (such as predictive back progress animation)
to use spring animation.

Files in androidx/dynamicanimation/animation that are not copied over:

FlingAnimation.java - Unused atm
AnimationHandler.java - Replaced with the framework AnimationHandler
FloatPropertyCompat.java - Replaced with FloatProperty
FrameCallbackScheduler.java - Unused in framework AnimationHandler

Test: m -j
Bug: 238475284
Change-Id: Ifdf847da0aa2a6cf57e18f9ac7c91bb0fe3b12c2
2022-10-17 20:45:41 +00:00
TreeHugger Robot
b4778452fb Merge "Simplify FINISH_INPUT_NO_FALLBACK_CONNECTION handling" 2022-10-17 18:24:24 +00:00
João Victor Mendes Freire
681296016a Merge "Fix creating multiple users from same alert dialog" 2022-10-17 17:16:18 +00:00
Islam Elbanna
1ed9d64bcd Allow profiling for standalone system server jars.
Currently we profile only main system server classpath, this is to allow
profiling for the standalone system server jars.

Bug: 241823638
Test: System server profiling: verified the profile snapshot of the boot image profile, and it showed the new jars profiling data.
Change-Id: I5b10373fb22ddfecdb95b6a4611f4af97bb5666d
2022-10-17 17:09:45 +00:00
tom hsu
4c8fd97334 Hanlde NPE when context from default phone is null.
Bug: 253630907
Test: Maunal test
Test: atest pass
Change-Id: I577a78d70428e8f438e02115586e5de49d415019
2022-10-17 08:22:17 +00:00
Yohei Yukawa
3ca950724c Simplify FINISH_INPUT_NO_FALLBACK_CONNECTION handling
This is the 6th CL for Bug 26851566 [1][2][3][4][5].

In the CLs [3][5], the approach we took was to extend an existing IPC
method

  IInputMethodClient#setActive(boolean active, boolean fullscreen)

by adding one more parameter "reportToImeController".

However, it seems that such an approach made its handling code hard to
maintain, because the IPC method needed to behave in a completely
different manner depending on the newly introduced parameter.

To avoid such a confusion and to make subsequent refactoring easier,
this CL introduces a new IPC method

  IInputMethodClient#setInteractive(
          boolean interactive, boolean fullscreen)

to clarify what we are actually doing.

In most cases there must be no observable behavior change.  One
possible behavior change is when setInteractive() gets called when
IMM#mCurRootView.getView() is not available.  In the previous CL, we
fell back to previous behavior as if
FINISH_INPUT_NO_FALLBACK_CONNECTION was not defined.  However it looks
like such a fallback mechanism is not an intentional behavior.

The main use case is still verified with existing CTS tests [6][7].

 [1]: Ic11956fe745a829da1ec7c09ea214e9b3961c8e0
      0df8812486
 [2]: If06daf71160aa44a4254ac125561974ecbdef4f2
      2c6e80be12
 [3]: I8a657e75e274d842fb46b60375f6aeafeab96a59
      152eacec4f
 [4]: I16f4a34360a2f64b69978724648a9be741f140b5
      3d62f739a8
 [5]: Id4e71a822bfde5fe6a263bbe094c0d238017efe1
      3d62f739a8
 [6]: Iba0332ed3b767a9a15768b64947b9cde31105af1
      e2f4138156c784746becde6a01c19f0c3de6ac32
 [7]: I346ef42f2546a2925bf44ca7719ae19399e15e78
      84c5ec2f81d4be5285b9c5f1d0e943f808e9158c

Bug: 26851566
Bug: 156215187
Test: atest InputMethodStartInputLifecycleTest
Change-Id: I0c95d7e70357ac98b336cd1b51a7405ba92a9a6f
2022-10-15 14:54:34 -07:00
Winson Chiu
b41437f51f Merge "Move SystemConfig to services.jar" 2022-10-14 20:06:56 +00:00
Yohei Yukawa
7f0c721fc7 Introduce IInputMethodManagerGlobal
In reality methods defined in IInputMethodManager are no more or less
than a set of global methods, because you can write the following
logic anywhere.

  var service = IInputMethodManager.Stub.asInterface(
          ServiceManager.getService(Context.INPUT_METHOD_SERVICE));
  if (service != null) {
      try {
          service.doSomething();
      } catch (RemoteException e) {
          e.rethrowFromSystemServer();
      }
  }

With above observation, this CL introduces IInputMethodManagerGlobal
as a collection of static methods that invoke methods defined in
IInputMethodManager so that other framework classes do not need to
write the same piece of code.

  public final class IInputMethodManagerGlobal {

      public static void doSomething() {
          final var service = getService();
          if (service != null) {
              try {
                  service.doSomething();
              } catch (RemoteException e) {
                  e.rethrowFromSystemServer();
              }
          }
      }

      ......

  }

This CL then simplifies ImeTracing to demonstrate how
IInputMethodManagerGlobal can be used.

Basically this is a mechanical refactoring.  There should be no
observable behavior change.

Bug: 234882948
Test: presubmit
Change-Id: I5412eb1d44e3d515ca955f00a2e777b659a15b14
2022-10-14 07:41:42 -07:00
João Victor Mendes Freire
2ded76c29f Fix creating multiple users from same alert dialog
Disable the button listeners after the first click to
avoid the creation of more than one user per dialog.

Bug: 252831574
Test: Manually tested by calling the API from a regular app
Change-Id: I6d343ae0a2a4d81d35a85f51a60c88c0c18dba21
2022-10-14 12:05:51 +00:00
Andrey Epin
b58a452b31 Merge "Load direct-share icons asynchronously" into tm-qpr-dev am: 087c3d1918 am: 03b221874b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19920873

Change-Id: Icefe32e65e2fb88660ffa3ebcb432313b90d9db0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-13 21:58:16 +00:00
Andrey Epin
03b221874b Merge "Load direct-share icons asynchronously" into tm-qpr-dev am: 087c3d1918
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19920873

Change-Id: I0c5ca0aa635f8cfe51a16082187cf2476e6c3f47
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-13 21:25:39 +00:00
Andrey Epin
087c3d1918 Merge "Load direct-share icons asynchronously" into tm-qpr-dev 2022-10-13 20:50:28 +00:00