Commit Graph

66 Commits

Author SHA1 Message Date
Omar Miatello
26dd863b95 Merge "Add support for Predictive Back in SensorUseStartedActivity" into tm-qpr-dev am: ea07782541 am: 06a74a9126
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20300021

Change-Id: I8a9de3e3fc54d654e654875f154b3712dbdb4051
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 17:26:49 +00:00
omarmt
187a80e4de Add support for Predictive Back in SensorUseStartedActivity
Test: atest SensorUseStartedActivityTest
Bug: 255923586
Change-Id: I1b675c7ab59730b82dfb2b4d43234b783d4a76fc
2022-11-18 11:10:36 +00:00
Alejandro Nijamkin
04777dbab2 Content provider for quick affordances.
This is the content provider that wallpaper picker will be using to
query for slots, affordances, and selections, and for setting or
unsetting selections.

Fix: 254857637
Test: Manually verified the API by
issuing adb shell content commands and seeing affordances appear and
disappear on the actual lock screen.

Change-Id: Ia47a8ee322028042bb3e118ddb82a92a27eae191
Merged-In: Ia47a8ee322028042bb3e118ddb82a92a27eae191
2022-11-14 18:10:22 +00:00
Alejandro Nijamkin
c6c5ae9594 Content provider for quick affordances.
This is the content provider that wallpaper picker will be using to
query for slots, affordances, and selections, and for setting or
unsetting selections.

The CL also includes a contract definition and "client" utility
functions that any customer can use to query and update the content
provider.

Fix: 254857637
Test: end-to-end unit tests included. Manually verified the API by
issuing adb shell content commands and seeing affordances appear and
disappear on the actual lock screen.

Change-Id: Ia47a8ee322028042bb3e118ddb82a92a27eae191
2022-11-11 00:15:55 +00:00
Rahul Banerjee
9873e79ec7 Merge "Migrate Controls{ProviderSelector,Favoriting,Editing}Activities" into tm-qpr-dev am: 10861bf19d am: 23bc5e6bcb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20342393

Change-Id: I3d5aec2c028bbf5cd7a4015400ca2f667aae1e9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-09 01:35:07 +00:00
Rahul Banerjee
10861bf19d Merge "Migrate Controls{ProviderSelector,Favoriting,Editing}Activities" into tm-qpr-dev 2022-11-09 01:08:55 +00:00
Rahul Banerjee
326c2507ed Migrate Controls{ProviderSelector,Favoriting,Editing}Activities
This moves the activities to the new Predictive Back dispatch mechanism.
Added unit tests for each (note: used a latch to synchronize the test and ui threads)

Bug: 255355028
Test: Passed atest <testname>
Change-Id: I775f636f8679abfd50a595dd56fb8fa3f23e0fef
2022-11-08 11:04:41 -08:00
Omar Miatello
62c75293ae Merge "Add support for Predictive Back in CreateUserActivity" into tm-qpr-dev am: 78b5de4a42 am: bfb8c6855a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20257566

Change-Id: I8996821b473012fda827bbebdcebf34f9a997c33
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-05 09:46:06 +00:00
omarmt
d1c43eaa15 Add support for Predictive Back in CreateUserActivity
Test: atest CreateUserActivityTest
Bug: 254840316
Change-Id: I9d00c114ae38e72f11678dab93d3feaf222463d1
2022-11-04 15:56:02 +00:00
Fabian Kozynski
ebb353762a Merge "Add exclusion rect to the BrightnessDialog slider" into tm-qpr-dev am: 513d000b0b am: 6561288fc2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20211485

Change-Id: Ib1d6562c35e8fd8d6f310df03054366be11093fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-24 20:23:24 +00:00
Fabian Kozynski
eb36215d41 Add exclusion rect to the BrightnessDialog slider
This prevents drags that are close to the screen from triggering back
gesture. It includes the horizontal margin to give some room for
starting the drag slightly outside of the view.

Fixes: 247049806
Test: manual: small and large screen
Test: atest BrightnessDialogTest
Change-Id: I0a206eda72f6eb15a5d887f01b468a8ceba15d1f
2022-10-21 14:48:12 -04:00
Songchun Fan
dd6029b7e6 [test] fix SystemUITests
Non-data apps that have a sharedUserId shared with a privileged app and
use privileged permissions need to testOnly.

BUG: 236173905
Fixes: 243736722
BUG: 243736722
Test: atest SystemUITests
Change-Id: I466b4c305fc0882e036298840c04601747882b18
2022-08-25 11:24:51 -07:00
Rahul Banerjee
1dde50349e Migrate GlobalActionsDialogLite to predictive back
As part of the effort to rollout Predictive Back, the old
"just in time" back handlers need to be migrated over to the new
"ahead of time" api (before any animation/feedback can be added).

This is the first change in this API migration, with more to come.

This also adds tests for GlobalActionsDialogLite.

Bug: 238358031
Test: atest GlobalActionsDialogLiteTest
Change-Id: Id8ee4ec97e34e6de63659d30784384e7c9ef9590
2022-08-19 11:07:40 -07:00
Alan Viverette
e9c01cf1ae Update manifest to account for new startup library
Change-Id: Ia896ab92921807a343482c080f8e45b117596ba2
2021-08-25 17:09:56 +00:00
Milton Wu
9a03ae1184 Add non-system overlay flag for usb perm dialog
Add private flag SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS for
UsbPermissionActivity.

With this flag, UsbPermissionActivity will not been overlapped with
views which are displayed on system alert window

Bug: 183610267
Test: atest UsbPermissionActivityTest#testHideNonSystemOverlay
Test: check the window private flag of UsbPermissionActivity contains
      SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS or not.
Change-Id: I0863ff347ac3c2300f0dc649a630f55473ee180a
2021-08-09 09:04:38 +00:00
Tony Huang
eb01a25c87 Migrate Bubbles to wm-shell (5/n)
Move bubbles package and related resources to shell package,
also copied some used codes and resources.

Bug: 161980186
Test: atest SystemUITests
Test: atest WMShellUnitTests
Change-Id: Ia108bd4149b3c3bf86631ba1a7a6bce0e76af78f
2020-11-04 11:01:56 +08:00
Louis Chang
5510ecdfa9 Deprecate MANAGE_ACTIVITY_STACKS permission
Adding MANAGE_ACTIVITY_TASKS permission as the replacement, but
still grant the deprecated MANAGE_ACTIVITY_STACKS permission for
app compatibility.

Bug: 157876448
Test: presubmit

Change-Id: I894ee66e058b1024a731d3be4b33b69626451f08
2020-10-28 09:20:00 +08:00
TreeHugger Robot
bcfbdd28e5 Merge "Launch Panic gesture from SysUI" 2020-10-14 22:15:15 +00:00
Matthew Fritze
9394bd84bd Launch Panic gesture from SysUI
- Add StatusBar interface for launching panic gesture
- Add basic method to launch the panic gesture in sysui
- Swap call to launch telephony to launching eshare intent

Tested in Pixel 3a using the Settings Panel intent (since it resolves)
and found that it does indeed launch ontop of the camera (see
screenshot) and turns off the screen. These can be fixed in a later CL.

Screenshot: https://screenshot.googleplex.com/8KKEEXbyBLkJssy

Test: atest StatusBarTest GestureLauncherServiceTest CommandQueueTest
Bug: 169087010
Change-Id: I9efccffd06edbf37c15ea92ef5935ab7091a7f80
2020-10-14 12:33:43 -07:00
Mark Renouf
7d8968bc0d Adds scroll capture support for RecyclerView
Test: atest RecyclerViewCaptureHelperTest

Change-Id: I2480a6761daf6e874703e8aab414edbbe8558c06
2020-10-09 15:10:56 -04:00
Mark Renouf
1252d0bc3c Fix missing null check in collectRootScrollCaptureTargets
If no window-level handlers have been added, the list is null
(lazily init).

Test: atest com.android.systemui.screenshot.ScrollCaptureTest

Change-Id: I39d4295cebb091fa89f65c5917ba08bc2396ed37
2020-08-20 00:55:29 +00:00
TreeHugger Robot
98f93f4532 Merge "Fix component in ControlsRequestDialog" into rvc-dev am: 12927d9214 am: 4c139797af am: d180ec3eef am: f4c319c770
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12004851

Change-Id: I9450119baaab2ba70b7e42d626ea631abfee3b7f
2020-06-27 03:14:03 +00:00
Fabian Kozynski
ba8f22d60e Fix component in ControlsRequestDialog
It was using the wrong component name (the one from the Activity)
instead of the service one.

Test: manual, with apk
Test: atest ControlsRequestDialogTest
Fixes: 159951190
Change-Id: I99b2cee91aed0079e86ab50e7c0153ebac86e05b
2020-06-26 14:53:09 -04:00
Adrian Roos
51178b7a6b Merge "GlobalActions: Disable IME focusability" into rvc-dev am: 4869550555 am: a44bbba4d9 am: 2f59f928ca am: 72c5146b29
Change-Id: I5a64c6745c56c83de9bf7f7fd4067ecbff057e52
2020-05-11 14:51:12 +00:00
Adrian Roos
284b32dc32 GlobalActions: Disable IME focusability
GlobalActions is a frequent path to take bugreports; this prevents
it from acquiring the IME focus, which destroys the IME state and
makes IME-related bugreports frequently useless.

Fixes: 156071729
Test: atest GlobalActionsImeTest
Test: Click any text field, long-press power, verify keyboard is still open (behind the power menu)
Change-Id: I396006f3e240c9e410dfa0dab60508d9e2a5ef5d
2020-05-08 18:55:35 +02:00
Ashwini Oruganti
c2df8deeb1 SystemUI: Add an exported flag in manifest
With b/150232615, we will need an explicit value set for the exported
flag when intent filters are present, as the default behavior is
changing for S+. This change adds the value reflecting the previous
default to the manifest.

Bug: 150232615
Test: TH
Change-Id: Ic7b6a56a1a258b5995cc97c3e690c2cf203a77d8
2020-03-10 14:20:54 -07:00
Sunny Goyal
eb18d3986f Separating packageName from the AndroidManifest
Test: Verified everything builds
Change-Id: Icd425e004d8420b8c7a5d221ef98ffbc22723f04
2020-02-20 03:07:52 +00:00
Automerger Merge Worker
2a7b367d06 Merge "Replace CONNECTIVITY_INTERNAL in SystemUI" am: 3950a24dca am: 8d82c3cbd9 am: 8e92458626
Change-Id: Id94e38dafad3dd6a5316c53ba357a8004a7d7b9e
2020-01-16 07:58:53 +00:00
paulhu
ceb5a89284 Replace CONNECTIVITY_INTERNAL in SystemUI
Since CONNECTIVITY_INTERNAL has been deprecated from Android R
and replace by other permissions. Change CONNECTIVITY_INTERNAL to
another proper peremission.

Bug: 32963470
Test: atest SystemUITests
Change-Id: Ibdaee8c3c06caa3aaf6944d4b258cb5b1d078179
2019-12-10 15:56:18 +08:00
Colin Cross
86952a4819 Set android:largeheap="true" SystemUITests
SystemUITests seems to have multiple leaks, causing it to OOM.  Give
it a larger heap to fix presubmit.

Bug: 135715570
Test: atest SystemUITests
Change-Id: I45598fa2d6239dbcbd2a9f68237849ca0d0a0efe
2019-06-21 23:25:38 -07:00
Mark Renouf
a9fbb6ed90 Adds a valid Activity target for Bubble metadata
Test: atest BubbleControllerTest
Bug: 123631037
Change-Id: Ied0e686febd2d1a7478e84faade958e187db0ef7
2019-02-14 14:10:06 -05:00
Lucas Dupin
7c6ca76793 Allow protected broadcasts in tests
SysUI must send protected broadcasts to avoid system impersonation.
Our tests should also allow these types of broadcasts, otherwise
they will be dropped/skipped on -user builds and functionality
will be broken.

This CL also protects the flashlight broadcast.

Fixes: 110825884
Test: atest com.android.systemui.qs.external.TileServicesTest
Change-Id: I5a3dfc569c1695366e5f0e48cda8a7a32e287e7d
2018-09-14 17:18:54 +00:00
Jason Monk
ae7ced2f95 First kotlin
Convert one class to kotlin and provide a slight amount of guidance.

Test: existing tests
Change-Id: Ie8659765b674ac7b2d82ed3d343f387195c07d83
2018-08-23 12:49:08 -04:00
Jason Monk
a2f2d82f26 Convert sysui to bp
Test: tests gonna test, builds gonna build
Change-Id: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
2018-08-16 19:40:39 -04:00
Alison Cichowlas
5f5ad2e627 Add process-lifecycle-owner-initializer to tests.
Bug: 112587252
Test: This is to fix the tests.
Change-Id: I083db4e2eb4efd8d4a914f33ac259aa317e568de
2018-08-14 14:23:49 -04:00
Winson Chung
6b0f1a3d77 Expose DockedStackListener for logging purposes in Launcher
Bug: 111077107
Test: Implement listener in Launcher and verify the callbacks are made

Change-Id: I4017c8e139242c2b0875f8222c99396d55b1be04
Signed-off-by: Winson Chung <winsonc@google.com>
2018-08-03 15:19:36 -07:00
Jason Monk
0b5e52ccd8 Add way to use sysui as a broadcast relay for slices
Test: runtest systemui
Bug: 78139069
Change-Id: I64c4d56cca005cec7204bf45215bb7b0015f4571
2018-04-20 12:36:31 +00:00
Jason Monk
1fc931a38a Switch to inline mockito for a bunch of tests
So we can mock final stuff

Test: The tests
Change-Id: Ia3a47c6655c4b0b9af0aea0ee6f8f6cb9ebaab09
2018-02-18 13:02:25 -05:00
Rohan Shah
e4071127a6 [QS] Add secondary label to Hotspot tile
Added info to callback and leveraged WifiManager API to get the number
of connected devices. There's some minor state cleanup done and the
fire callback mechanism was slightly updated.

The secondary label is updated based on the connected devices & enabled
state.

Screenshot: https://screenshot.googleplex.com/jHMKmg2nO08

Test: manual
Bug:68058038
Change-Id: Iafcebd3476d2c13e25939b45e78f32a5bd24cb68
2018-01-23 15:49:45 -08:00
Julia Reynolds
5daa47270b Update output chooser for calls
- Hide media routes while in call
- Change the title while in call
- Add a title while not in call, too

Bug: 63096355
Test: manual
Change-Id: Ib7bcd314efb010fe903327dd4d9bdbfe521c1f73
2018-01-20 15:29:41 +00:00
Winson Chung
16e185e60b Restore legacy recents package check to unblock quickstep development
- We added a recents component to allow the development of the recents
  activity without exposing more privileged permissions, however, SysUI
  needs to point to the old activity until the new one is ready (it
  already has the existing priveleged permissions).  For the time being,
  restore the original check for the recents package (to be removed
  immediately after we switch SysUI to launch the quickstep overview),
  so that we can both enable the recents component overlay (for
  development) without the existing recents activity going being given
  the wrong activity type (for now both the legacy and new recents
  component will have ACTIVITY_TYPE_RECENTS).
- Add a sysui test to ensure that the current recents activity also has
  the right activity type

Bug: 68774229
Test: com.android.server.am.RecentTasksTest#testRecentsComponentActivityType
Test: com.android.systemui.recents.RecentsTest#testRecentsActivityType

Change-Id: I4bb59efa3507d61ac86c75d3b9c80f2e32d2f7b9
2017-11-07 17:50:29 -08:00
Jason Monk
9c4faa85f1 Fix race condition crash
1 line fix
Lots of lines for test

Test: runtest systemui
Change-Id: I90b006b5d9c02025ecc600c2f10014a96cbf33f8
Fixes: 62573587
2017-08-15 09:32:27 -04:00
Jason Monk
d819c31050 Change default temp threshold to use shutdown temp
Base the temp threshold to be based on the shutdown temp lowered
by some amount to ensure the warning can be seen before a shutdown.

Test: runtest systemui
Change-Id: I033a776e874d76018592954932ed5127e1b228ae
Fixes: 62845934
2017-08-11 14:44:51 -04:00
Lucas Dupin
e17ce5286f Fix jank when switching themes
Turning overlays on and off takes time,
it also doesn't allow us to have fine control
over which view is using which theme.
Lock screen colors are now driven by themes.

Change-Id: Ie8860d00dbb0705ed76edf60a9d3030618dd21ca
Fixes: 63751714
Test: Visual. Set wallpapers, unlock.
Test: runtest -x packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerTest.java
Test: runtest -x tests/Internal/src/com/android/internal/colorextraction/ColorExtractorTest.java
Test: systrace
2017-07-24 13:26:22 -07:00
Jason Monk
b05395f53c Try to work on test flakyness.
- Add bt permission
 - mock more BT stuff
 - Disable test that is causing crash on main thread

Test: runtest systemui
Change-Id: I5cddb71941cce4f9b595c65ef69919186addb6df
Fixes: 63568935
2017-07-11 10:05:03 -04:00
Jason Monk
c429f690e5 Add system to avoid a crash stopping tests from running
Add a system such that when a crash happens on the main thread, it is
delayed until the tests complete, then thrown.

Also mark some old flaky tests as not flaky as they should be good
now.

Test: runtest systemui
Change-Id: Ic18a38daf4a93dab63549d834fa00f295644fbf1
Fixes: 62935720, 62251903, 62529569
2017-06-27 14:48:45 -04:00
Jason Monk
b46a3c9634 Fix ConcurrentModificationException from LocationController
Test: runtest systemui
Change-Id: I0b7db7344217b3b7ad91f315100d1873e8167baf
Fixes: 62859544
2017-06-22 09:32:07 -04:00
Adrian Roos
c1b50324a2 AOD: Add wakelock for charging text while dozing
Also refactors the WakeLocks in SystemUI.

Bug: 30876804
Bug: 35850304
Test: runtest systemui
Change-Id: Ie17eedfd266deb3aa46dabd701bc784330b2e030
2017-03-09 14:31:24 -08:00
Jason Monk
aa573e9e86 Work on separating out the status bar management
Lots of stuff:
 - Make StatusBarIconController be a permanent dependency
 - Break out dark stuff into DarkIconDispatcher
 - Create StatusBarFragment
   - This bit is a bit ugly for now, but will be better later
 - Other stuff probably

Test: runtest systemui
Change-Id: I4973bc9f944e66af92731bf1edd2b39657f1782f
2017-02-08 19:51:41 -05:00
Jason Monk
de850bbcaa Fix leaks in sysui
Add support for testing for PluginManager and TunerService leaks
and add tests for the known leaks and fix them. Also port PluginManager
and TunerService to Dependency to make them easier to handle in
tests.

Test: runtest systemui
Change-Id: I5642539ee24dd72f802905106decd0c87b41b4eb
Fixes: 34846972
2017-02-02 10:58:18 -05:00