Commit Graph

23 Commits

Author SHA1 Message Date
Chris Göllner
83f0adc5c0 Settings - Move Activity embedding split min width config to resources
On some devices the values need to be configured to be different than
the default.

Bug: 326215764
Test: Manual
Change-Id: I56a3a6608a4ac4eaf7d7dede4f6cb4278638f29c
2024-02-21 15:14:30 +00:00
Jason Chiu
f18920bc5e Disable the large screen optimization system property by default
When the property is true, Settings will invoke SplitController's APIs
to check if split support is available. However on a regular phone, it's
uncessary to take time to execute the APIs, which impacts the app
startup time.

Setting the property false by default can help skip the API invocation
when the property is not set. Developers can customize it in the build
file for large screen devices.

Test: build
Bug: 297794010
Change-Id: I91822d4b6afd49cd08fc546fbe5f231b2debc0f2
2023-11-10 01:19:10 +00:00
Charles Chen
8524048094 Improve Settings launch performance for normal phones
1. Initialize ActivitEmbedding component only if necessary
2. Early return to avoid executing long execution time operations
  ex: initialize ActivityEmbedding component, feature flag operations

Test: manual - launch settings and profile
Test: run
v2/android-crystalball-eng/health/microbench/startup/firstparty/open-settings
on affacted devices
Test: atest SettingsHomepageActivityTest TopLevelWallpaperPreferenceControllerTest DashboardFeatureProviderImplTest TopLevelSettingsTest TopLevelWallpaperPreferenceControllerTest SearchResultTrampolineTest
Test: atest CtsSettingsTestCases
Fixes: 281505190

Change-Id: I0c1a1dc50f26c4ded02de82190dd7aad59c20c01
2023-05-12 12:20:40 +00:00
Charles Chen
9dc35d21b4 Revert^2 Disable Settings large-screen optimization
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
2023-05-05 07:46:06 +00:00
Priyanka Advani
77f76267d2 Revert "Disable Settings large-screen optimization"
Revert submission 22926596-disable_large_screen_opt

Reason for revert: b/280606740

Reverted changes: /q/submissionid:22926596-disable_large_screen_opt

Change-Id: Ib918705206dc6b8bcbce21f83494d1108c6b8393
2023-05-03 16:05:25 +00:00
Charles Chen
1815ba7828 Disable Settings large-screen optimization
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
2023-05-02 14:16:22 +08:00
Alexander Milantev
92195471b0 Avoid activity embedding if the activity is already embedded
Test: manual + robotests com.android.settings.search and com.android.settings.SettingsActivityTest
Bug: 271260497

Change-Id: Ia21ca7a75cacee64d1942e2fe1b439ac4a3cb134
2023-03-28 15:05:35 +00:00
Diego Vela
a9394d1796 Update ActivityEmbedding usage.
Update ActivityEmbedding usage.

Bug: 259592300
Test: build.
Change-Id: I8e4aa8daf51cb9c669d06b152cc5a2fc69a06571
2023-02-03 02:34:20 +00:00
Arc Wang
be2ea9eb39 Avoid 2-pane deep link before gone through Setup Wizard
To improve security.

Fix: 238391432
Test: manual
      Flash ROM and check 2-pane bebavior
Change-Id: If96c645319d9df45930644fd438cf479462685b0
2022-07-27 11:27:33 +08:00
Jason Chiu
680fce3acd Refine layouts for large screen
- 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
2022-03-30 04:54:30 +00:00
Lucas Silva
fab78665d8 Make the Settings split ratio configurable.
This new config will be overlayed in titan devices to update the split
ratio to 30/70

Bug: 215707431
Test: locally on device
Change-Id: I7bd193d7516939f5c4d434cd3333456c20e53a91
2022-01-21 23:00:29 +00:00
Tsung-Mao Fang
13a76eb84e Update new API for checking the embedding status
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
2022-01-12 15:00:07 +08:00
Tsung-Mao Fang
fce8565e5e Update logic to check two pane resolution
Prior to this cl, we checked the app bounds for deciding
app in two pane or not. However, this might be broken in some certain
sceanrios.
Currently, api will check the entire task bounds.
If the width of task bounds is larger than two pane criteria,
then we treat it as in two pane mode.

Test: Highlighted behavior works correct.
Fix: 203763572
Change-Id: Ib14851b1e3e097328874c7956bb653f50820f877
2021-10-21 21:34:17 +08:00
Jason Chiu
29a09e55ba Revert "Revert "Support highlightable Settings homepage menu for 2-pane""
This reverts commit 096c090b80.

Reason for revert: crash is fixed in this change

Bug: 202510128
Test: manual, build
Change-Id: Ifff8d58cfdcf43e123b11dee308665b2617cb4b3
2021-10-12 09:32:07 +00:00
Greg Kaiser
096c090b80 Revert "Support highlightable Settings homepage menu for 2-pane"
This reverts commit 9037ceabd3.

Reason for revert: Presumed cause of b/202510128

Change-Id: I0daaab95d9bc57229c0c8c916cbe3ada7aafb6fa
2021-10-08 14:29:06 +00:00
Jason Chiu
9037ceabd3 Support highlightable Settings homepage menu for 2-pane
1. Add a preference group adapter to perform highlighting
2. Add a class for mapping highlighable menu keys and preference keys
3. Add an API to determine if the screen is in split mode

Bug: 199017944
Test: manual, build
Change-Id: I8e3fe5fb96480a31ee0f3b3afb6ad78999d3d2bc
2021-10-08 12:52:52 +08:00
Andrii Kulian
356292a1ee WM Jetpack interface update in Settings
Updating to the latest version of the library
that's added in the topic.

Bug: 199676595
Test: Build, install and test Settings
Change-Id: Ia08314a93c4b5263e2fb6c06a5b517a74e9e3745
2021-09-22 15:47:33 -07:00
Arc Wang
f6a8f6c8af Extends the criteria width of 2-pane mode
Follow UI spec, we extend criteria width from 600dp -> 720dp

Original code checks if there is only one Activity in
Activity stack to decide if it's a deep link intent,
it has problem at configurationChange.

This change checks if the intent is from Settings app
itself to decide if it's a deep link intent.

Bug: 197716926
Bug: 199808997
Test: Build apk and run on the device.
Change-Id: Ide8ef2ccffa87b9ee4fab41ab4f395b00def9bd6
2021-09-15 12:13:49 +08:00
Tsung-Mao Fang
600672c91d Revert "Extends the criteria width of split mode"
This reverts commit c829a97f13.

Reason for revert: <Observe behavior error after rotating the device>
Bug: 15786013

Change-Id: I58024f143f8c59f8b0cf50d5cd284f84600e36e6
2021-09-09 08:35:01 +00:00
Tsung-Mao Fang
c829a97f13 Extends the criteria width of split mode
Follow the ui spec, we extend criteria width from 600dp -> 720dp

Test: Build apk and run on the device.
Fix: 197716926
Change-Id: If963ebb1f51c71a1d225198a150e4cbc2f5ef35a
2021-09-09 12:18:34 +08:00
Tsung-Mao Fang
4781fc1687 Revert "Revert "Support two pane design in the Settings app.""
This reverts commit 07037dbc3f.

Reason for revert: <Issue already was fixed in ag/15743576 and ag/15743577>

Bug: 197716926
Change-Id: I72b98f8feb513f34e88e735efd578a8e3d9a1963
2021-09-06 02:41:26 +00:00
Tsung-Mao Fang
07037dbc3f Revert "Support two pane design in the Settings app."
This reverts commit a12a0d1eb2.

Reason for revert:  See a build error in git_sc-v2-dev-plus-aosp/aosp_crosshatch-userdebug

Bug: 198722766
Change-Id: Ibf812bf92595f57409e3c6d9cda6a1dfa4a8c72c
2021-09-03 17:12:47 +00:00
Tsung-Mao Fang
a12a0d1eb2 Support two pane design in the Settings app.
1. Only enable this feature when the flag is on and library is supported
in this device.
2. Add a placeholder rule for home menu.
Network page will be shown to the right pane by default.
3. Add a rule for most sub settings pages.

Known issues:
1. Transition animation seems wrong in this cl.
2. App is closed if user taps back key on the second layer page in fold
state.

Test: Run the apk on large screen device and regular phone. No crash
happens
Bug: 197716926

Change-Id: I089717e84c5e92c6e5b02d9770a24376e250fea2
2021-09-02 13:57:42 +00:00