Commit Graph

18577 Commits

Author SHA1 Message Date
Chaohui Wang
dfed7f9e2f Merge changes from topic "jank-toggle" into tm-dev
* changes:
  Add SettingsJankMonitor
  Add SETTINGS_TOGGLE CUJ to InteractionJankMonitor
2022-05-20 09:22:46 +00:00
Michael Rosenfeld
512b28faf4 Merge "Add an option, --reset-all, to dumpsys batterystats." into tm-dev 2022-05-20 06:54:58 +00:00
Junyu Lai
23ed66f130 Merge changes from topic "stats-migration" into tm-dev
* changes:
  Add null check when list directory
  [MS82.2] Add a rewriteSingle method that takes two timestamps
2022-05-19 14:54:02 +00:00
TreeHugger Robot
5b0c795a65 Merge "Update BrightnessSynchronizer Logic" into tm-dev 2022-05-19 08:30:57 +00:00
Chaohui Wang
4921f2f22c Add SETTINGS_TOGGLE CUJ to InteractionJankMonitor
Bug: 230285829
Test: make build
Change-Id: Ieebc37dd28cf679ef5d0d455eb46de84679fdeaf
2022-05-19 15:13:10 +08:00
Santos Cordon
7f4fe4c4d6 Update BrightnessSynchronizer Logic
There was an error where if two auto-brightness changes came in quick
succession, the first could be treated as a user-initiated brightness
change.

1. First float change comes in: Xf
2. We write the brightness to the int-setting: Xi
3. Second float change comes in: Yf
4. Notification of the Xi change comes back to us and because X is
   different from Y, we treat it as a user-change.

The result of this is that auto-brightness learned from these erroneous
"user inputs" and both the short and long term model get affected
negatively for the user.  Often manifesting in brightness learning to
be too low.

The quick succession changes can happen in various situations, but
were most prominent on startup before and after a valid lux is read.

The fix is the revamp the data synchronization algorithm we use in
BrightnessSynchronizer to have updates + confirmation callback be
treated as an atomic operation before executing any other updates
that come in.  In the example above, that means we run (1) (2) and (4)
before handling the new update found in (3).

Fixes: 227483176
Test: Manually verify through debug logging.
Test: atest BrightnessSynchronizerTest
Change-Id: I93856fd74e50bcda04e88a7b7e736e02faa76c8e
2022-05-19 00:13:50 +00:00
TreeHugger Robot
5843318c84 Merge "Add latency instrument for loading share sheet" into tm-dev 2022-05-18 15:45:53 +00:00
Miranda Kephart
be2681d3e9 Merge "Hide edit buttons on clipboard and clipboard smart actions" into tm-dev 2022-05-18 14:54:38 +00:00
Issei Suzuki
61a7196fb5 Merge "Revert ProtoLog to Slog in framework.jar" into tm-dev 2022-05-18 09:29:22 +00:00
Matt Casey
2f6f3aa732 Merge "Style fixes for mini resolver" into tm-dev 2022-05-18 02:12:04 +00:00
Matt Casey
122b4a434a Style fixes for mini resolver
Make the icon 48dp.
Update button style to be opaque for "Open" and outlined for the browser
button.
Fix button padding at the bottom.

Test: Visual inspection with UX. Tested in gesture/3-button + light/dark
      theme
Bug: 175433480
Change-Id: I9304ee6fed28a467fcc54630dab18aaf4f140986
2022-05-17 16:55:21 +00:00
Miranda Kephart
3ede8bc62a Hide edit buttons on clipboard and clipboard smart actions
Guarded behind flags (but defaulted to "don't show").

Bug: 232521394
Bug: 232521320
Fix: 232521394
Fix: 232521320
Test: manual
Change-Id: Ia5899ad965e1466294b14f2991efe186ce3ced31
2022-05-17 15:51:14 +00:00
Issei Suzuki
b39d8489a3 Revert ProtoLog to Slog in framework.jar
ProtoLog is only supported in WM sources at this moment.
This partially reverts commit I4461eddd4a24c7bba1adef1571ce0fbf6d7db0a2.

Bug: 231342674
Test: Pass existing tests.
Change-Id: Ibe5ca4f8a18f92379e3aae8bd9c7c6f456df5810
2022-05-17 15:36:00 +00:00
junyulai
6ab8172b69 [MS82.2] Add a rewriteSingle method that takes two timestamps
This CL provides a public method in FileRotator to
allow caller to write data to a specified standalone file.

This CL also fix a file name generatign error in platform
tools.

Test: NetworkStatsServiceTest NetworkStatsCollectionTest
Bug: 230289468
Change-Id: I17558f349cb2a33062972fe1af96a19356798692
2022-05-17 16:08:27 +08:00
TreeHugger Robot
05e61e90c5 Merge "Remove vendor apex privapp allowlist pruning" into tm-dev 2022-05-16 20:59:24 +00:00
Ahan Wu
f2d9721d94 Add latency instrument for loading share sheet
Bug: 226526090
Test: see the trace attached in the bug
Change-Id: Ic2b31bfe59b7740dd7db6a75c86fad191b2f8507
2022-05-16 16:54:48 +00:00
Song Hu
d581c08704 Merge "Pass shared text content from ChooserActivity to AppPredictionService" into tm-dev 2022-05-13 21:13:46 +00:00
Lucas Dupin
5f5aa7e1ef Merge "Instrument CUJ_VOLUME_CONTROL with Trace tag" into tm-dev 2022-05-13 19:11:24 +00:00
Song Hu
bda0b769d6 Pass shared text content from ChooserActivity to AppPredictionService
Bug: 232426274
Test: manual test on local phone
Test: atest
Change-Id: Idc1d2f8efddab45cfaacd4a78cd745b9273b2719
2022-05-13 09:53:34 -07:00
Jing Ji
317e43a1ff Merge "Always construct the UidProcessState instance in ProcessStats" into tm-dev 2022-05-12 22:15:18 +00:00
Mark Renouf
7ab7a81845 Use System.nanoTime(), avoid desyncing frame times
The rendering pipeline expects frame vsync times as
System.nanoTime(). When the frame vsync time is behind
the most recent frame, the render request is dropped [*].

This reverts the value back to System.nanoTime() which
was accidentally changed in ag/15819081.

* frameworks/base/libs/hwui/renderthread/TimeLord.cpp:46

Bug: 217046739
Test: ???
Change-Id: I21d8737e7acb5ac13bfbcf150006415431d874aa
2022-05-12 20:44:09 +00:00
Michael Wachenschwanz
e59e5012cf Merge "Skip collecting radio data on procstate change when radio is off." into tm-dev 2022-05-12 18:16:34 +00:00
lbill
166eaacd0e Instrument CUJ_VOLUME_CONTROL with Trace tag
1. CUJ_VOLUME_CONTROL begin in animator begin()
   CUJ_VOLUME_CONTROL end in animator end()
   - initDialog(): Tag show
   - dismissH(): Tag dismiss
   - updateVolumeRowSliderH(): Tag update

2. Add Trace.beginSection("VolumeDialogImpl#showH")
3. Add Trace.beginSection("VolumeDialogImpl#dismissH")
4. Add Trace.beginSection("VolumeDialogImpl#updateVolumeRowSliderH")
5. Add Trace.beginSection("VolumeDialogImpl#updateRowsH")

Bug: 232066671
Test: Press Volume key and check perfetto trace
Change-Id: Ib74bfc46bd6841d4b8e86266a75d7003ae4cbe80
2022-05-12 17:29:30 +00:00
Tom Hsu
5c23d0292d Merge "[Panlingual] Fix NPE when add language." into tm-dev 2022-05-12 14:39:27 +00:00
Matt Casey
8cdbd6c00a Merge "Load app icon in miniresolver." into tm-dev 2022-05-12 12:04:57 +00:00
Tom Hsu
c87751b0c2 [Panlingual] Fix NPE when add language.
Bug: b/232348161
Test: local

Change-Id: Ibd55603aebb72eea3e9b2b8c32177f73997cdeee
2022-05-12 09:02:21 +00:00
Song Hu
82b7fd414d Add shortcut title into pin label. Without shortcut title, the pin label does not make sense in non-English string.
Bug: 232198467
Test: manual test on local phone
Change-Id: I5a4760ffed87ed3e573eb4c48ef754e641853f61
2022-05-12 02:02:55 +00:00
Jing Ji
224522119b Always construct the UidProcessState instance in ProcessStats
Bug: 231241732
Test: atest ProcStatsValidationTests
Test: atest ProcessStatsDumpsysTest
Test: atest CtsIncidentHostTestCases:ProcStatsProtoTest
Change-Id: Ia3499757deea455c2dbc1ce2afd573a603ff3da1
2022-05-11 17:41:08 -07:00
Michael Wachenschwanz
de73c05b89 Skip collecting radio data on procstate change when radio is off.
Fixes: 229042376
Test: atest BatteryStatsNoteTest
Change-Id: I6b3c5a5c9416bc47b8dbb00e28c81d93e3507613
2022-05-11 14:37:45 -07:00
Matt Casey
7c3a2374be Load app icon in miniresolver.
Awkwardly used LoadIconTask from ResovlerActivity, but trying to
constrain change as much as possible given release timeline.

Also:
- Update paddings and font sizes per mocks
  (https://www.figma.com/file/sGebzybgbcKrK8nBiBSWc9/Intent-Picker-%26-Sendkit?node-id=1252%3A6083)

Bug: 175433480
Test: Visual inspection.
Change-Id: Id7606d358183733efdf69f5ef687dd71605e853e
2022-05-11 19:42:50 +00:00
Matt Casey
ad48cd89e0 Merge "Resolve NPE when mini resolver is rotated" into tm-dev 2022-05-11 16:47:13 +00:00
Calvin Pan
53c979939c Merge "Filter the locale not in resources" into tm-dev 2022-05-11 15:16:10 +00:00
Calvin Pan
42bb47de41 Filter the locale not in resources
Some 1p apps may not provide all the resources in the apk, need to
reply air update to download other language resources

Bug: 213980690
Test: Test apps that the locale in <locale-config> more than
resources.

Change-Id: I1c050ffc8bba76df42832a3641ddcba1111afd33
2022-05-11 08:02:58 +00:00
Wu Ahan
009099e89d Merge "Instrument jank of CUJ take screen shot" into tm-dev 2022-05-11 06:35:13 +00:00
Tom Hsu
a3352d9664 Merge "[Panlingual][frameworks] Fix when tap search bar, will leave a big blank." into tm-dev 2022-05-11 05:51:00 +00:00
Matt Casey
755cc5b04d Resolve NPE when mini resolver is rotated
Was attempting to adjust padding on a View that didn't exist.

Also adding additional conditional behavior for similar issues:
- Fix the padding at the bottom based upon insets.
- Only trigger mini resolver for ResolverActivity itself.
- Add comments defining mini resolver.

Test: atest ResolverActivityTest
Test: Manual test of rotation not crashing and padding looking better.
Bug: 222497968
Bug: 175433480
Change-Id: Ie38787f61dc523bd812b828ec16830b91f61ce0b
2022-05-10 17:59:08 +00:00
Song Hu
6c90bbe1cf Merge "ChooserActivity populates intentFilter mimeType with intent.getType() prior to intent.getDataString(). This fixes the issue in screenshot sharing that no or much less than usual direct share recommendations surface." into tm-dev 2022-05-10 15:23:31 +00:00
Shawn Lin
3ab2eccace Merge "Add multi-user support for kids mode" into tm-dev 2022-05-10 12:30:16 +00:00
tom hsu
75ed59fac9 [Panlingual][frameworks] Fix when tap search bar, will leave a big blank.
- Close blank layout after title disappear when search bar is expanded.

Bug: b/227287277
Test: local, see b/227287277#6
Change-Id: I6b5f6990cacf6da9e17b743519ae554af32f691d
2022-05-10 08:30:38 +00:00
Shawn Lin
2b9e4b6550 Add multi-user support for kids mode
Listener to ACTION_USER_SWITCH intent and update the settings key when
user switched.

Bug: 231575466
Test: 1. set different settings keys for different user.
      2. switch between users and see if the setting value is correct.
Change-Id: Ia1afcb6121b296b293bef0ba7d0a0be25b857554
2022-05-10 03:03:56 +00:00
Chaohui Wang
4f4e8dd340 Merge "Add validation TOO_SHORT_WHEN_ALL_NUMERIC" into tm-dev 2022-05-10 02:44:48 +00:00
Joanne Chung
070275dcae Merge "[DO NOT MERGE] Remove selection toolbar code from build time" into tm-dev 2022-05-10 00:59:33 +00:00
Alex Buynytskyy
4220511d7e Merge "Forcefully convert to basic Intent before calling PM API." into tm-dev 2022-05-09 21:44:00 +00:00
Dmitri Plotnikov
f19925afc9 Merge "Fix recording of battery history tags" into tm-dev 2022-05-09 17:56:17 +00:00
Raphael Kim
75577e9421 Merge "Remove package title from notification access confirmation intent" into tm-dev 2022-05-09 17:55:07 +00:00
Alex Buynytskyy
7e0ab65145 Forcefully convert to basic Intent before calling PM API.
AIDL can't accept subclasses, see more info in the bug

Bug: 223022163
Fixes: 223022163
Test: launch WSJ, click on share
Change-Id: I0015fda3a6fb741b109f7d3d00df1da6f7d64863
2022-05-09 09:17:23 -07:00
Tiger Huang
b8ab50b68b Merge "Don't clip background drawable if navigation color view is not opaque" into tm-dev 2022-05-09 12:47:17 +00:00
Rubin Xu
9c9916e4d9 Merge "Protect UnlaunchableAppActivity against overlay attack" into tm-dev 2022-05-09 11:41:02 +00:00
Song Hu
fbdcff39cd ChooserActivity populates intentFilter mimeType with intent.getType() prior to intent.getDataString(). This fixes the issue in screenshot sharing that no or much less than usual direct share recommendations surface.
Test: atest
Test: test on phone
Bug: 229607293
Change-Id: I8d610e4c7033b25eea8a98885339207a723716b6
2022-05-07 22:22:27 +00:00
Dmitri Plotnikov
44cb0c4e31 Fix recording of battery history tags
Bug: 230552845
Test: atest FrameworksCoreTests:BatteryStatsTests

Change-Id: I018cf3f85e8ef11167e780653863b234822be27a
2022-05-06 17:08:18 -07:00