Commit Graph

19617 Commits

Author SHA1 Message Date
Orion Hodson
31e1a33f26 Merge "Prefer valueOf() to boxed primitive constructors" am: 773627cfd3 am: 2488ef52b4 am: f43a706e53 am: 53e69c7eb3 am: 0d6ff93e5e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2216444

Change-Id: Ic0e27a6b22e9f6b2d5114ea513f7f51a21c1ddde
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-20 16:14:15 +00:00
Orion Hodson
0d6ff93e5e Merge "Prefer valueOf() to boxed primitive constructors" am: 773627cfd3 am: 2488ef52b4 am: f43a706e53 am: 53e69c7eb3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2216444

Change-Id: I91f8849596f8dc62be4dcf49d46cac41fdee4e80
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-20 15:32:15 +00:00
Orion Hodson
f43a706e53 Merge "Prefer valueOf() to boxed primitive constructors" am: 773627cfd3 am: 2488ef52b4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2216444

Change-Id: I353181417b100675b65f0f2eaedf93748f747e83
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-20 12:01:07 +00:00
TreeHugger Robot
6f677a36ec Merge "Enable presubmit for com.android.internal.jank" 2022-09-20 09:54:03 +00:00
Orion Hodson
773627cfd3 Merge "Prefer valueOf() to boxed primitive constructors" 2022-09-20 07:40:59 +00:00
TreeHugger Robot
765a65bf37 Merge "Call enforceCallingPermission instead of annotation EnforcePermission" 2022-09-19 11:05:16 +00:00
Ryan Zuklie
e92778a65e Merge "Export BatteryStats info to Atrace." into tm-qpr-dev am: 745d055d20
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19901887

Change-Id: Id86f2b027d7579dca6249d0ce841ffc3e66c6740
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-16 23:20:31 +00:00
Ryan Zuklie
745d055d20 Merge "Export BatteryStats info to Atrace." into tm-qpr-dev 2022-09-16 23:09:20 +00:00
Ryan Zuklie
3aeb8f4925 Merge "Export BatteryStats events to Atrace." 2022-09-16 23:07:49 +00:00
Ahan Wu
2864143e32 Enable presubmit for com.android.internal.jank
This CL consists of following parts:
 - TEST_MAPPING files for presubmit.
 - Correct CUJ constant definitions in LatencyTracker.
 - Use auto-generated enum constants instead of hardcoded
   numbers in LatencyTracker.
 - Create LatencyTrackerTest to test:
   - The constant names of CUJ definitions should be the same with
     corresponding enum names.
   - The amount of CUJ definitions should be the same with
     the amount of enums, means both must be added at the same time.
   - The static getNameOfXX() methods return just the name of the
     CUJ constant definitions.
   - The CUJ constant definitions has 1:1 mapping onto the enums.

Bug: 245250904
Test: check TH if FrameworksCoreTests is triggered
Test: atest FrameTrackerTest InteractionJankMonitorTest
Test: atest LatencyTrackerTest
Change-Id: I767681618a3635b2c0ebdae78cf086d56baeaad0
2022-09-16 18:03:44 +00:00
Arthur Hung
7f1b6e61ad Merge "Fix potential stuck when enabled pointer location" 2022-09-16 01:35:06 +00:00
Taran Singh
0046013807 Merge "Introduce Scribe Select/DeleteRangeGesture" 2022-09-15 18:00:37 +00:00
Arthur Hung
828907a179 Fix potential stuck when enabled pointer location
Replace ArrayList by SparseArray to track each pointer by pointer id, so
we could avoid generating lots redundant PointerStates if the event has
an unexpected pointer id value (such as 0xFFFFFFFF).

This also fix text size and path width when the density has changed.

Bug: 243548346
Test: enabled pointer location
Change-Id: I0a5b04b3034f02c3b06803a90d9b97561afdd9e0
2022-09-15 04:24:55 +00:00
TreeHugger Robot
ac5cbb5ebe Merge "Add LongArrayMultiStateCounter.combineValues" 2022-09-15 02:29:34 +00:00
Mythri Alle
40e793c8f6 Merge "Revert "Don't enable jdwp by default on userdebug builds"" am: e6a7509dbc am: a9cc544dbf am: 7d4c0fec93 am: 38333df066 am: 9b60a6d16d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2216445

Change-Id: I1360a4a173047de833c28498c6cd964fc6295673
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-15 01:48:24 +00:00
Taran Singh
85a57bc143 Introduce Scribe Select/DeleteRangeGesture
Add new APIs for select and delete with two rectangles.

Test: atest InputConnectionEndToEndTest
Test: atest StylusHandwritingest
Bug: 239783077

Change-Id: Ia7240d3eaac8610c774c3a4aad074a4b84b71521
2022-09-15 00:36:40 +00:00
Dmitri Plotnikov
bb76e0fe02 Add LongArrayMultiStateCounter.combineValues
This method combines values into a smaller array
by using an index map.

Bug: 244623253
Test: atest com.android.internal.os.LongArrayMultiStateCounterTest
Change-Id: Ic35d30cc1f8765cd4e21366943da8291355a0047
2022-09-14 16:59:31 -07:00
Mythri Alle
9b60a6d16d Merge "Revert "Don't enable jdwp by default on userdebug builds"" am: e6a7509dbc am: a9cc544dbf am: 7d4c0fec93 am: 38333df066
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2216445

Change-Id: Ifff7c4493145d6e4c283b5e5df1a14d2b2b516b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-14 17:15:49 +00:00
Mythri Alle
7d4c0fec93 Merge "Revert "Don't enable jdwp by default on userdebug builds"" am: e6a7509dbc am: a9cc544dbf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2216445

Change-Id: I47e373c97837014c838c6b13d4027965baeffb06
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-14 16:20:27 +00:00
Pascal Muetschard
09055e3d4d Fixes a NPE in the DisplayResolutionTracker.
Bug: 246761682
Change-Id: I18f41166e2db92e9330c283600a492a3031b320f
2022-09-14 16:38:01 +02:00
Mythri Alle
50c258ca37 Revert "Don't enable jdwp by default on userdebug builds"
This reverts commit 1b989de3d7.

Reason for revert: Test failures:
https://b.corp.google.com/issues/246707198
https://buganizer.corp.google.com/issues/246616689

Change-Id: Ibeb5a92bcfe129df01f94bec2a41fea57303e53e
2022-09-14 09:57:03 +00:00
Pascal Mütschard
7d3ae07e6c Merge "Include the display's resolution in the Jank reports." 2022-09-14 09:54:03 +00:00
Wu Ahan
5c828a8a2d Merge "Revert "Enable presubmit for com.android.internal.jank"" 2022-09-14 08:57:38 +00:00
Orion Hodson
ebe28b0254 Prefer valueOf() to boxed primitive constructors
Constructors for boxed primitives (Byte, Short, Integer, etc) have
long been deprecated. The preferred pattern is to use valueOf(). d8
fails to convert these instances in TypedProperties, most likely due
to the method complexity.

Bug: N/A
Test: Treehugger
Change-Id: Ib58ecc853e2bd1e5d53e9ec256ef0467aa051d9f
2022-09-14 09:53:07 +01:00
Wu Ahan
11d9c54709 Revert "Enable presubmit for com.android.internal.jank"
Revert "Update the class name of jank related atoms"

Revert "Add TEST_MAPPING file for checking jank atoms"

Revert submission 19784398-jank_presubmit

Reason for revert: see b/246684475
Reverted Changes: 
I3880fa2bb:Enable presubmit for com.android.internal.jank
Ia1c4e3214:Add TEST_MAPPING file for checking jank atoms
If8a041770:Update the class name of jank related atoms

Change-Id: I7ab08b691f15647ca026e55e3cf115c9edcd9160
2022-09-14 08:43:17 +00:00
Wu Ahan
79324138a6 Merge "Enable presubmit for com.android.internal.jank" 2022-09-14 02:35:50 +00:00
Justin Ghan
e4c0e42c12 Merge "APIs for remove space gesture, and join or split gesture" 2022-09-13 22:35:33 +00:00
Andrey Epin
3f3ec78227 Merge "Add null-safety checks" into tm-qpr-dev am: 4c31889176 am: abd9f84919
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19931025

Change-Id: Ifeb1593ff09598b1b6885b5efe6dd50dc14594fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-13 17:13:35 +00:00
Andrey Epin
abd9f84919 Merge "Add null-safety checks" into tm-qpr-dev am: 4c31889176
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19931025

Change-Id: I9418d28956ffa3776949e108ec78f6c3fa831a69
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-13 16:43:29 +00:00
Andrey Epin
4c31889176 Merge "Add null-safety checks" into tm-qpr-dev 2022-09-13 15:48:37 +00:00
Mythri Alle
4653017c14 Merge "Don't enable jdwp by default on userdebug builds" am: 3ade15d233 am: 391e8ca76a am: 251978e0da am: 97e39b881d am: 209f25aff5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2215481

Change-Id: I3b8d09585411c4da3aabdd501e9301ed293b03ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-13 14:18:35 +00:00
Mythri Alle
209f25aff5 Merge "Don't enable jdwp by default on userdebug builds" am: 3ade15d233 am: 391e8ca76a am: 251978e0da am: 97e39b881d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2215481

Change-Id: I6744c85c6311ea61c88b3d1158db55465f8b3100
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-13 14:03:40 +00:00
Mythri Alle
251978e0da Merge "Don't enable jdwp by default on userdebug builds" am: 3ade15d233 am: 391e8ca76a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2215481

Change-Id: Ic1481a6d93e546eb0db1d7c8827e2529a055fdce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-13 13:08:26 +00:00
TreeHugger Robot
e5038d35e6 Merge "Hide soft-keyboard when no editor is focused" 2022-09-13 10:38:39 +00:00
Ming-Shin Lu
a201f2123d Hide soft-keyboard when no editor is focused
In case seeing the unexpected fallback keyboard layout when focusing to
the window without an editor from the app has shown the IME.

Note that this behaviour change affects when the IME focus switching to
the next window with following configurations from an IME shown window:
  1) SOFT_INPUT_STATE_UNCHANGED state without an editor
  2) SOFT_INPUT_STATE_VISIBLE state without an editor
  3) SOFT_INPUT_STATE_ALWAYS_VISIBLE state without an editor

Also, we guarded this platform behavior with DeviceConfig platform flag
in input method manager namespace.

Fix: 240701729
Bug: 243897178
Test: manual as issue steps
  1) In Launcher, swiping up to enter all apps page.
  2) Tap the search bar to show IME
  3) Type "Keep" to show Keeps app's shortcut
  4) Tap Keeps app's shortcut
  5) Verify IME won't be shown on top of Keeps app's activity
     (As the app set SOFT_INPUT_STATE_UNCHANGED without focusing an
      editor by default)
Test: atest KeyboardVisbilityControltest#\
         ImeInvisible_softInputAdjustNothingFromImeShownApp
Change-Id: I0c502bec5c5e21dabde08d610a9a1969c1229b08
2022-09-13 10:33:40 +00:00
Mythri Alle
1b989de3d7 Don't enable jdwp by default on userdebug builds
We would like to have userdebug builds as close to user builds as
possible so don't enable jdwp by default on userdebug builds. This
means that we won't be able to attach a debugger to non-debuggable
builds in userdebug builds by default. However, this support can
be enabled by setting persist.debuggable.dalvik.vm.jdwp.enabled
property. Eng builds still enable jdwp by default.

Bug: 240410400
Test: System boots
Change-Id: Iad52254be9b9bc8c9deac8b3ad46e9db1b610160
2022-09-13 09:11:21 +00:00
Dmitri Plotnikov
f8826f098b Merge "Add CPU power brackets to PowerProfile" 2022-09-12 23:19:40 +00:00
Andrey Epin
78c90b7039 Merge "Fix direct share target cells's visibility" into tm-qpr-dev am: 957aa20906 am: 08c01ae19c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19806051

Change-Id: I9a94ba4493d4030f577183c573ffb63ccb672b01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-12 21:28:50 +00:00
Andrey Epin
08c01ae19c Merge "Fix direct share target cells's visibility" into tm-qpr-dev am: 957aa20906
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19806051

Change-Id: I3bfafe04086b0727d1e0098a1eb4d661b0c05959
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-12 20:39:46 +00:00
Andrey Epin
957aa20906 Merge "Fix direct share target cells's visibility" into tm-qpr-dev 2022-09-12 20:18:38 +00:00
Justin Ghan
d12fdde387 APIs for remove space gesture, and join or split gesture
Bug: 240436909
Test: atest InputConnectionEndToEndTest
Change-Id: I2f8c511748c9de3a25bd6a17fcf33cc5017dd0e8
2022-09-12 11:13:11 -07:00
Andrey Epin
2912adc6dd Add null-safety checks
Add nullability annotations and checks to avoid NPE crashes.

Test: manual Chooser-to-Markup transition test
Fix: 246345027
Change-Id: If9582047de7d943e39c5f318050ab3558f062932
2022-09-12 11:08:38 -07:00
Pascal Muetschard
0e2ac808cc Include the display's resolution in the Jank reports.
Tracks the resolutions of the displays and includes the appropriate
resolution in the tracked stats.

Bug: 241174561
Test: atest com.android.internal.jank
Change-Id: I57d9d02f2b9bd9cf451ee4466f3c65b1bb1cf7b4
2022-09-12 11:48:46 +02:00
lpeter
3cc7d7d5a5 Call enforceCallingPermission instead of annotation EnforcePermission
These test cases failed after this change (ag/19194476).
It uses @android.annotation.EnforcePermission instead
of calling enforceCallingPermission.

When using @android.annotation.EnforcePermission, it
will trigger noteOP, so we can’t use the noteOp
mechanism to fix this bug.

After reverting back to use enforceCallingPermission,
the test cases will pass.

Bug: 242103120
Test: atest HotwordDetectionServiceBasicTest
Change-Id: I5cb6a2a33a3fadd2bcbfc6edece80da743684398
2022-09-12 16:20:49 +08:00
Yeabkal Wubshit
4a8abca2d8 Merge "Reland "Conform to 1D VelocityTracker" (--try 2)" 2022-09-10 04:24:20 +00:00
Dmitri Plotnikov
ec82dbfdb5 Add CPU power brackets to PowerProfile
Bug: 244623253
Test: atest com.android.internal.os.PowerProfileTest

Change-Id: I9757577fa526c40fc09af073a2d6eb0aa1db9501
2022-09-09 16:57:48 -07:00
Yeabkal Wubshit
8fa896d098 Reland "Conform to 1D VelocityTracker" (--try 2)
b7977568d0

Topic for the revert which is being rolled-forward: https://googleplex-android-review.git.corp.google.com/q/topic:revert-19762050-generic_vt-XWGGUQUHYR

Bug: 32830165
Test: android.view.cts.VelocityTrackerTest unaffected; touch fling works

Change-Id: Ifc1e5c3efa06656609ea2021b93706026165af8e
2022-09-09 22:07:35 +00:00
Ryan Zuklie
b48df1b4d1 Export BatteryStats info to Atrace.
This is a tm-qpr re-write of http://ag/19779936 and http://ag/19806033. There was large refactor of BatteryStatsHistory that prevent the changes from being cherry-picked directly. Instead, this change copies the relevant sections and stitches together the rest.

Things that are identical
* The whole TraceDelegate
* recordTraceCounters
* recordTraceEvents

Things that are different
* Record calls are moved to BatteryStatsImpl
* Class setup (mTracer isn't changeable)
* No tests (can be added, but hard prior to the refactor)

Bug: 245749764
Test: presubmit and local perfetto tracing
Merged-In: Iaae4e9796a44be3ffdaee31b956bbb3e87735ead
Change-Id: I62fc2e93b662b89176cc26bdff8b3e88d216028a
2022-09-09 14:40:15 -07:00
Ryan Zuklie
0563fe8128 Merge "Export BatteryStats state bitmaps to ATrace" 2022-09-09 21:29:00 +00:00
TreeHugger Robot
1934e1a953 Merge "Fix the order of talkback focus for ConversationLayout when expanded" into tm-qpr-dev am: f4643c773b am: 2211c16334
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19904008

Change-Id: Ic0b348f9d5427f66692458aa1dd3ba0ac3b75941
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-09 19:09:31 +00:00