Commit Graph

18887 Commits

Author SHA1 Message Date
Kenneth Ford
b8bb4dd906 Add rear display dialog methods to CommandQueue and StatusBarService
Creates new methods through CommandQueue and StatusBarService
to allow DeviceStateManagerService to notify SystemUI
to show the rear display education dialog

Bug: 207686851
Test: CommandQueueTest
Change-Id: I65e22a9940a866bb62b597f5cd4f6ce81d891e12
Merged-In: I65e22a9940a866bb62b597f5cd4f6ce81d891e12
2022-11-22 17:47:40 +00:00
Miranda Kephart
fb435f4376 Merge "Add device config flag to ignore clipboard source package" into tm-qpr-dev 2022-11-17 22:17:04 +00:00
Miranda Kephart
81a533d0a1 Add device config flag to ignore clipboard source package
Allows testing of remote copy clipboard UI without going through
Nearby. Effectively guarded by the CLIPBOARD_REMOTE_BEHAVIOR flag as
the isRemoteCopy method will only be run if that flag is enabled.

Bug: 246808749
Test: manual, using Clipboard Spammer app
Change-Id: I2a90709e61489d6ff5ae418b21d928c628320721
2022-11-17 15:40:21 +00:00
TreeHugger Robot
858e21b54f Merge "Extract getIntentUser function in ResolverActivity" into tm-qpr-dev 2022-11-17 12:02:31 +00:00
Nick Chameyev
4cc313e0aa Extract getIntentUser function in ResolverActivity
This should resolve conflicts with master.

Bug: 233348916
Test: presubmit
Change-Id: If5bf5c73441dc9c54822d0c2b36f16b11ea892ec
Merged-In: If5bf5c73441dc9c54822d0c2b36f16b11ea892ec
2022-11-16 17:00:16 +00:00
Jorge Gil
5a95db047e Add WCT#setDragResizing to optimize fluid resizing
Allows WM Shell to indicate the start/end of drag resizing, which
core can use as a signal to reuse a single (larger) surface size
for the entire drag resize operation to avoid continuous buffer
allocations after each size change.

Bug: 249808500
Test: drag resize a freeform window, verify WindowLayout requests
a fullscreen sized surface; atest TaskPositionerTest

Change-Id: I27e2b44270d7ea4f701fa8037f93b20dc691284b
2022-11-11 00:48:49 +00:00
TreeHugger Robot
d825147525 Merge "Add CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS" into tm-qpr-dev 2022-11-09 12:27:24 +00:00
TreeHugger Robot
36e32b3884 Merge "Enable a shortcut selection test." into tm-qpr-dev 2022-11-09 00:35:50 +00:00
Nicolo' Mazzucato
b649e5d34c Add CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS
Bug: 231130484
Bug: 228969045
Test: recorded prefetto trace while going to recents
Change-Id: I5819894196839af962010b66178e45abad516f0f
2022-11-07 16:52:40 +00:00
Joanne
908ee5ed9d Dump App exit reason if the remote service died.
We received many bugs the ContentCaptureService entered zombie
state but we don't know the reason why the process died. The issue
timing didn't be captured in bugreport.

Currently, the AbstractRemoteService will enter an odd state if the
service cannot be reconnected. This state does not allow the requests
be sent until the service be reconnected again on an unknown timing.
In some cases, it is expected the service will not be reconnected.
e.g. app stop from settings. We should fix the problem in the
AbstractRemoteService but before doing this, we try to add debugging
signal in bugreport to help us understand if the existing issues come
from this odd state for reasonable reasons.

The change was merged in master so skip automerge. The minor change
here will have a seperate change in master.

Bug: 248218072
Bug: 250859760
Test: disable app and dumpsys content_capture
Change-Id: Ia33462006a3925754001562b0d80540b9b0bc45d
Merged-in: Ia33462006a3925754001562b0d80540b9b0bc45d
(cherry picked from commit d060ed5697)
2022-11-07 12:40:48 +00:00
TreeHugger Robot
b67434ebea Merge "Ignore onPostListReady call if the activity has been destroyed" into tm-qpr-dev 2022-11-03 23:20:05 +00:00
Behnam Heydarshahi
dd4b1a0d7d Merge "Add flag to separate notification audio and ui" into tm-qpr-dev 2022-11-03 15:57:35 +00:00
TreeHugger Robot
d35150f907 Merge "Inform Assistant visible activity when the stage of activity lifecycle is invoked." into tm-qpr-dev 2022-11-03 04:11:11 +00:00
Peter Li
eedc06b463 Inform Assistant visible activity when the stage of activity lifecycle is invoked.
By the original design, we register the activity event in the
ActivityManagerService. After getting the activity event, we will
query current visible activities and report them to Assistant.
Assistant will start to get direct actions of those visible
activities. But sometimes they can not get the direct actions
due to the stage of activity lifecycle before onStart().

We change the logic to make sure that the stage of visible
activity that we reported to the Assistant is after onStart().

Bug: 235296082
Test: atest VoiceInteractionSessionVisibleActivityTest
Test: atest android.app.activity.ActivityThreadClientTest
Test: atest android.view.DisplayTest
Test: atest android.window.ConfigurationHelperTest
Test: atest android.window.SizeConfigurationBucketsTest
Change-Id: Ie439ff3706dab35e875c1eb995a67fa73aec4d76
(cherry picked from commit 29bb3a3428)
Merged-In: Ie439ff3706dab35e875c1eb995a67fa73aec4d76
2022-11-01 09:19:51 +00:00
Sihua Ma
1037ad0c30 Combining widget broadcasts
Combining broadcasts WIDGET_ENABLED and WIDGET_UPDATE into
WIDGET_ENABLE_AND_UPDATE to reduce response time at boot time

Test: Manually verified that some app widgets would function properly
Fix: 221890505
Change-Id: I6aff0f00464ec8628d2258d0d84dcd3c82258d57
(cherry picked from commit 1ae08fe75e)
Merged-In: I6aff0f00464ec8628d2258d0d84dcd3c82258d57
2022-10-31 20:47:38 +00:00
Andrey Epin
64714a02b2 Ignore onPostListReady call if the activity has been destroyed
ResolverActivity#onPostListReady is called asynchronously on the main
thread and it is possible for it to be executed after activity’s
onDestroy call.
A check for activity’s status is added to the method.

Test: atest FrameworksCoreTests:ChooserActivityTest
Fix: 254787909
Change-Id: I96d98a03d86881845868a67e33ea8ee7c9dc6631
2022-10-31 13:16:18 -07:00
Behnam Heydarshahi
b206e0b6a2 Add flag to separate notification audio and ui
AudioService and SeekBarVolumizer now read a flag instead of a config
boolean, when trying to determine if notification stream is separate
from ring.

Remove the now unused config & symbol for ring/notif stream alias

Bug: b/38477228

Test: atest AudioServiceTest#testRingNotifAlias

Change-Id: I1ee08c78984d3841711f88fcec360c936da00090
2022-10-28 21:26:41 +00:00
Andrey Epin
80f88eb6f0 Enable a shortcut selection test.
Enable ChooserActivity test that involves clicking on a shortcut.
A test can specify a new test override,
ChooserActivityOverrideData#directShareTargets lambda, that would return
a pair of a shortcut type and a collection of shortcuts, that would be
treated by the test activity as an output of the shotcut loading logic.

Bug: 215699869
Test: atest FrameworksCoreTests:ChooserActivityTest
Change-Id: I55da648585bd26374ede30dd5b45ed4af81d688e
2022-10-26 15:47:56 -07:00
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