Disable the optimization that is automatically enabled when
including Window Extensions through Activity Embedding.
The optimization causes to launch an additional trampoline
activity for deep links, even when the screen size is smaller
than required by Activity Embedding rules.
Bug: 267725145
Bug: 279461170
fixes: 280606740
Test: Build, perf metrics
Test: atest LauncherIronwoodIntegrationTests:android.platform.test.scenario.launcher.integration_tests.HomescreenCustomizationTests
Test: atest SettingsMultiPaneDeepLinkTest.java
Test: run v2/aep-ironwood/suite/test-mapping-ironwood-p0-cujs via ABTD
on cheetah/oriole/panther/raven in udc-dev/master branch
Change-Id: I74c9608fce92fc77c0f1ef2d61aba3af85afba02
Disable the optimization that is automatically enabled when
including Window Extensions through Activity Embedding.
The optimization causes to launch an additional trampoline
activity for deep links, even when the screen size is smaller
than required by Activity Embedding rules.
This CL also rename isActivityEmbeddingEnabled to
shouldEnableLargeScreenOptimization because the method
may report false even if the device supports the feature
but Settings app doesn't for performance concern.
Bug: 267725145
Bug: 279461170
Test: Build, perf metrics
Test: atest LauncherIronwoodIntegrationTests:android.platform.test.scenario.launcher.integration_tests.HomescreenCustomizationTests
Test: atest SettingsMultiPaneDeepLinkTest.java
Change-Id: I38e8c62a61a344eb7a5cbfd1cd2c2137357d1a87
- Check the deep link activity instance before rediercting to the
internal activity for the managed profile invocation so the caller
can't bypass the permission check.
- Get the referrer as the caller so that onNewIntent can recognize the
new caller and check if it has a permission to open the target page.
Test: robotest & manual
Bug: 268193384
Bug: 272437506
Change-Id: Ie69742983fb74ee2316b7aad16461db95ed927c2
In the headless system user mode(hsum) non-primary users can also have a profile.
The existing implementation in SettingsHomepageActivity always gets the primary user as the profile parent, refactored the implementation to get profile parent using UserManager.getProfileParent.
Get parent user id instead of primary user as profile parent
Bug: 267299459
Test: croot && make RunSettingsRoboTests -j40
ROBOTEST_FILTER=SettingsHomepageActivityTest
Change-Id: I36845eb5b1a09b0ff3d87c7d08b120c95f59783b
Android 13 introduces the feature of per-app language that allows
users to set a preferred language for each app. However, Settings
embeds many activities from different apps, which may cause
multiple languages to be displayed on one Settings page.
Enable TaskLocaleOverride to align the locales of activities
launched in the same task.
Bug: 199277729
Test: Verified on Cuttlefish
Change-Id: I9ee2b8c481f9c0cb5f17eb1cea037317df35e9d9
To improve security, calling app must be granted Uri permission
if it sets FLAG_GRANT_READ/WRITE_URI_PERMISSION in the Intent of
ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY.
Bug: 250589026
Test: manual
Change-Id: I48f88c662b843212b1066369badff84cf98935a8
If an Activity is not exported, the Activity still can be
launched by components of the same application, applications
with the same user ID, or privileged system components.
Bug: 261678674
Bug: 250589026
Test: manual visual
Launcher -> context menu -> Wallpaper & style
Change-Id: I662df6cb287361b135e2c596abe946ddeb03bda4
This reverts commit ea1580f92b.
Reason for revert:
1. Search result trampoline should have that result sent back to the
reply target of the original activity.
2. To leverage the behavior of handheld's deep link case, large
screen's deep link should forward the result.
Change-Id: I55303070e35fc9430063655e0a9a0fd72e0823ac
Settings app must not start an deep link Activity if
1. The deep link Activity is not exported.
or
2. Calling package does not have the permission to
start the deep link Activity.
Bug: 250589026
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsHomepageActivityTest
Change-Id: I9a3bddfa5d9d1d2e924dd6f3e5e07dca6c11664f
If Settings is started on an existing task, the existing SplitPairRule
may cause an unexpected app finish while navigating back from the
2nd layer page.
This change resets SplitPairRule in onCreate().
Bug: 247080168
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsHomepageActivityTest
manual
1. Settings app -> 'Connexted device'.
2. Launch Settings app again from Settings icon in quick Settings.
3. Start a 3rd layer from 'Network & internet'
4. Click back and see if the 2nd lay shows.
Change-Id: I262327cc49c3a4434a183eb00ac57f47fa598f70
Adds a menu key for the security deeplink, and adds a remapping to
ensure the correct key is used depending on if safety center is
available or not.
Bug: 253553761
Test: manually
Change-Id: I8ed9efd084e1fdfa298be1826a215218c84b1f4a
Settings$CreateShortcutActivity does not necessary to be
displayed in 2-pane and it seems no scenario needs the flag
Intent.FLAG_ACTIVITY_FORWARD_RESULT.
Bug: 241346847
Test: build pass
Change-Id: I7a8fca61b453db70233b151711df516649424e3a
If an app starts a Settings deep link with FLAG_ACTIVITY_NEW_DOCUMENT,
FLAG_ACIVITY_NEW_TASK is auto-appended by frameworks which causes a
SecurityException on the 2-pane design because starting a new task on
the right pane is not allowed.
Deep links in the 2-pane design will clear the top activities, which has
the same UX behavior of setting FLAG_ACTIVITY_NEW_DOCUMENT, so we remove
the flag in this case.
Fix: 233917580
Test: start account page via Assistant
Change-Id: Idcbeb96e441592d48686f18f3433864f2c14832a
- Settings shows the work Homepage while starting the work profile's
icon, which is not allowed.
- Clicking work apps' App info plays an unsmooth window transition
animation.
Fix: 233296965
Test: manual, robotest
Change-Id: I3d12f6c59692c4a4cc718ea7022b60be50235abb
- Polish the app bar mask on homepage
- Move the Suggestion card to the position below the search box
Fix: 224435133
Fix: 230284145
Test: robotest, visual
Change-Id: I0a4fd86230fb773a28ca1d9799f3c631a81a11cb
Homepage is not allowed to be started as a non-primary user.
In the managed profile deep link case, we create a bridge to start the
homepage as the primary user, and then start the target page as the
given managed user.
Bug: 222447112
Test: manual, robotest
Change-Id: I07dbec3b7eaff983f9860480a0a2f7b0e6f1fb43
- Support dynamic paddings depending on app's screen width
- Add round corners to homepage ripple effect to improve the transition
of being highlighted
- Add an interface to support dynamic split layout for suggestion cards
Bug: 223300824
Test: robotest, manual
Change-Id: Iaca6b4fd3f7369179416ef084a800d7eb2ee4640
Since the deep link mechanism uses a trampoline activity to redirect the
target activity, and the targeting activity is launched in a separate
task, there will be two transitions played, where one is the splash
screen with the trampoline acitvity and another one is the task
transition. This makes the UX weird.
To avoid this, this CL tries to make the targeting activity launch in
the same task as the trampoline acitivity by removing the taskAffinity,
so there won't be a task transition.
Fix: 215275940
Test: Create a settings shortcut on the home screen and launch it.
Change-Id: I7621ab9f1132acbf619495801a3b985c5c3b1b5d
- Only apply the layout transition when contextual home is enabled
- Do not scroll for highlighting when the homepage is recreated and
never scrolled
Fix: 222238012
Bug: 222473415
Test: robotest, manual
Change-Id: I490c3f8dbca63a5250bae01555592b7795c90af2
We should set padding for root view instead of margin.
Test: Verify the behavior is correct in single pane
and two panes mode.
Fix: 221422906
Change-Id: I17a63be6e536ffcf39744b2e98dc1ea2723ebf1d
Set backgorund color on content id view instead of homepage view.
Also setup edge to edge for the homepage.
Fix: 215440529
Test: See correct ui on the two pane mode and regular phone.
Change-Id: I2d5988a489410e9620137bd6cf9607768787d4fc
Test: Make sure behavior is correct as it was in
search flow, higlight flow, regular settings flow, split screen flow.
Bug: 204399167
Change-Id: I7fc29c8cdbfc6682963591f4ff805070bea4ca22
Unfolding a device generates mutiple lifecycle events and resets the
highlight key.
Check if there's only one activity in the task and then perform the
reset.
Fix: 209016927
Test: manual
Change-Id: I49988fa913270d35a04436777433b7669afb72df
The performance regressed since the previous change that hide the
homepage view from using View.GONE to View.INVISIBLE
This change only initializes the list views in the invisible homepage
view to prevent a scroll flicker when scrolling is needed.
Test: manual
Bug: 206555277
Bug: 205823792
Change-Id: I8f173b135cfa1d27a1362d5fa8e3f338e2428ad2
- Create TopLevelHighlightMixin to handle highlight actions and simplify
TopLevelSettings
- Fix the error highlight and the flicker after screen rotation
- Postpone creating the fragment until it's needed to accelerate the
initialization and to fix the search highlight function breakage after
toggling light/dark mode
- Register activity embedding rules only once for injection and
wallpaper
- Do not highlight Tips & support since it's full screen
- Refactor ActivityEmbeddingRulesController
Bug: 207316936
Test: manual, robotest build pass
Change-Id: If322ec180b03ee123987c70779a25c6a570d9faf
Update background color for status bar and
homepage background programically.
Also, we update the backgroud color for highlight items.
Test: Rebuilt apk and see the screen.
Bug: 195293058
Change-Id: Id100f8c9c7fc02c43420afcca07a703a14ec2312
In a high level, I created two versions of app bar layout.
One for single pane design, another for two-pane design.
Then, app initilizes two different layouts in the beginning,
we simply show/hide one version while app is receiving the
configuration changes update.
Test: Rebuilt apk and observed the screen.
Bug: 195293058
Change-Id: Icd19ea02ab1be4e964701b22ae9e20c9e00d3c0d
- Use a synchronous API to make SettingsActivity start deep link intent
in onCreate
- Change SettingsHomepageActivity from an alias to a real activity
- Clean up redundant codes
Fix: 206585572
Test: Manual, robotest build pass
Change-Id: Idf42c026f593bb5801a13cae250d1523030b7092
1. Add a receiver to monitor the search state
2. Shoe/hide the menu highlight in the listener
3. Highlight the menu entry in SearchResultTrampoline
4. Enable/disable the receiver in SettingsInitialize
Bug: 205781792
Test: manual, robotest
Change-Id: Ia04901f504172f4f0c7b4b2ea7eda5f3713f676d
Scroll to the highlight position before showing homepage.
Bug: 199017944
Bug: 204946469
Test: visual
Change-Id: I11708f42180a3af22855ac7b5f53460f737ed208
SettingsActivity may send Settings 2-pane deep link Intent to
SettingsHomepageActivity if split callback tells that there is no
SplitInfo.
Wallpaper app sends deep link Intent to SettingsHomepageActivity,
and then SettingsHomepageActivity starts Wallpaper app page.
The flow should be 2-pane organized but the split callback tells
that splitInfos is empty.
This change checks if the Intent is from SettingsHomepageActivity
to prevent the Intent loop by the bug.
Bug: 205206004
Test: manual
Long click Launcher -> Wallpaper & style
Change-Id: I6b9d76c136238e556384e891ae1700ae7c1bb41f
The callback of SplitStateObserver.SplitStateListener can have one
or more active splits when there is already 2-pane in Activity stack.
This change prevent unnecessary 2-pane deep link flow if the Activity
is already in 2-pane activity stack.
This solution does not work if the Activity was started in a new task.
(e.g., Intent.FLAG_ACTIVITY_NEW_TASK, launchMode singleTask).
Bug: 201379454
Bug: 201620626
Bug: 204398432
Bug: 204397936
Bug: 197609195
Bug: 197609197
Bug: 204501179
Bug: 204959335
Bug: 204845334
Test: manual
1. Settings -> Apps > Default apps > Opening links.
2. Click back button should back to Default apps page.
Change-Id: I04aaceed47a8f2754a4e17c53b49252f61e0a1d1