Commit Graph

17233 Commits

Author SHA1 Message Date
Jeff DeCew
4e9a31b73c Merge "Use SRC_ATOP instead of SRC_IN for blending the NotificationExpandButton" into sc-dev am: d14c60be51 am: 1dfc1b579b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15237912

Change-Id: I669a3703f71320fde265c1a4bbc6314d74693830
2021-07-12 20:18:26 +00:00
Jeff DeCew
d14c60be51 Merge "Use SRC_ATOP instead of SRC_IN for blending the NotificationExpandButton" into sc-dev 2021-07-12 19:48:58 +00:00
Ahaan Ugale
878ceb38cd Merge "Check/note ops when delivering HotwordDetectedResult" into sc-dev am: e360fc69a7 am: 19c940f607
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15241921

Change-Id: I8d9e9d472412c113c349e6ba630949f1fd11abe3
2021-07-12 18:10:18 +00:00
Ahaan Ugale
e360fc69a7 Merge "Check/note ops when delivering HotwordDetectedResult" into sc-dev 2021-07-12 17:46:28 +00:00
Ahaan Ugale
c5e855a9d9 Check/note ops when delivering HotwordDetectedResult
This is partially a followup of
I80dabaf6ae0e781028dde16ead3321fbff319542 which removed these operations
from the SoundTrigger layer when the HotwordDetectionService is used.

Also fixes a race condition where the DSP event can go directly to the
Interactor if the DetectionService isn't connected.

Bug: 186164881
Test: atest HotwordDetectionServiceBasicTest
Test: manual - DSP and non-DSP
Change-Id: Iee3b00c6c08597ad1993fae677e9f8ae2f60744c
2021-07-12 17:42:24 +00:00
Jeff DeCew
8d6f3cc158 Use SRC_ATOP instead of SRC_IN for blending the NotificationExpandButton
Bug: 191969252
Bug: 193157438
Test: check for number of layers in the scene
Change-Id: I65bd80c71b55582347da1559cf707e9d023b7f13
2021-07-09 15:40:31 -04:00
Yohei Yukawa
20f32bd8e9 Move EditableInputConnection into com.android.internal.inputmethod
EditableInputConnection has been one of the most important and widely
used InputConnection implementations.  While having it under

  com.android.internal.widget

would still make some sense, it'd become more easier for the IMF team
to keep improveing it if EditableInputConnection is moved into

  com.android.internal.inputmethod

Anyway, EditableInputConnection has never been a public API hence just
moving its package should have no impact on app compatibility.

Bug: 192412909
Test: atest CtsInputMethodTestCases CtsWidgetTestCases:TextViewTest
Change-Id: I87974f779dbda60dfb79331cbe1ec975c475c695
2021-07-09 09:46:18 -07:00
Mark Renouf
993bf32cdd Merge "Quiet down long screenshots logcat output" into sc-dev am: a7af7f8346 am: 8ef5ca3d45
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15236057

Change-Id: I9dbbcdda155cfcbc07c0cb5854a78e28f8c5c13a
2021-07-09 15:59:59 +00:00
TreeHugger Robot
107825105c Merge "Remove @UnsupportedAppUsage from EditableInputConnection" 2021-07-09 06:58:06 +00:00
Yohei Yukawa
7bfd2facc1 Remove @UnsupportedAppUsage from EditableInputConnection
As described in the previous CL [1], there are alternatives for app
deverlopers who somehow had to directly rely on
EditableInputConnection.

 [1]: I0c879645a84fde14dd6444bb4735f543457e43a8

Fix: 192969370
Test: atest CtsInputMethodTestCases
Change-Id: I6b60f52dfea99c262fddbc5f3d87d6f0967ae8e7
2021-07-09 05:44:53 +00:00
Mark Renouf
84f80d152d Quiet down long screenshots logcat output
With this change, a long screen shot flow generates only
the following log entries:

D Screenshot: ScrollCapture: connected to window [com.example/.ExampleActivity]
D Screenshot: onCaptureStarted
D Screenshot: end()
I Screenshot: Completed: LongScreenshot{w=1080, h=5339}

Tags covered:

LongScreenshotActivity
Screenshot
ScrollCaptureConnection
ScrollCaptureInternal
ScrollCaptureViewSupport
ScrollCaptureController
ViewRenderer

Bug: 190399332
Test: observe logcat during long screenshot
Change-Id: Ia2b018224897ad1ca153967ff9f60340a64f4815
2021-07-09 01:25:50 +00:00
TreeHugger Robot
2f446c57fb Merge "Added Ble scan APIs to BatteryStatsManager" 2021-07-08 18:43:28 +00:00
TreeHugger Robot
48f66dba2e Merge "Clarify EditableInputConnection has a public alternative" 2021-07-08 14:58:37 +00:00
Etienne Ruffieux
f771dac97b Added Ble scan APIs to BatteryStatsManager
Added missing service functions to manager to prevent directly
calling BatteryStatsService from Bluetooth package. Updated
system-current.txt accordingly.

Tag: #feature
Bug: 190442794
Test: Manual
Change-Id: Ie6c6d3688d2da45956d57ea1dbc2cc4430f27783
2021-07-08 08:56:34 +00:00
TreeHugger Robot
a743deb5f9 Merge "Rename InputConnectionWrapper to RemoteInputConnection" 2021-07-07 19:51:59 +00:00
Yohei Yukawa
e6cd60da19 Clarify EditableInputConnection has a public alternative
This is a preparation to remove @UnsupportedAppUsage from the
constructor of a hidden class EditableInputConnection.

In most of cases, app developers should be using

  android.view.inputmethod.InputConnectionWrapper

to intercept InputConnection API calls before they are delivered to
EditText as follows.

  final EditText editText = new EditText(activity) {
    @Override
    public InputConnection onCreateInputConnection(
        EditorInfo editorInfo) {
      return new InputConnectionWrapper(
          super.onCreateInputConnection(editorInfo), false) {
        /**
         * {@inheritDoc}
         */
        @Override
        public boolean commitText(
            CharSequence text, int newCursorPosition) {
          // do something
          return super.commitText(text, newCursorPosition);
        }
      };
    }
  };

You can also re-implement BaseInputConnection without hidden APIs
since Android 9.  See CLs that are associated with Bug 24688781 for
details.

This CL makes this fact clear for app developers by using
"publicAlternatives" field in @UnsupportedAppUsage.

Bug: 192969370
Test: presubmit
Change-Id: I0c879645a84fde14dd6444bb4735f543457e43a8
2021-07-07 09:03:53 -07:00
Yohei Yukawa
8426bd7d02 Rename InputConnectionWrapper to RemoteInputConnection
This is a purely mechanical refactoring with no behavior change.

An existing non-API class

  com.android.internal.view.InputConnectionWrapper

has been used only from another non-API class

  android.inputmethodservice.IInputMethodWrapper.

By moving it to android.inputmethodservice package we can make it a
package-private class, which is what this CL is intended
to achieve.

Furthermore, there is another public API class with the same name:

  android.view.inputmethod.InputConnectionWrapper

, which has been confusing with this internal one.  To avoid such a
confusion, this CL also renames this internal one to
RemoteInputConnection.

Other than those mechanical changes, there should be no observable
behavior changes.

Bug: 192412909
Test: atest CtsInputMethodTestCases
Change-Id: Ic0babecd34a6bc80b917050370abc2db5c03d84e
2021-07-07 09:03:34 -07:00
Matt Casey
878423ef22 Merge "Revert RecyclerViewCaptureHelper changes from ag/15083160" into sc-dev am: 5f5e03d3ef am: 6a13a5de2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15192923

Change-Id: I49a2f2de845c3614de63a8904f3b3aab7bf13cb3
2021-07-07 15:37:04 +00:00
Matt Casey
5f5e03d3ef Merge "Revert RecyclerViewCaptureHelper changes from ag/15083160" into sc-dev 2021-07-07 15:19:41 +00:00
Fiona Campbell
4cb38cabc9 Merge "Clean up framework brightness system" into sc-dev am: 2bb1f86a17 am: e72028befe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15175190

Change-Id: Id60e0ccace817a2e3dd899b7616e8865544b039e
2021-07-05 17:47:40 +00:00
Fiona Campbell
2bb1f86a17 Merge "Clean up framework brightness system" into sc-dev 2021-07-05 17:22:46 +00:00
Michael Wachenschwanz
c7bf1b517c Merge "Move RPM stats collection out of BatteryStatsImpl.mLock" into sc-dev am: 42f68a76f5 am: d1efed6932
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15189209

Change-Id: I51a3ba56129d3167f2f5c0dc27cbf05142f1b069
2021-07-03 01:59:09 +00:00
Michael Wachenschwanz
42f68a76f5 Merge "Move RPM stats collection out of BatteryStatsImpl.mLock" into sc-dev 2021-07-03 01:41:41 +00:00
Fiona Campbell
7e8d205424 Clean up framework brightness system
Remove brightness_float setting.
Delete unused code.
Use display manager sync root for BrightnessSetting

Bug: 191472484
Test: atest com.android.server.display

Change-Id: I0cc722949081ba5a3aaa9f7fa4ff4e874578925b
2021-07-03 00:10:33 +01:00
Matt Casey
fb0dea3d3c Revert RecyclerViewCaptureHelper changes from ag/15083160
Changes in shared code with ListView implementation seem to have
had negative side effects with Telegram. Revert the old onScrollRequested
implementation for now.

Bug: 189475409
Test: Verify gaps missing from telegram long screenshots
      (and they don't run out of tiles)

Change-Id: Iff81293c6ec34bf3e024e930fe61ba9a1fd95b7b
2021-07-02 23:03:28 +00:00
Michael Wachenschwanz
62a9ff6718 Move RPM stats collection out of BatteryStatsImpl.mLock
Querying RPM stats on device with a large number of StateResidency info
can take a long time. Move the query to outside of the BatteryStats
lock to reduce the chance of lock contention.

Bug: 185970842
Test: atest android.cts.statsd.validation.ValidationTests#testPartialWakelock

Change-Id: I1c69b3f9c071e5d758cf4b22855c4b0ec221a5cf
2021-07-02 15:58:27 -07:00
Song Hu
469f9d3253 Fix sharing shortcuts not showing for Work Profile. Check package by
using selected profile PackageManager.

Test: test on local device
Bug: 175240616
Fixes: 179798044
Change-Id: I30728705dbc60d0506b7d20a16bcc8f1eed9b6d0
(cherry picked from commit 0e4b75a215)
2021-07-02 17:16:28 +00:00
TreeHugger Robot
4e944d4634 Merge "Switch back to sync IInputMethodManager" into sc-dev 2021-07-02 15:22:21 +00:00
Yohei Yukawa
4f904fac9d Merge "Switch back to sync IInputMethodManager" 2021-07-02 14:28:49 +00:00
Tiger Huang
902c5fa9bd Merge "Remove the light flag if the bar isn't specified light in theme" into sc-dev am: de8ea692b1 am: 12ea329d0e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15175031

Change-Id: I54ca1686b0fde7526b4864061d1f8b6ba2d5a0bd
2021-07-02 10:03:50 +00:00
Tiger Huang
de8ea692b1 Merge "Remove the light flag if the bar isn't specified light in theme" into sc-dev 2021-07-02 09:39:40 +00:00
Yohei Yukawa
9dde701446 Switch back to sync IInputMethodManager
This CL logically reverts recent CLs [1][2][3][4][5][6][7][8][9] to
switch back to the previous sync IPC approach in IInputMethodManager
except for the following two IPCs.

 * reportPerceptibleAsync
 * removeImeSurfaceFromWindowAsync

Reason for revert:
We need more time to understand its performance implications.

 [1]: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64
      b9590fa1e1
 [2]: If79e063641a01b325c63eb9f871f5b992d7c0b72
      5a5648dcb5
 [3]: I1547b98b2aacf764e33aadc9ab784f2013f58f2f
      d833f0dab4
 [4]: I646ef4ae0570aae1812ea267f309441fdec6938d
      38fd020616
 [5]: Iaa63e01453da4ff0e3f446eac036b3be3180cb73
      4a820ccc41
 [6]: Id516fd1c961f43ac3e139c88d7ed004c188d458b
      0a32fd21ef
 [7]: Icb396ae5d74060af69c4ecb16723b2e37b9f2067
      c4663ba6a9
 [8]: I3eafbc28ed3acf3ba859885bf201cb06b3149b94
      f226a79fee
 [9]: Ic584203c1221fbae17f5e2d8f09e3992df061646
      5e2d9f271d

Bug: 163453493
Bug: 174892351
Fix: 190486491
Test: atest CtsInputMethodTestCases
Change-Id: If16ac0de536d9089eb04f6e07b1ee47378124658
Merged-In: If16ac0de536d9089eb04f6e07b1ee47378124658
2021-07-02 07:06:07 +00:00
Yohei Yukawa
662b48b72d Switch back to sync IInputMethodManager
This CL logically reverts recent CLs [1][2][3][4][5][6][7][8][9] to
switch back to the previous sync IPC approach in IInputMethodManager
except for the following two IPCs.

 * reportPerceptibleAsync
 * removeImeSurfaceFromWindowAsync

Reason for revert:
We need more time to understand its performance implications.

 [1]: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64
      b9590fa1e1
 [2]: If79e063641a01b325c63eb9f871f5b992d7c0b72
      5a5648dcb5
 [3]: I1547b98b2aacf764e33aadc9ab784f2013f58f2f
      d833f0dab4
 [4]: I646ef4ae0570aae1812ea267f309441fdec6938d
      38fd020616
 [5]: Iaa63e01453da4ff0e3f446eac036b3be3180cb73
      4a820ccc41
 [6]: Id516fd1c961f43ac3e139c88d7ed004c188d458b
      0a32fd21ef
 [7]: Icb396ae5d74060af69c4ecb16723b2e37b9f2067
      c4663ba6a9
 [8]: I3eafbc28ed3acf3ba859885bf201cb06b3149b94
      f226a79fee
 [9]: Ic584203c1221fbae17f5e2d8f09e3992df061646
      5e2d9f271d

Bug: 163453493
Bug: 174892351
Fix: 190486491
Test: atest CtsInputMethodTestCases
Change-Id: If16ac0de536d9089eb04f6e07b1ee47378124658
2021-07-02 07:05:45 +00:00
Lucas Lin
c7a2b409db Merge "Fix Ikev2 vpn cannot establish through startLegacyVpn()" into sc-dev am: 30d17bd9a1 am: ab8b92f6ac
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15125750

Change-Id: Id3314185bf7d5487f4e03e637b5cc64deeb4780f
2021-07-02 05:48:03 +00:00
Lucas Lin
30d17bd9a1 Merge "Fix Ikev2 vpn cannot establish through startLegacyVpn()" into sc-dev 2021-07-02 05:27:30 +00:00
Charles Chen
73c59237fe Merge "Remove updateImeDisplayId" into sc-v2-dev am: 56e17bfcd8 am: ebf2e81d46
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15065650

Change-Id: I15b4412061117df48156736a4536bb7d43ddd3f6
2021-07-02 03:52:03 +00:00
Charles Chen
ebf2e81d46 Merge "Remove updateImeDisplayId" into sc-v2-dev am: 56e17bfcd8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15065650

Change-Id: I3b0e814649cc9debd60c00bf2be933a50a59fb3a
2021-07-02 03:36:08 +00:00
Charles Chen
56e17bfcd8 Merge "Remove updateImeDisplayId" into sc-v2-dev 2021-07-02 03:20:32 +00:00
Tiger Huang
0eb56cb359 Remove the light flag if the bar isn't specified light in theme
Previously, PhoneWindow will add the light flag for the bar if it is
specified light in theme. It won't remove the light flag if the theme is
not light. The previous logic in PhoneWindow#generateLayout assumes the
decor view was newly created.

However, the decor view can be reused from the preserved window. This
happens if the activity is recreated. So if the previous activity was in
a light theme and the newly created activity is in a dark theme, we
should clear the light bar flags added in the previous activity.

Fix: 174502412
Test: 1. Set Dialer (Phone) to dark theme from Dialer's display options.
      2. Clear app data from Dialer's app info.
      3. Open Dialer again and see if the color of system bars are
         normal.
Change-Id: I3ea61322e4c3cfe26981e23792f42ab0b9a1e217
2021-07-01 23:25:51 +08:00
TreeHugger Robot
30992d5f89 Merge changes I5bdc1f46,Idd24fd51 into sc-dev am: cfe4767b40 am: 5feaa3a962
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15113790

Change-Id: I446b4de09607db8326b5f8cffe939ad24697e1f3
2021-07-01 13:56:41 +00:00
TreeHugger Robot
ac4597bf19 Merge changes I5bdc1f46,Idd24fd51 into sc-dev am: cfe4767b40 am: 3bbaa52c9e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15113790

Change-Id: Id31712deabe80ed29e85a65b9d78387f0d8dd5a6
2021-06-30 22:07:52 +00:00
TreeHugger Robot
3bbaa52c9e Merge changes I5bdc1f46,Idd24fd51 into sc-dev am: cfe4767b40
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15113790

Change-Id: I40ea8875f98ea2e9efe21c13a17cf6d2e83bca3a
2021-06-30 22:04:19 +00:00
TreeHugger Robot
cfe4767b40 Merge changes I5bdc1f46,Idd24fd51 into sc-dev
* changes:
  Sharesheet style updates
  Update Edit icon.
2021-06-30 22:00:33 +00:00
TreeHugger Robot
5ad183eb9c Merge "Introduce IInputContextInvoker for better readability" 2021-06-30 20:32:50 +00:00
TreeHugger Robot
5ec70e9530 Merge "Log IME tracing even when RemoteException is thrown from IC" 2021-06-30 19:48:48 +00:00
Dmitri Plotnikov
82c4fce0a1 Merge "Fix boot time BatteryStats reset failure" into sc-dev am: ebf77ebc51 am: bea4bac02c am: 9285cf57dd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15128655

Change-Id: Iaf0d929b7c8cbe3e1398de82a71e3c2bc32fc1ef
2021-06-30 19:36:17 +00:00
Dmitri Plotnikov
9285cf57dd Merge "Fix boot time BatteryStats reset failure" into sc-dev am: ebf77ebc51 am: bea4bac02c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15128655

Change-Id: I2d5f02809e76c8f9381917ed307de46a3a3ba029
2021-06-30 19:25:04 +00:00
Dmitri Plotnikov
f65cbbbe42 Merge "Fix boot time BatteryStats reset failure" into sc-dev am: ebf77ebc51
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15128655

Change-Id: Ic6603505265ed644c72a5042fc30011ea1fbd149
2021-06-30 19:12:49 +00:00
TreeHugger Robot
29aa577609 Merge "Pause watchdog monitor for incfs native lib extraction" into sc-dev am: 920e1fd7a6 am: 6611a10a66 am: 9274ed1674
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15147287

Change-Id: I0c9fa3d6231853c2438f711480130a268ffbc832
2021-06-30 19:12:35 +00:00
Dmitri Plotnikov
bea4bac02c Merge "Fix boot time BatteryStats reset failure" into sc-dev am: ebf77ebc51
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15128655

Change-Id: I4681840e210a25d27ecb03ff30da088721f2fc8b
2021-06-30 19:12:17 +00:00