Commit Graph

18846 Commits

Author SHA1 Message Date
Philip Junker
9b5f8d21ed Merge "Sync BatteryStats user activity types with PowerManager ones." into tm-qpr-dev 2022-10-07 15:32:21 +00:00
TreeHugger Robot
dd4fc6db67 Merge "[2/2] Fix sharing to another profile where an app has multiple targets" into tm-qpr-dev 2022-10-07 12:52:26 +00:00
Philip Junker
715cba5f63 Sync BatteryStats user activity types with PowerManager ones.
Add more logs when entering doze.

Bug: 243518837
Test: atest BatteryStatsTests
Test: atest PowerManagerServiceTest
Test: manually observe logs using logcat / adb bugreport

Change-Id: I234a999cf41da0346ce4d9f05663cae116b095a3
Merged-In: I234a999cf41da0346ce4d9f05663cae116b095a3
2022-10-07 08:17:41 +00:00
Derek Jedral
84e68e28b2 Merge "Revert "Fix TrustAgent showing unclear string."" into tm-qpr-dev 2022-10-06 17:00:01 +00:00
Philip Junker
af0795a722 Merge "Initialize ContentObserver in startObserving()." into tm-qpr-dev 2022-10-06 15:47:39 +00:00
Derek Jedral
f60d171a4b Revert "Fix TrustAgent showing unclear string."
This reverts commit 140516bf65.

Reason for revert: Bug where users cannot use biometrics to re-auth after trustagent timeout.

Bug: 251078638
Change-Id: I6254196327e09381eaa047e6444034ada6030113
2022-10-05 19:42:49 +00:00
Philip Junker
90e2f37790 Initialize ContentObserver in startObserving().
This removes a race condition where ContentObserver is initialized
while mHandler is null which causes the ContentObserver#onChange() callback to run on a different thread and can cause an NPE.

Bug: 246843362
Test: manual
Test: atest BrightnessSynchronizerTest
Change-Id: Ib8e192c3961390ece721fa473d5c09323c30bafe
2022-10-05 14:30:47 +00:00
Andrey Epin
3002386445 Merge "Load icons and labels only once" into tm-qpr-dev 2022-10-04 20:39:58 +00:00
Matt Casey
7b19c4b99f Merge "Copy multi-image editor fix to QPR" into tm-qpr-dev 2022-10-04 20:01:43 +00:00
Liahav Eitan
a4fe4bd9a2 [2/2] Fix sharing to another profile where an app has multiple targets
Complete the change in ag/19657256 to also apply in SelectableTargetInfo.
That would ensure that in all cases of cross-profile targets the URIs
are fixed to include the user-id prefix.

Bug:244876518
Bug:242605257
Test: manually share image from work Photos app to personal WhatsApp's
frequent contact target.

Change-Id: Ib41c8a3c46afcc2d62a4c1a924212bcd98bcfbe4
2022-10-04 09:15:39 +00:00
Andrey Epin
cd7c00c36e Load icons and labels only once
The current implementation triggers icon loading each time a view gets
bound and, as binding happens multiple times, icon and label loadings
are unnecessarily duplicated. In addition, as a loading task never gets
canceled, there’re cases (like in the associated ticket) when a view
gets rapidly bound to multiple positions and all the icon loadings
eventually catches up updating it, ending up in icons rapidly changing
on the screen for the view.
This change addresses this by simplifying the icon loading/binding
logic: a view is always bound to the current data and the task is only
updates the data with the missing piece of info once (and applied for
both icons and label loading tasks).
There is one extra change in ResolverActivity due to LoadIconTask
interface change and cancellation logic for the tasks.

Fix: 245934835
Test: Manual tests on a list which does not fit into the screen.
Test: Manual tests with arficial delays added into the tasks.
Test: atest FrameworksCoreTests:ResolverActivityTest
Test: atest FrameworksCoreTests:ChooserActivityTest
Change-Id: I76fe5663523232a74d4f505c535cd6dbcf7f8759
2022-10-03 22:38:47 -07:00
TreeHugger Robot
05914b98a4 Merge "Catch unexpected detached view while creating FrameTracker" into tm-qpr-dev 2022-09-27 13:14:43 +00:00
Matt Casey
09daaaf5e2 Copy multi-image editor fix to QPR
Already fixed in master via https://android-review.googlesource.com/c/platform/frameworks/base/+/2049443

This is that change, but in QPR.

Test: Share multiple images from photos, verify that edit button doesn't
      appear.
Bug: 247638926
Merged-In: Id6ce93efacd54a86d870595ae32b4e6efcec0c04
Change-Id: I51b7d332b6b7e59ee559716022d795bb8de4a71c
2022-09-26 20:30:24 +00:00
TreeHugger Robot
7ca15df236 Merge "Add Logging of the UI Latency for hotword invocation" into tm-qpr-dev 2022-09-24 03:51:17 +00:00
Jing Ji
52ef129d27 Merge "Check the null pointer in ProcStats" into tm-qpr-dev 2022-09-24 03:10:28 +00:00
Nicholas Ambur
0cf35e854e Add Logging of the UI Latency for hotword invocation
Log the UI latency with UIActionLatencyReported atom. We plan to
calulate the latency from when the SoundTrigger HAL emits an event to
when the VoiceInteraction system UI view is shown.

Test: device_config put latency_tracker enabled true; verify traces
and latency is logged in WW.
Bug: 247879896

Change-Id: I3edb91691e81f8f23660c0823a6388338fe926ad
2022-09-23 18:13:14 -07:00
Josh Tsuji
11ffb9c8b4 Merge "Add jank instrumentation for occlude/unocclude/launcher unlock." into tm-qpr-dev 2022-09-24 00:23:28 +00:00
Jing Ji
5ecd71861f Check the null pointer in ProcStats
Bug: 246663534
Test: atest ProcStatsValidationTests
Test: atest ProcessStatsDumpsysTest
Test: atest CtsIncidentHostTestCases:ProcStatsProtoTest
Test: atest CtsStatsdHostTestCases
Test: atest CtsAppTestCases:ActivityManagerProcessStateTest
Change-Id: Ie39e232970238f44b447467173ae46d4775e6432
2022-09-23 16:47:50 -07:00
Josh Tsuji
64a3f7394a Add jank instrumentation for occlude/unocclude/launcher unlock.
Fixes: 241195239
Test: grab a trace
Change-Id: If9af9aa95ddff26c9baf5101fb5aa45389e532eb
2022-09-23 15:33:52 -04:00
Eun-Jeong Shin
db1ed6fa67 Add hyperlink to "Learn more" in device log access dialog
Add a hyperlink to explain device log access in "Learn more"

Bug: 231437131
Test: GtsVerifier
Ignore-AOSP-First: pending fix for logcat privacy issue
Change-Id: Id7978ee800367f696a8b9ea0d80d0b7e0c2d41eb
2022-09-23 17:30:44 +00:00
Ahan Wu
830249f303 Catch unexpected detached view while creating FrameTracker
Bug: 245083316
Test: atest FrameTrackerTest InteractionJankMonitorTest
Test: LatencyTrackerTest
Change-Id: I55941c78b7200bd70a4b30a29defc3c8306eead8
Merged-In: I55941c78b7200bd70a4b30a29defc3c8306eead8
2022-09-23 16:48:24 +00:00
Nick Chameyev
66e9106619 Merge "[Partial Screensharing] Add initial recents selector UI" into tm-qpr-dev 2022-09-23 13:20:23 +00:00
Nick Chameyev
333c007f08 [Partial Screensharing] Add initial recents selector UI
Adds a recycler view that can show list of thumbnails
and app icons that could be loaded asynchronously.
It is hidden under a flag, so it won't be visible
on normal builds.

Current limitations which will be fixed in
the follow up CLs:
* It doesn't load real data
* Task thumbnail sizes are hardcoded and
  not cropped correctly
* No actions on thumbnail click

Screenshot demo: https://screenshot.googleplex.com/68vhXBNefCKHR2G.png

Test: atest com.android.systemui.mediaprojection.appselector.MediaProjectionAppSelectorControllerTest
Bug: 240924921
Change-Id: Ia3c685050656659ea9a79ffc90a91465c114e259
2022-09-23 11:19:54 +01:00
Joanne Chung
990b2f2682 Merge "[DO NOT MERGE] Revert "Revert "[DO NOT MERGE] Remove selection toolbar code from build time""" into tm-qpr-dev 2022-09-23 09:05:50 +00:00
Miranda Kephart
4658046b52 Merge changes Iffb62170,I9b795928 into tm-qpr-dev
* changes:
  Clean up leaked screenshot connections
  Always reset screenshot preview to alpha=1
2022-09-22 19:13:56 +00:00
Lucas Silva
591f54ba80 Merge "Add additional logging to dream enforcement logic to debug failures." into tm-qpr-dev 2022-09-22 14:46:45 +00:00
Miranda Kephart
9f8f1fd9a7 Clean up leaked screenshot connections
If a subsequent screenshot is taken after we bind to the screenshot
service, but before we get the onServiceConnected callback, we
leak the connection to the service, preventing it from ever getting
shut down. Fix this by unbinding the old connection before connecting
with the new one.

Bug: 242862442
Fix: 242862442
Test: forced DisplayPolicy to take two consecutive screenshots

Change-Id: Iffb62170266a2c1bb332bfb416f0f5e19c5236fb
2022-09-22 14:20:38 +00:00
Nick Chameyev
cbb45c6814 Merge "Do not use pool of SimpleIconFactory objects in Chooser/ResolverActivity" into tm-qpr-dev 2022-09-21 17:40:52 +00:00
Derek Jedral
140516bf65 Fix TrustAgent showing unclear string.
TrustAgents currently show the string "Device was locked manually" if
the trustagent times out, or if lockUser() was called. Changed to show a
more generic string, informing the user that they need to authenticate
with whatever credentials they have set up (instead of using the
trustagent).

Test: Test trustagent timeout, lockUser, verify string appears
Bug: 243710694
Change-Id: I96b113ab3ae63123782517339b0bdb3c6cdec2e2
2022-09-20 21:07:15 +00:00
Jason Sun
73ce3e64f0 Merge "Auto enable new system trust agents" into tm-qpr-dev 2022-09-20 19:48:17 +00:00
Nick Chameyev
bcec37aef9 Do not use pool of SimpleIconFactory objects in Chooser/ResolverActivity
Disables pooling of SimpleIconFactory objects as it caches
density which could be changed in runtime in tests.

Test: presubmit
Bug: 245354130
Change-Id: I124e02e078ba7e6ed3a42b543698c2758e5d0c0e
2022-09-20 17:02:08 +00:00
Wu Ahan
9a54da6d23 Merge "DO NOT MERGE: Enable presubmit for com.android.internal.jank" into tm-qpr-dev 2022-09-20 13:11:48 +00:00
Lucas Silva
5ec702b7b0 Add additional logging to dream enforcement logic to debug failures.
Bug: 246091760
Test: n/a
Change-Id: I171225b28e0661bf0a0b1b0ef6bdb3a4e85f64ea
2022-09-20 00:49:57 -04:00
Joanne Chung
8be1773964 [DO NOT MERGE] Revert "Revert "[DO NOT MERGE] Remove selection toolbar code from build time""
This reverts commit 888e79f7a0.

Reason for revert: The feature is planned in QPR2. This should be removed before QPR1 deadline.

Change-Id: I8af811935171d7ff51d9ba2a9ea60437695d7966
2022-09-20 02:23:28 +00:00
Ahan Wu
87c0106ea7 DO NOT MERGE: 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: I0a6f403694039aec6b9ce44254f6c5cab531f765
Merged-In: Ibddd36410a0d4a909522de011f23a337b53d6889
2022-09-19 13:48:08 +00:00
Ryan Zuklie
745d055d20 Merge "Export BatteryStats info to Atrace." into tm-qpr-dev 2022-09-16 23:09:20 +00:00
Jason Sun
fb3f361d54 Auto enable new system trust agents
Previously we only auto enable factory system trust agents when the
devices is booted for the first time. This change added logic to detect
newly installed/enabled trust agents, and enable them if appropriate.

Fixes: b/243705470
Test: atest FrameworksMockingServicesTests:TrustManagerServiceTest
Change-Id: I3c345a44cfcfccc6f7e2507ba37e378b6b16bd98
2022-09-13 20:44:25 +00:00
Andrey Epin
4c31889176 Merge "Add null-safety checks" into tm-qpr-dev 2022-09-13 15:48:37 +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
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
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
TreeHugger Robot
f4643c773b Merge "Fix the order of talkback focus for ConversationLayout when expanded" into tm-qpr-dev 2022-09-09 18:05:51 +00:00
Andrey Epin
abe2a224f9 Merge "Revert "Load direct-share icons asynchronously"" into tm-qpr-dev 2022-09-08 23:01:48 +00:00
Yining Liu
ffc4bc77b8 Fix the order of talkback focus for ConversationLayout when expanded
Talkback can now correctly focus the collapse button before going to the action list when expanded. To know why mExpandButton is dynamically placed, check commit: 54fe9ad2dc

Bug: 237505828
Test: Visual, see the STEPS TO REPRODUCE section of bug 237505828, the focus order of talkback should be collapse button then actions.
Change-Id: Id0cf8730b00e0e7636a163fb5d51e37e8e0a3e84
2022-09-08 21:35:04 +00:00
Andrey Epin
70a4601f62 Revert "Load direct-share icons asynchronously"
This reverts commit 5650e0c3c8.

Reason for revert: broken functionality b/245681929

Fix: 245681929

Change-Id: I50fce5cca55ee40e66c0915759bfa930848588b9
2022-09-08 17:33:47 +00:00
Tony Huang
5112e20135 Fix divider dismiss position wrong on potrait
When we calculate dismiss target, it will deduce nav bar size from
total height. Remove this rule to make divider always move to end
of screen.

Fix: 232858513
Test: manual
Test: pass existing tests
Change-Id: I34cf12f242daa31bd4dd7d4b202fc43ac0d752b4
2022-09-07 15:21:39 +08:00
Andrey Epin
1809ffcf0e Merge "Load direct-share icons asynchronously" into tm-qpr-dev 2022-09-07 02:44:24 +00:00
Nick Chameyev
47c21d1216 Merge changes from topic "pss-app-selector-screenshot" into tm-qpr-dev
* changes:
  [Partial Screensharing] Add app selector activity screenshot test
  [Partial Screensharing] Update app selector (ChooserActivity) header
2022-09-06 13:05:30 +00:00
Andrey Epin
9bef54f4aa Fix direct share target cells's visibility
Due to incorrect initialization of the visibility status array, direct
share target cells were never truly set invisible (they were not visible
due to lack of content) and thus were iterated over by a keyboard
navigation. Because those “invisible” items overlapped with other,
visible, elements, it created an effect of a correct keyboard navigation
but incorrect target launching.

Fix: 244476932
Test: Manual testing, debugging.
Change-Id: Ic413948fea94aa6c658fad12fe81be2783b5f509
2022-09-01 15:02:37 -07:00
Nick Chameyev
5cb791b6f6 [Partial Screensharing] Add app selector activity screenshot test
Adds a screenshot test for the app selector activity.
It also contains changes to utility rules and classes
to allow capturing the whole activity instead of a single
view.

Bug: 235465652
Test: atest com.android.systemui.mediaprojection.MediaProjectionAppSelectorScreenshotTest
Change-Id: I558c3d0e8893091d42f90cb0358c9fd030cbc0dc
2022-09-01 16:48:03 +00:00