Commit Graph

18869 Commits

Author SHA1 Message Date
Sihua Ma
3efbb0d3b6 Add API in AppWidgetServiceImpl
A new function is created to notify the service of inheritance
information of the widget provider.

Test: N/A
Bug: 221890505
Change-Id: I5f43f8d6ecd66b54869bef58898b1d3809b43d9e
(cherry picked from commit 0b51675e56)
Merged-In: I5f43f8d6ecd66b54869bef58898b1d3809b43d9e
2022-10-26 22:02:47 +00:00
Riddle Hsu
b553c74619 Merge "Only set locale in config for updating locale" into tm-qpr-dev 2022-10-25 13:07:32 +00:00
TreeHugger Robot
ea523a0c22 Merge "Fix labels loading regression" into tm-qpr-dev 2022-10-22 12:11:12 +00:00
Fabian Kozynski
f50de68685 Merge "Proto dump from SystemUI." into tm-qpr-dev 2022-10-21 19:22:55 +00:00
Sihua Ma
d776e8d5b3 Merge "Add function to AppWidgetService for updating widget visibility" into tm-qpr-dev 2022-10-21 17:57:07 +00:00
Andrey Epin
814b4dd00c Fix labels loading regression
DisplayResolveInfo#getDisplayLabel() internally loads the display label
if it is missing and a ResolveInfoPresentationGetter is set for the
instance.
Current view binding logic unconditionally calls getDisplayLabel method
which could trigger label resolution on the main thread and a
consequently scheduled label loading asynchronous task a no-op.

Test: manual functionality testing
Test: introduce artificial into LoadLabelTask, observe labels lading
asynchronously and does not reload when scrolling through a long list
of options.
Test: atest FrameworksCoreTests:ResolverActivityTest
Bug: 245934835

Change-Id: I392d6c8424617820bde58887d92ae99bc39c5b7b
2022-10-21 08:02:37 -07:00
TreeHugger Robot
686f5b9cb2 Merge "Fixing system language is not in all languages" into tm-qpr-dev 2022-10-21 11:02:16 +00:00
Sihua Ma
45b60acb7b Add function to AppWidgetService for updating widget visibility
Currently, when the widget host stops listening to the widget updates,
the callback will be set to null and the updates to the widget will be
stashed on the service side. Additionally, the visibility of the widget
will be changed. For an upcoming change to the launcher side, a function
that only changes the visibility should be added.

Test: N/A
Bug: 235358918
Change-Id: I9a0f244ca76b378d9c337e0a364bca5955f5ae96
2022-10-20 20:25:03 +00:00
Fabian Kozynski
afa802a889 Proto dump from SystemUI.
Needs to be called by doing `adb shell dumpsys statusbar --proto`
because using `dumpsys activity service` adds text to the dump.

Will also be dumped as part of the BR

Test: atest SystemUITests
Test: Used in CTS
Test: manual dump and BR
Fixes 237786667

Change-Id: I74abf65a76c059ea9bb5a14728192b6b683b7fc7
2022-10-20 14:25:24 -04:00
TreeHugger Robot
259321ee9a Merge "Add CUJ_RECENTS_SCROLLING" into tm-qpr-dev 2022-10-20 16:35:49 +00:00
Riddle Hsu
03f0f57e6b Only set locale in config for updating locale
To update locale, it doesn't need a full configuration because
system only applied the diff of config from non-undefined fields.

IActivityManager#getConfiguration actually gets the configuration
according to the pid, which is process configuration. And process
configuration can be overridden by the activity running in its
process. So the returned value shouldn't be used to update the
system persistent configuration.

Therefore it is enough to use a new Configuration instance with
setting the necessary fields. This is also more efficient that
saves a binder call to system.

Bug: 253386061
Test: atest LocaleManagerTests
Change-Id: Icdce437fcf1a3bef0562cfc4dd5ad3ba52ea08ef
2022-10-20 14:41:47 +00:00
Nicolo' Mazzucato
c75bae06cc Add CUJ_RECENTS_SCROLLING
This adds Jank instrumentation every time recent tasks are scrolled.

Bug: 231130484
Bug: 228969045
Test: recorded prefetto trace while scrolling
Change-Id: I48201e73d7025ec2ff38c7f9158eec27ed9cbafa
2022-10-19 14:25:11 +00:00
Calvin Pan
c41d594efe Fixing system language is not in all languages
- Seperate System language and app language logic to different
  controller

- Fixing system langauge only show in suggested langage and not show in
  all languages.

Bug: 228596568
Test: set system/app languages
Change-Id: I3b7ab0a78a77a71794dfd4a59c807637fb7b912d
Merged-In: I3b7ab0a78a77a71794dfd4a59c807637fb7b912d
2022-10-19 03:47:31 +00:00
Michael Wachenschwanz
c3ea7bd98c Merge "Rate limit BatteryStats' ModemActivityInfo querying" into tm-qpr-dev 2022-10-18 23:21:53 +00:00
Michael Wachenschwanz
9c841db321 Rate limit BatteryStats' ModemActivityInfo querying
Frequent mobile radio power state changes results in frequent
ModemActivityInfo queries. To limit the unnecessary churn, a Modem
update due to mobile radio power state change will only occur some
amount of time after the previous update. Modem updates due to other
signals (plug/unplug events, battery percent change, etc) will be
unaffected.

Fixes: 239715259
Test: atest BatteryStatsNoteTest
Merged-In: Ie0af28dbc2ad4836ef6437c0656dc20eec2285ea
Change-Id: Ib3ee18113ac381b8912bb58974b5d41ceefb7131
2022-10-18 13:49:35 -07:00
Shan Huang
a24bed9f38 Merge "Add AndroidX SpringAnimation library to core." into tm-qpr-dev 2022-10-18 01:06:42 +00:00
Shan Huang
80c44686c2 Add AndroidX SpringAnimation library to core.
This allows core libraries (such as predictive back progress animation)
to use spring animation.

Files in androidx/dynamicanimation/animation that are not copied over:

FlingAnimation.java - Unused atm
AnimationHandler.java - Replaced with the framework AnimationHandler
FloatPropertyCompat.java - Replaced with FloatProperty
FrameCallbackScheduler.java - Unused in framework AnimationHandler

Test: m -j
Bug: 238475284
Change-Id: Ifdf847da0aa2a6cf57e18f9ac7c91bb0fe3b12c2
2022-10-17 20:45:41 +00:00
Andrey Epin
087c3d1918 Merge "Load direct-share icons asynchronously" into tm-qpr-dev 2022-10-13 20:50:28 +00:00
Andrey Epin
adad5c91bd Merge "Fix Resolver dragging animation" into tm-qpr-dev 2022-10-12 17:07:20 +00:00
TreeHugger Robot
2ab63d23d3 Merge "Update DreamService -> DreamOverlayService connection to handle crashes" into tm-qpr-dev 2022-10-12 14:53:54 +00:00
Lucas Silva
7bbcdc1c01 Update DreamService -> DreamOverlayService connection to handle crashes
This change implements PersistentServiceConnection and
ObservableServiceConnection helper classes in framework for better
handling of crashes.

Fixes: 247103878
Test: manually by crashing systemui using adb while dreaming and
verifying that the overlay is visible
Test: atest com.android.internal.util.PersistentServiceConnectionTest
Test: atest com.android.internal.util.ObservableServiceConnectionTest

Change-Id: Ib9a7e8675e408c1724567335a3c186fe5c9f5f59
Merged-In: Ib9a7e8675e408c1724567335a3c186fe5c9f5f59
2022-10-11 13:37:59 +00:00
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
Andrey Epin
a54f0d13a6 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, artificially
delaying image loading, debug logging for potential event loops.
Test: atest ChooserListAdapterTest
Fix: 215699869
Change-Id: I97e3383a74bb4ef795099fe55cae9fc5aed2b790

Change-Id: I3b110447d4cf2ab94e663c2684cd2cce4968d4ca
2022-10-06 14:42:05 -07: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
Andrey Epin
2e1805e892 Fix Resolver dragging animation
Adds a new ResolverDrawerLayout XML property, ignoreOffsetTopLimit, that
takes a direct child view’s id. The specified view will serve as a top
limit for all child views below it with layout_ignoreOffset attribute
set to true i.e. they will be pushed down by the view when the drawer
is moving.

Fix: 240481385
Test: atest FrameworksCoreTests:ResolverActivityTest
Test: atest FrameworksCoreTests:ChooserActivityTest
Test: Manual testing with some injected code that simulates various
conditions:
  * various property values or property absence
  * simultaneous layout and drawer moving
  * one-time layout while an "ignoreOffset" view has been moved out of
    place with a consequent release.

Change-Id: Ib9aa4f11d35c2dede06b0913091e7b146438e57e
2022-10-03 17:21:29 -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