Commit Graph

18821 Commits

Author SHA1 Message Date
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
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
Nick Chameyev
2d2b24f09d [Partial Screensharing] Update app selector (ChooserActivity) header
Updates title style (increases font size), adds an icon
and hides the drag handle for media projection app
selector activity which is based on ChooserActivity.

Bug: 235465652
Test: atest com.android.internal.app.ChooserActivityTest
Test: screenshot test in a follow-up CL
Change-Id: Ib717d3f7e6132d56e8344f4e06a12a64ee63457b
2022-09-01 16:11:41 +00:00
Hongwei Wang
5ec2f4d52e Handle ProtoLog logging command in WMShell
Added a ProtoLogController class that hooks into ShellCommandHandler to
handle the adb shell command for ProtoLog in WMShell.

Removed the proxy in WM to pipe the adb shell command to WMShell via
StatusBarManagerService.

Bug: 243447162
Test: adb shell dumpsys activity service \
        SystemUIService WMShell protolog help
Change-Id: I9175ec88dcbae53508c97b4df1c2378b3eb9d648
2022-08-31 17:30:37 -07:00
Andrey Epin
5650e0c3c8 Load direct-share icons asynchronously
Move direct-share icons loading off the main thread in the same way
we're loding A-Z icons.

Test: Manual testing with rotatin and screen locking. Unit tests.
Fix: 215699869
Change-Id: Ied1bfdcacba8f3ab0ad8aac3988944181365b59c
2022-08-30 13:39:11 -07:00
Jernej Virag
166d420cf4 Prevent loading of Icon resources from the wrong package
If an Icon carries package designator, LocalImageResolver has now
ignored it. This could lead to loading of a wrong icon in cases where
the ID collided with the same ID in android package.

This is fixes that corner-case.

Bug: 241066484
Test: atest LocalImageResolverTest - the new test checks for pkg
      correctness and fails on devices without this cl

      manual test: bluejay device with known, reproducible resource
      collision in media player notification. In reproducible case,
      icon appears as a broken block.

      After applying this patch, small icon in media notification loads
      correctly for the collision case.

Change-Id: Ic79c0d4acb1d347a24282972e009a5a079ce6c21
2022-08-30 09:16:54 +00:00
Jordan Demeulenaere
6fbd48df33 Merge changes from topics "footer-actions-fakes", "footer-actions-mad", "footer-actions-screenshots" into tm-qpr-dev
* changes:
  Enable the new footer actions in team food.
  Add screenshot test for the footer actions (2/2)
  Implement LaunchableView for footer actions Views.
  Wire the new FooterActions implementation behind a flag
  Implementation of the FooterActions following the MAD (1/3)
  Add BroadcastDispatcher.broadcastFlow
  Extract QSSecurityFooterUtils out of QSSecurityFooter
  Make the logic of QSSecurityFooter reusable
  Add some fakes to SystemUI-test-utils
  Allow preventing unrestricted Apps from being Stopped
2022-08-26 06:47:09 +00:00
Neha Jain
900e693d58 Merge "Revert "Remove BatteryStats user activity types and use PowerManager ones instead."" into tm-qpr-dev 2022-08-26 00:48:04 +00:00
Neha Jain
e8ab134de1 Revert "Remove BatteryStats user activity types and use PowerManager ones instead."
This reverts commit 79e517c3d4.

Reason for revert: b/243434675

Change-Id: Ie2476f23715ed933064470ee2f50d550e92d46b8
Merged-In: I5cfdd6a7c21ed322f50d7605fdd470b41726f4cf
2022-08-25 20:34:31 +00:00
Liahav Eitan
6dae9d46b7 Merge "Fix sharing to another profile where an app has multiple targets" into tm-qpr-dev 2022-08-25 09:59:52 +00:00
Jing Ji
dcd089d3e7 Allow preventing unrestricted Apps from being Stopped
This CL adds a flag to allow toggling the behavior on whether or not
the foreground service task manager should show a stop button for
unrestricted apps.

Bug: 230449539
Test: Manual - device_config put systemui \
      show_stop_button_for_user_allowlisted_apps true|false
Test: atest FgsManagerControllerTest
Change-Id: I4cfe54933d7c6807a7ffbac9ee709c7d8d6b83d3
Merged-In: I4cfe54933d7c6807a7ffbac9ee709c7d8d6b83d3
2022-08-25 10:48:45 +02:00
Calvin Pan
ee666baeac Merge "Using different strings for language/region picker" into tm-qpr-dev 2022-08-24 09:30:22 +00:00
Joanne Chung
3292a30a1c Merge "Fix toolbar announce wrong text." into tm-qpr-dev 2022-08-24 01:07:32 +00:00
Liahav Eitan
15e2b0fe84 Fix sharing to another profile where an app has multiple targets
Moves the fixUris call from onTargetSelected directly to the intent
launch to ensure the intent which is actually started is updated with
userId specific URIs.

Bug:242165528
Bug:242605257
Test: manually share image from personal profile to work gmail,
first with chat target then backing up and selecting the main target

Change-Id: Iabf5dcf2612fe718f2f0886e2e5e9b76f37af1e1
2022-08-23 16:05:45 +00:00
Philip Junker
28930b91d8 Merge "Remove BatteryStats user activity types and use PowerManager ones instead." into tm-qpr-dev 2022-08-23 14:54:04 +00:00
Philip Junker
79e517c3d4 Remove BatteryStats user activity types and use PowerManager ones instead.
Add millisSinceLastUserActivity and lastUserActivityEvent to PowerGroup log when dozing.
Add timeout to PMS log when dozing.

Bug: 243518837
Test: atest BatteryStatsTests
Test: atest PowerManagerServiceTest
Test: manually observe logs using logcat / adb bugreport
NoNonSdkCheck: USER_ACTIVITY_TYPES is only accessed indirectly by apps through dumpLocked() method.
Change-Id: I835992a08bd4a07350e36ef671c6273c8fee43a0
(cherry picked from commit bf794e4585)
Merged-In: I835992a08bd4a07350e36ef671c6273c8fee43a0
2022-08-23 14:48:09 +00:00
Calvin Pan
80e0a51b68 Using different strings for language/region picker
In zh_TW, the "suggested" translated as "suggested language"
in language/region picker. Using different words to translate to
"suggested language" and "suggested region".

Bug: 243016620
Test: Manually check the UI.
Change-Id: I2edf82039b8dd37ca27ce831efa1cfa1474c8efb
Merged-In: I2edf82039b8dd37ca27ce831efa1cfa1474c8efb
2022-08-23 08:56:05 +00:00
Fiona Campbell
a01ccaae13 Merge changes I36ea0ffc,I1f3797c5,I01aeeedd into tm-qpr-dev
* changes:
  Add constraints to window duration scale
  Add constraints to animation duration scales
  Ensure animation scales are within bounds
2022-08-19 14:49:40 +00:00
Joanne
53d6f568ec Fix toolbar announce wrong text.
This is a regression during refactor toolbar code, we don't intent
to announce the toolbar popup window so we should not set content
description for the container.

Bug: 239563674
Test: manual. Turn on talkback and make sure the announce is correct
and the behavior is the same
Test: atest TextViewIntegrationTest pass for local/remote
Test: atest TextViewActivityTest pass for local/remote
Test: atest SuggestionsPopupWindowTest pass for local/remote

Change-Id: I6e30d2f6d9a2c4905b702c25655fe5e4eb7de5d5
2022-08-19 13:42:24 +00:00
Daniel Hsieh
22783d8314 Logs the activated session duration for magnification. (2/2)
Uses the atom MagnificationFollowTypingFocusActivatedSessionReported in
westworld to log the activated session duration for the window magnifier
which its following typing focus is enabled.

The duration is accumulated by the time when the window magnifier and
the ime are all on. If one of them is off, we would pause the
accumulated timer. If a user moves the window magnifier to disables
this function, we would stop the accumulated timer and log the duration.

Bug: 216733714
Test: m statsd_testdrive & statsd_testdrive 453
      atest WindowMagnificationManagerTest
Change-Id: I994fc2a3ada8a90fde8b3a0b4f1cc8d7ec21638a
Merged-In: I994fc2a3ada8a90fde8b3a0b4f1cc8d7ec21638a
2022-08-19 06:39:59 +00:00
TreeHugger Robot
620e37edb9 Merge "Logs the activated session duration for magnification. (1/2)" into tm-qpr-dev 2022-08-19 00:32:18 +00:00
Daniel Hsieh
5b5226eb81 Logs the activated session duration for magnification. (1/2)
Uses the atom MagnificationTripleTapAndHoldActivatedSessionReported in
westworld to log the activated session duration for the window magnifier
which is triggered by the triple-tap-and-hold gesture.

The duration is from the window magnifier's enabled time to its disabled
time.

Bug: 216733714
Test: atest WindowMagnificationGestureHandlerTest
      m statsd_testdrive & statsd_testdrive 452
Change-Id: I423ac39c167c89b0b2db931a616cdd34d6eb151c
Merged-In: I423ac39c167c89b0b2db931a616cdd34d6eb151c
2022-08-18 18:31:16 +00:00
Fiona Campbell
f73a728509 Add constraints to animation duration scales
Ensure that all uses of ANIMATOR_DURATION_SCALE are bounded between 0
and 20.

Bug: 238178261
Test: adb shell dumpsys window windows | grep "Animation setting"
Change-Id: I1f3797c5cf708f5c02ba8644ea9f703244d229a9
2022-08-18 16:11:39 +00:00
Jernej Virag
3234afdaf3 Merge "Prevent loading of Icon resources from the wrong package" into tm-dev am: e1e8b1b932 am: c4ebf2ba2a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19601344

Change-Id: Ibfc955f61506dc3e4aad8e7b19eeb9b8a91e77dc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 21:03:38 +00:00
Charles Chen
4cce97fd2e Merge "Fix violation in DecorContext" into tm-qpr-dev 2022-08-16 18:51:03 +00:00
Charles Chen
d9bdee7fa0 Fix violation in DecorContext
The issue happens when activity is launched on the secondary
display. It's because the base context of DecorContext is
a DisplayContext, but we should check #isConfigurationContext in
associatd window's Context instead, like DecorContext#isUiContext

fixes: 242571036
Test: manual - launch activity on the secondary display

Merged-In: Ie2659fb31248ad64099018bfebb6a6b43c72f466
Change-Id: Ie2659fb31248ad64099018bfebb6a6b43c72f466
2022-08-16 15:22:49 +00:00
Joanne Chung
9e263e643d Merge "Fix system toolbar doesn't use correct theme." into tm-qpr-dev 2022-08-16 10:00:57 +00:00