Commit Graph

58 Commits

Author SHA1 Message Date
TreeHugger Robot 59ebc0c3c9 Merge "Add ALLOW_SLIPPERY_TOUCHES to make StatusBarTouchController slippery" into sc-dev am: c0231f8d0f am: f58691ae42
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16444734

Change-Id: Idd834fc5a587e2cdb3425612514efe54ece792cc
2021-12-23 07:15:54 +00:00
TreeHugger Robot f58691ae42 Merge "Add ALLOW_SLIPPERY_TOUCHES to make StatusBarTouchController slippery" into sc-dev am: c0231f8d0f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16444734

Change-Id: I405e4c79cc91ccbeb0472870ad1395eccaa8b64b
2021-12-23 06:55:10 +00:00
Siarhei Vishniakou 81ff81227e Add ALLOW_SLIPPERY_TOUCHES to make StatusBarTouchController slippery
LauncherActivity uses FLAG_SLIPPERY for certain interactions. For
example, when home screen is shown, and the user pulls down from not the
top of the screen, and notification shade is getting displayed, then the
touch should be getting transferred to the NotificationShade using
FLAG_SLIPPERY.

The newly introduced permission is added to launcher in order for this
flag to be applied to the window.

Bug: 206188649
Bug: 157929241
Test: reviewed logs, ensure that NexusLauncherActivity has FLAG_SLIPPERY
Test: re-ran the performance regression test
Change-Id: I8d05fa3663687b5382a59b0d47cdac404844c3b7
2021-12-12 06:22:08 +00:00
Nick Chameyev c52ec89e1b Add WRITE_SECURE_SETTINGS permission to Launcher
We reused a code that handles rotation suggestion button
from SysUI in Launcher. It requires WRITE_SECURE_SETTINGS
permission to write how many times we have shown this button
to show ripple only the first 3 times.
AOSP Launcher didn't have this permission and it was crashing.

Bug: 205491152
Test: tap on rotation suggestion button when in AOSP launcher
Change-Id: I216abb86d43cc505aec1ff581c1f332ae3ad0db4
2021-11-29 12:21:35 +00:00
Alex Chau 84fe75d72e Make Launcher activity restart on density change
- Launcher used to restart when density changes before http://ag/14234761, which added smallestScreenSize and density in configChange
- http://ag/14234761 aims to avoid restart when switching display in split dispalys, for which only size changes, therefore density is unnecessary in configChange
- Keeping density in configChange make Launcher acitvity to stay after changing display size, making all buttons stays in old size in previous denstiy, which is a bug

Bug: 204157738
Test: manual
Change-Id: Ib85326078c67c35d90dc5e9ae5c20eeb5286a610
2021-11-04 11:33:16 +00:00
Schneider Victor-tulias ab60c1fc6e Update gesture navigation tutorial for foldable devices.
- Updated mock conversation layout to work on large devices.
- Added AnimatedTaskView helper view to animate previous task view.
- Added animation from single previous app to two peaking previous apps.
- Updated app orientation to work with larger screens (forced protrait was causing letterboxing).

Test: manual, tested tutorial on non-foldable device, foldable device (closed, opened in landscape, opened in portait and switching between the three)
Bug: 198434693
Bug: 187701213
Known issue: 200579260

Change-Id: I98cb269f7d25985989cf66e791bf535228ab5293
2021-09-27 19:55:53 +00:00
Andy Wickham 13c3f31a0d Makes All Set layout more responsive.
- No longer forced portrait mode
 - Bottom texts are aligned proportionally to the screen height
   to avoid overlapping in landscape folded
 - Subtitle text width is limited to force wrapping to avoid an
   awkward line of text on wider screens

Fix: 189896987
Bug: 187701213
Test: Manually went between portrait/landscape/folded/unfolded.
Change-Id: Ibb2bbe545cf7f154ad77e10d574e72f8d9110a72
2021-09-23 23:11:59 +00:00
y ac68842059 Remove HotseatEduActivity from AOSP
Bug: 191882450
Test: manual
Change-Id: Ic60ef6fec6c3d8162cb3d11b0ed3c9f89f6b5704
2021-09-02 18:18:59 +00:00
y 0115d73890 Remove HotseatEduActivity from AOSP
Bug: 191882450
Test: manual
Change-Id: Ic60ef6fec6c3d8162cb3d11b0ed3c9f89f6b5704
2021-09-01 16:59:47 -07:00
Sunny Goyal 50f43df36e Merge "AllSet page fixes" into sc-dev 2021-06-30 04:31:34 +00:00
Sunny Goyal ce50b9ed83 AllSet page fixes
> Updating background color
> Updating activity theme to not be transparent
> Updating default accent color
> Adding an accessible target to exit

Bug: 190447132
Bug: 190136972
Bug: 190454597
Test: Manual
Change-Id: Ia8ef67ed429c062a8d1109d7f444343ec4ca09cf
2021-06-29 16:32:37 -07:00
Schneider Victor-tulias e6b93993d1 Update Gesture navigation tutorial activity permissions
Temporarily removed REBOOT permission requirement from GESTURE_SANDBOX.

Fixes: 188035141
Test: manual
Change-Id: I11788d7c6dd5a7b10e8cc4400b17f5f2fec967f7
2021-06-23 13:08:21 -07:00
Alex Chau a02eddc144 Handle config changes in Launcher
- This is practically a revert to http://ag/c/13687966/5 and refactored to use DisplayController.DisplayInfoChangeListener
- Make Launcher handle size and density change so transition is less janky when screen size changes
- Added fix in RecentsView to update state and TaskView when display profile changes
- Removed 720dp specific resoureces
- Removed unused widget_section_indent
- Removed unnecessary all_apps_background_canvas 600dp override that is not needed in AllApps+
- Moved remaining dp specific into DeviceProfile
- Simplified allowRotation logic to use single variable in DeviceProfile to determine if allow rotation is enabled by default

Fixes: 180803696
Test: manual
Change-Id: Iea0a7d1a0e14dc3613152dd3b3887450a2e1fc2f
2021-05-10 18:50:02 +01:00
Andy Wickham 474c616e98 Adds AllSetActivity in Launcher.
Mostly copied from its location in Tips.

Some exceptions:
 - Accent color (used for the icon at the top and link text)
   is derived from intent extras to match the rest of SUW.
   If needed, we could also pass other colors this way;
   currently they just use default light/dark mode colors.
 - Currently there is no animation in the middle. Not sure
   if one is expected, but we can add it later if so.

Bug: 184722307
Test: Manually passing arbitrary colors via adb:
adb shell am start -a com.android.quickstep.action.GESTURE_ONBOARDING_ALL_SET --ei accent_color_dark_mode -2134901760 --ei accent_color_light_mode 2147418112

Change-Id: I1fb8b20b88b7485d28f06afd2b421999ad847266
2021-05-04 18:44:22 -07:00
Sunny Goyal 4ed0fb5074 Removing dependency on wallpaper colors and using theme resources
Bug: 184676715
Test: Manual
Change-Id: Ie9a9a784c4a8a8cd484bfd8ea463deedcd4deed6
2021-04-27 16:29:08 -07:00
Alex Chau 8c575c378e Remove smallestScreenSize from configChanges
- Remove smallestScreenSize so Launcher activity restarts when screen size changes to pick up new smallestSize dependent values e.g. R.bool.allow_rotation

Bug: 180803696
Test: Ensure rotation preference is respected when switching between large and small screen

Change-Id: I58f856a97effa8e35236d013300181c5d332b25a
2021-03-01 12:20:26 +00:00
Sunny Goyal 52b5a4d8bc Registering input monitor in Launcher process
This prevents SystemUI from getting ANR when it's Launcher's fault

Bug: 177556238
Test: Verified apk on device
Change-Id: I101a7e90e43f88f58f715620d71047d5b6a3486c
2021-02-08 15:01:50 -08:00
Tony Wickham 63fc59b801 Use SYSTEM_APPLICATION_OVERLAY instead of SYSTEM_ALERT_WINDOW for Taskbar
Test: Taskbar still shows up and works, can't hide it from Settings
Bug: 169054709
Change-Id: I0d2f9be8a0af2242472d8406bbc31a6aecaa9285
2021-02-04 10:07:59 -08:00
Sunny Goyal f72c368017 Adding quickstep specific permissions to Launcher
Bug: 177096054
Test: Manual
Change-Id: Ife5d7c8207e70e4b184b18fcfe71548ec9616dd4
2021-01-27 17:21:12 +00:00
Tony Wickham f26e90aa35 Add empty Taskbar views and initial TaskbarController
Guarded by a FeatureFlag.

Bug: 171917176
Change-Id: I7145c7ae68282bf53552502798fe758c8c0e285d
2021-01-22 15:39:46 -08:00
Bernardo Rufino e0484de39a Add BROADCAST_CLOSE_SYSTEM_DIALOGS to recents package
It uses AM.closeSystemDialogs() and should have the permission. I had
created the protection level in ag/13090697 but forgot to actually
request the permission.

Bug: 177228919
Bug: 159105552
Test: atest CloseSystemDialogsTest
Test: atest android.server.wm.WindowMetricsActivityTests#testMetricsMatchesLayoutOnActivityOnCreate
Change-Id: I661dac17f2160ed36adb1a193e739c200169a37d
2021-01-11 19:25:24 +00:00
Winson Chung ff6d94dd92 DO NOT MERGE Revert "Handle uiMode changes"
Bug: 171707437
Test: Repro steps on bug

This reverts commit 0ad7b172e6.

Change-Id: If30cbb6c155e879dc8307a0a4a06dfb548b389a1
(cherry picked from commit 4b4341d3a7)
2020-12-09 07:33:40 +00:00
Winson Chung 0c2b05947e Handle uiMode changes
- Launcher already dedupes if there are no theme changes

Bug: 148988542
Test: adb shell cmd uimode car yes/no, adb shell cmd uimode night yes/no
Change-Id: Ia83f02d18a0433c8be59d1f488e58b38476ba5ff
2020-07-21 17:20:53 +00:00
Rajeev Kumar b6354114ba Add explicit android:exported="true" declarations
We add this for GestureSandboxActivity and
com.android.launcher3.uioverrides.QuickstepLauncher to
reinstate the behavior of go/ag/11746107 which was
incorrectly reverted in go/ag/11963698.

We also add this for HotseatEduActivity which was
newly added in go/ag/11963698.

(Cherry pick from master cadb94983b)

Bug: 159709775
Fixes: 159709775
Test: wembley-userdebug boots and has functioning Launcher
Change-Id: I17904f9ad88abc66364675426545eae423cb3175
Merged-In: I17904f9ad88abc66364675426545eae423cb3175
2020-06-23 23:04:38 +00:00
Ashwini Oruganti aa902e859b 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 future versions. This change adds the value reflecting the
previous default to the manifest.

These changes were made using an automated tool, the xml file may be
reformatted slightly creating a larger diff. The only "real" change is
the addition of "android:exported" to activities, services, and
receivers that have one or more intent-filters.

Bug: 150232615
Bug: 158198882
Test: TH
Exempt-From-Owner-Approval: mechanical refactoring
Change-Id: I083a7bcab968c881f7cdff7152a249691ffac316
2020-06-23 13:58:18 -07:00
Samuel Fufa d25a112b0e Allow Users to migrate their hotseat when returning from AiAi
- If a user has mostly predicted hotseat, show a snack bar. otherwise, show migration option.
- Guard onboarding activity with permission `com.google.android.apps.nexuslauncher.permission.HOTSEAT_EDU`

Bug: 158569583
Test: Manual
Change-Id: Id0c1c812233fcf288a2f49848720199dedd2015d
2020-06-18 16:38:58 -07:00
Andy Wickham 690543f159 Removes Sandbox from launcher task.
Instead, adds it to the gesture-exclusion activities
to prevent normal gesture handling.

Bug: 148542211
Change-Id: Ie04d2e71346a0c039e73fcc386cedc1b74fadadb
2020-06-10 15:41:37 -07:00
Winson Chung 1801d19bcd Remove LockscreenRecentsActivity
- This activity would create another task (no longer in the same
  stack since we don't have activity type stacks) which was causing
  the camera to be occluded sometimes, which then cancels the recents
  animation
- Tweaking the animation slightly to match the movement of the closing
  the activity back to the lockscreen

Bug: 156514461
Test: Launch camera on the lockscreen and swipe up to dismiss (repeatedly)
Change-Id: I8aaac22767288d7fbf183683276c50acaaf831d2
2020-05-14 10:51:44 -07:00
Sreyas 1963d3f3ed OverviewActions: Adding action buttons to Oem quickstep.
Change-Id: Id5c0d8f1b41107535c1bac982b47f67eb2574c21
2020-03-27 16:42:10 -07:00
Vinit Nayak b9ec9319c5 Add fixed_rotation_transform to home settings
This sets the feature flag on launcher side
and also updates the setting in Settings.Global
Launcher DOES NOT listen to the Settings.Global
change from adb anymore. This should take
preference over setting it from command line.

Also fix a related swipe to home animation bug
that happened w/ merge conflict.

Fixes: 150260456
Test: Set and unset, visually verified behavior.
Tested w/ autorotate on and off.
Checked Settings.Global value correctly updated
via "adb shell settings get global
fixed_rotation_transform"
TODO: Update tests to reflect this new
default-on fixed rotation behavior.

Change-Id: Id95f006eb1e92a59e24b05567298fd21b1409b13
2020-03-11 19:38:33 -07:00
Andy Wickham a9673f4b5c Adds option to launch Gesture Sandbox from dev settings.
This is set to have the same task affinity as Launcher
so that it inherits the ability to ignore system gestures.

Bug: 148542211
Change-Id: I29bc5599dea61c44be721dcc0bec7bc494c415c4
2020-03-04 00:47:38 +00:00
Andy Wickham 9fb7d28b63 Removes exported="true" for RecentsActivity.
Change-Id: Iea9ad04886c3221cefa709c14b6501b2af83af06
2020-02-20 00:07:06 +00:00
Andy Wickham 63b7f36338 Renames BackGestureTutorialActivity to GestureSandboxActivity.
Bug: 148542211
Change-Id: Iaac537380b02f1c52f967748c30fe49ac36bb91e
2020-02-19 21:12:11 +00:00
Patrick Baumann ca16911b9f Adds QUERY_ALL_PACKAGES to launcher manfiests
This change adds the QUERY_ALL_PACKAGES permission to launcher3 so that
it can see all packages on device with the app enumeration featur
enabled in R.

Bug: 149557568
Test: Manual; use launcher3 and ensure it displays all apps
Change-Id: I15e6e86e5476900a6b9c3a6da1cbb11fcbf97e6c
2020-02-14 18:51:18 +00:00
Pinyao Ting 72f9375ada Tips Gesture Navigation Tutorial [Part 2]
include actual implementation of gesture tutorial.

Bug: 146173041
Test: adb shell am start -a \
"com.android.quickstep.action.BACK_GESTURE_TUTORIAL"
Change-Id: Ic166f0a10d8efc22d9684f089142de164ca24c90
2020-01-06 16:33:55 -08:00
Sunny Goyal 657d3f8ca7 Changing the taskAffinity for LockScreenRecentsActivity so that other activities do
not get started in this task

Bug: 138473688
Change-Id: I63b72236496a818d08ccb14e02e4fbf698a0cc49
2019-10-15 12:06:46 -07:00
Sunny Goyal 6b0eb38461 Swipe-up support for 3P Launcher
On swipe up, we start a rencets transition to the current launcher app. At the
end of the transition, if the user is going to recents, we start overview activity.

Bug: 137197916
Change-Id: Ie5ed848879ad965dcab2780a05d649e3be066568
2019-07-11 10:44:56 -07:00
Sunny Goyal 221895d06b Improving swipe up interaction when device is locked
When device is locked, only scale down the top task as a response to
the user interaction. When user flings or lifts his finger, the task
is dismissed to go to the lock screen

LockScreenRecentsActivity is an empty activity which starts on top of lock
screen and finishes immediately. This allows us to start a recents transition
with just the top activity as the animation target. This target is then used
for swipe up interaction

Bug: 133167096
Change-Id: I466ed142ea33d626c78cb9cc5f6311bad26b8d98
2019-05-28 15:55:07 -07:00
Sunny Goyal ab3963ddcf Moving TestInformationProvider to Launcher3 so that it can be used for
testing Launcher3 without quickstep

Also keeping the provider as disabled until needed

Change-Id: Ib5f459e02ae551724b390f3b74f43d601568d749
2019-05-23 14:02:33 -07:00
Sunny Goyal dedda05568 Using a proxy activity for startActivityForResult
This ensures that the home task is never blocked by a different task

Bug: 74500048
Change-Id: I01fd26f1d6242e39b2d8fabac5e064b748aebe62
2019-05-15 16:33:06 -07:00
vadimt d64b4f44da Switching swipe-up to overview to using test info provider
Also moving test provider to Quickstep to have access to the new info;
and now Launcher3 doesn't have it.

Bug: 123904290
Change-Id: I653376610e83839d102beb9c0604950dd314e8ba
2019-03-15 11:42:06 -07:00
Tony Wickham 1ccc31379e Revert "Temporarily make TouchInteractionService direct boot unaware"
This reverts commit 3a4f503e5d.

Reason for revert: SystemUI now expects our service to be direct boot aware

Change-Id: I6f7906046e79f83848cb46f5cce63c827d9fbf4d
2019-03-13 20:19:08 +00:00
Tony Wickham 3a4f503e5d Temporarily make TouchInteractionService direct boot unaware
Change-Id: I2fa760bcefe3b669dfdc18a79bf2d9879c2c8f36
2019-02-28 16:20:43 -08:00
Tony 573c3e1712 Make TouchInteractionService direct boot aware
- Add directBootAware="true" to TouchInteractionService manifest component
- Add DeviceLockedInputConsumer which just sends a home intent on touch down

Test:
- Reboot
- Swipe up anywhere to get to bouncer (pin/password/pattern)
- Click "Emergency" to launch dialer while still in direct boot
- Swipe up from the nav bar to exit/bring up bouncer

Test:
- Lock screen
- Double press power to launch camera
- Swipe up from nav bar to exit/bring up bouncer

Bug: 125364936
Change-Id: I7a4cd2dc3a635daf4bb9a643a1e5251ca4e91e33
2019-02-28 14:39:27 -08:00
Sunny Goyal 4276e7b649 Moving autority definition to a separate file, so
that it can be easily customized using android studio

Change-Id: I17f4f4511c2af5d382727769d1b74413f233d500
Bug: 120079798
2018-11-27 23:20:32 +00:00
Sunny Goyal 7f920b8d5e Cleaning up build rules to simplify customizing derivative projects
> Using {packageName} instead of hardcoding com.android.launcher3 in AndroidManifest.xml
  for strings which are dependent on packageName
> Adding proguard rule to prevent obfuscating any overridable class
> Making it easier to extend SettingsActivity by overriding the fragment class

Change-Id: I5668c3f33b4cf20ad01d7f54b3d79cc0d268d391
2018-07-02 11:16:04 -07:00
Sunny Goyal 03f17fabf0 Fixing build breakage due to theme change
Change-Id: I0d1f1b69a5dbde0cccfdcb925495018ee82403bd
2018-06-08 15:23:17 -07:00
Sunny Goyal f5c5d04b3b Preventing activity restoart on mnc/mcc changes
Bug: 77651657
Change-Id: I68a6995d57da4b3c43c1ecd78deda40c78934533
2018-05-18 13:46:15 -07:00
Sunny Goyal 18c699fbc5 Using the system color extraction logic instead of inbuild logic
> Moving the inbuild color extraction logic to the aosp flavor

Bug: 79111591
Change-Id: I766b0397da7224b424cd5f309cedf635d60a5e0f
2018-05-04 10:16:39 -07:00
Sunny Goyal ea992acc2f Fixing Launcher3Quickstep build, broken due to SDK changes
Change-Id: I7228c036e023f94d3f47b303c7e7b4395bc8a1b7
2018-05-02 12:00:53 -07:00