Commit Graph

17289 Commits

Author SHA1 Message Date
Dmitri Plotnikov
2c06c196c2 Merge "Fix BatteryStatsImplTest." into sc-dev am: 4162c032bf am: d6956bc287
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15291010

Change-Id: I19bc29d6bf83c8d077e9b8961fcc41100edf3f27
2021-07-16 01:05:18 +00:00
Dmitri Plotnikov
4162c032bf Merge "Fix BatteryStatsImplTest." into sc-dev 2021-07-16 00:26:16 +00:00
Dmitri Plotnikov
21dd5325fb Fix BatteryStatsImplTest.
Bug: 180015146
Test: atest FrameworksCoreTests:BatteryStatsImplTest

Change-Id: I6b43ca03ba816e12735ebd47d8cf61a6b1cee110
2021-07-15 14:51:18 -07:00
TreeHugger Robot
3685b41a2a Merge "Make Verification text shrink to zero size for long names or large fonts." into sc-dev am: 4820907a6b am: 56c1550497
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15237713

Change-Id: I13b61ece898af80fdfeca77c21600b158a1c9ea8
2021-07-14 14:07:11 +00:00
TreeHugger Robot
4820907a6b Merge "Make Verification text shrink to zero size for long names or large fonts." into sc-dev 2021-07-14 13:46:45 +00:00
Wilson Wu
89b9508a37 Merge "Add startImeTrace and stopImeTrace APIs in ImeTracing" 2021-07-14 09:00:31 +00:00
Wilson Wu
aeb5b6392d Add startImeTrace and stopImeTrace APIs in ImeTracing
So Settings DevelopmentTiles doesn't need to create direct
IInputMethodManager dependency to access system API.

Bug: 175742251
Test: Manually test ime winscope works properly
Test: make RunSettingsRoboTests ROBOTEST_FILTER="WinscopeTraceTest"
Change-Id: Ie37790c7479f6b9064afd7fbcee7fd6f712d1a75
2021-07-14 15:39:57 +08:00
Hans Boehm
d459b7d727 Merge "Use tmpArgBuffer correctly when argBuffer is null" am: a7fbddac5f am: 6d7cf56683 am: fbccd18cb1 am: 980b437c86
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1762425

Change-Id: Icf1d9d2f92eea481449f7dc0c4a4fbe2d7b8c944
2021-07-14 01:42:04 +00:00
Hans Boehm
980b437c86 Merge "Use tmpArgBuffer correctly when argBuffer is null" am: a7fbddac5f am: 6d7cf56683 am: fbccd18cb1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1762425

Change-Id: I9cd1a70e4942329b12d139e69066445cc46b17bf
2021-07-14 01:22:00 +00:00
Hans Boehm
fbccd18cb1 Merge "Use tmpArgBuffer correctly when argBuffer is null" am: a7fbddac5f am: 6d7cf56683
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1762425

Change-Id: Ie7f2e9987469c84d7f039519da3ac73120cbc1d0
2021-07-14 01:08:18 +00:00
Daniel Sandler
cba5c9b8d3 Merge changes from topic "egg12" into sc-dev am: 51204c444a am: 6b4145107f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15241669

Change-Id: I258dd2c449133be0ffef274324d2e7d4c3d91477
2021-07-13 19:59:35 +00:00
Daniel Sandler
653c7f6fcf Merge changes from topic "egg12" into sc-dev am: 51204c444a am: 5bf5b00245
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15241669

Change-Id: Icd29726e0386461bc592556799ccb6746cec8de0
2021-07-13 19:58:55 +00:00
Daniel Sandler
6b4145107f Merge changes from topic "egg12" into sc-dev am: 51204c444a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15241669

Change-Id: I8b4f140fbb274c27322edbce630b48d0421baa07
2021-07-13 19:47:05 +00:00
Daniel Sandler
51204c444a Merge changes from topic "egg12" into sc-dev
* changes:
  Bubbling up some of these great new colors.
  AnalogClock: Allow subclasses to override the "now" instant.
2021-07-13 19:37:48 +00:00
TreeHugger Robot
00ec9a6d91 Merge "Introduce InputMethodServiceInternal for better abstraction" 2021-07-13 17:00:49 +00:00
TreeHugger Robot
f8a6eb6982 Merge "Optimize InputConnectionProtoDumper a bit" 2021-07-13 16:09:40 +00:00
Yohei Yukawa
a975bfc447 Introduce InputMethodServiceInternal for better abstraction
This is a mechanical refactoring CL that has no behavior change.

This CL removes the direct dependency on AbstractInputMethodService
from whenever possible.  As a result, the following classes no longer
directly depend on AbstractInputMethodService.

 * android.inputmethodservice.IInputMethodWrapper
 * android.inputmethodservice.RemoteInputConnection
 * com.android.internal.inputmethod.ImeTracing
 * com.android.internal.inputmethod.ImeTracingClientImpl
 * com.android.internal.inputmethod.ImeTracingServerImpl

This is still a purely mechanical refactoring.  There should be no
observable behavior change.

Bug: 192412909
Test: atest CtsInputMethodTestCases
Test: Manually verified that IME tracing still works
Change-Id: I2aeeeacd27195ce10059d6590e098a4a969e774d
2021-07-13 15:54:10 +00:00
Dan Sandler
28f8033d80 Bubbling up some of these great new colors.
Bug: 177962166
Test: adb shell am start -n android/com.android.internal.app.PlatLogoActivity
Change-Id: I92cfe3f9e2294d888dfaa5f30591885804d8302b
2021-07-13 09:52:29 -04:00
TreeHugger Robot
2407ab11f2 Merge "Merge android.util.imetracing into com.android.internal.inputmethod" 2021-07-13 04:28:54 +00:00
Jeff DeCew
c17567ce1a Merge "Use SRC_ATOP instead of SRC_IN for blending the NotificationExpandButton" into sc-dev am: d14c60be51 am: ffdbe187a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15237912

Change-Id: I0ca7582b8a7eb51e364ffd9eaf8a252ef278ee41
2021-07-13 00:52:33 +00:00
Ahaan Ugale
950376ceac Merge "Check/note ops when delivering HotwordDetectedResult" into sc-dev am: e360fc69a7 am: ab354b6d70
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15241921

Change-Id: I5ea5b0e15323176c2dfcbfd0a607de1d9c356c9e
2021-07-13 00:48:14 +00:00
Jeff DeCew
ffdbe187a6 Merge "Use SRC_ATOP instead of SRC_IN for blending the NotificationExpandButton" into sc-dev am: d14c60be51
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15237912

Change-Id: Iab479860b685db90eee761f98d5d450bd8907a4c
2021-07-13 00:36:19 +00:00
Ahaan Ugale
ab354b6d70 Merge "Check/note ops when delivering HotwordDetectedResult" into sc-dev am: e360fc69a7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15241921

Change-Id: Ic5d1308896f9b8c1c7c31f17f56b446b855c1115
2021-07-13 00:34:13 +00:00
Tiger Huang
ce8184b2f5 Merge "Send more system bar attributes to System UI for logging" into sc-v2-dev am: c3d3e0ea33 am: ae12afe314
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15229896

Change-Id: I56dc73fa2ab7c4d953af00abad7c24bc967a9119
2021-07-12 20:34:08 +00:00
Mark Renouf
ecfcbc3439 Merge "Quiet down long screenshots logcat output" into sc-dev am: a7af7f8346 am: 1ac5b4b4a1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15236057

Change-Id: I10d064a7abb9c131a6e71340e164d716e5fd003b
2021-07-12 20:21:57 +00:00
Mark Renouf
f809c9b7e9 Merge "Quiet down long screenshots logcat output" into sc-dev am: a7af7f8346
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15236057

Change-Id: Id86cbbd865fe93e8c59683a32a44019c6883e995
2021-07-12 20:21:05 +00:00
Tiger Huang
ae12afe314 Merge "Send more system bar attributes to System UI for logging" into sc-v2-dev am: c3d3e0ea33
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15229896

Change-Id: If0adf5f4f92b5b975ea5a4cfde023d0ccbb13ecd
2021-07-12 20:19:25 +00:00
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
b3f13370d4 Make Verification text shrink to zero size for long names or large fonts.
Fixes: 189723284
Test: manual
Change-Id: I19e327df59cd085870c04e266f053a87b35b8a54
2021-07-12 16:04:21 -04: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
Wang Han
3688f9590c Use tmpArgBuffer correctly when argBuffer is null
* Seems to be a typo and can cause NPE.

Change-Id: I7e253c97e02767a076d9450e88ccea08c5122bb1
2021-07-11 08:13:30 +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
26b594af10 Optimize InputConnectionProtoDumper a bit
This is a mechanical refactoring CL that has no behavior change.

Currently all the utility methods defined in
InputConnectionProtoDumper return ProtoOutputStream, while the
returned instances will always be converted into byte[] eventually.
With this CL, those utility methods return byte[] instances directly,
which is expected to make it easier for ART/dexpreopt to do more
optimizations such as code inlining because instances of
ProtoOutputStream will no longer be escaped from those methods.

Bug: 192412909
Test: atest CtsInputMethodTestCases
Test: Manually verified that IME tracing still works
Change-Id: I7b24aee5428da312972aa86b8658429b421490f8
2021-07-09 09:46:47 -07:00
Yohei Yukawa
3beeb3e3c7 Merge android.util.imetracing into com.android.internal.inputmethod
This CL renames classes related to IME tracing as follows

 * android.util.imetracing.ImeTracing
     => com.android.internal.inputmethod.ImeTracing
 * android.util.imetracing.ImeTracingClientImpl
     => com.android.internal.inputmethod.ImeTracingClientImpl
 * android.util.imetracing.InputConnectionHelper
     => com.android.internal.inputmethod.InputConnectionProtoDumper

Other than those renamings, there should be no observable chagnes.

Fix: 175761228
Test: presubmit
Test: Manually verified that IME tracing still works
Change-Id: I6518d946e1832037f240f57aa900d3447083f1fa
2021-07-09 09:46:36 -07: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
Mark Renouf
1ac5b4b4a1 Merge "Quiet down long screenshots logcat output" into sc-dev am: a7af7f8346
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15236057

Change-Id: Ia18a598dc9879764c4ed1ae134dec0162efcc2ff
2021-07-09 15:45:56 +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
Tiger Huang
ecd2b0c563 Send more system bar attributes to System UI for logging
This CL sends the requested visibilities and the package name of the
focused app to System UI for logging.

Bug: 190543382
Test: atest RegisterStatusBarResultTest CommandQueueTest
            LightsOutNotifControllerTest
Change-Id: I6b3ceed1efc3075bf0c93620fe753ef2a6f79809
2021-07-09 02:28:15 +08: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