To guard against the arbitrary Intent injection through Selector.
Bug: 246300272
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsActivityTest
Change-Id: I76fbf3ff7a6611ebb3d07f73845a64efe1771769
Merged-In: I8b3b936de490f09f4be960fdafc6e66a1d858ee2
Deep links on large screen devices starts a homepage activity on the
left pane, and then starts the target activity on the right pane. This
flow overrides the calling package, and the target activity can't know
who initially calls it.
Thus, we store the initial calling package in the intent, so the
Connected devices page is able to make bluetooth not discoverable when
it's called from unintended apps on large screen devices.
Bug: 234440688
Test: robotest, manual
Change-Id: I4ddcd4e083c002ece9d10aabdb4af4a41de55ce7
If a deep link intent is not specified a package name, the intent action
will be resolved to ForwardIntentToParent in some cases.
Fix: 209928944
Test: manual
Change-Id: I502be6be550ba817b4337f2d0793a7b3678fc8d2
- 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
When a full screen or a non-Settings-app ActivityA starts ActivityB of
a SettingsActivity, splitInfos will be empty and it unexpectedly goes
Settings 2-pane deep link flow.
This change checks if an Activity is not task root, don't go Settings
2-pane deep link flow.
Bug: 205497007
Test: manual
SUW -> Vision settings
Check if it goes Settings 2-pane deep link flow.
Change-Id: I0822fbe71fdde47ce7c070986371a4dfea84992c
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
- Support fragment and direct link in SearchResultTrampoline
- Start activity for SI case and start deep link trampoline for others
- Disable menu highlight whenever the search bar is clicked
- Don't overwrite SettingsApplication's homepage activity in
SliceDeepLinkHomepageActivity
- Scroll to highlighted menu entry after homepage is loaded to prevent
UI overlapping
Bug: 201724410
Test: manual, robotest build pass
Change-Id: I5115d17d829e85036000da2e80f0e5b0598c733f
- add a standalone home activity for slice deep link.
- add EXTRA_IS_FROM_SLICE to control the slice deep link flow.
- Intent#parseUri fails if the intent data schema is set.
Add EXTRA_SETTINGS_LARGE_SCREEN_DEEP_LINK_INTENT_DATA to relay the
data schema.
Bug: 201397123
Test: manual, robotest
1. Say 'Enable NFC'/'Enable Bluetooth'to Google assistant.
2. Click the the NFC/BT Slice.
Change-Id: Ia3216956328c32b2109cb2d70ad1105327661f26
When launching a Settings deep link, it will close
Activity of the deep link and start both
DeepLinkHomepageActivity & the deep link.
Since 1st launched deep link page is finished,
should also remove its task.
Bug: 203385355
Test: manual
1. Create a Settings shortcut on launcher.
2. Click the shortcut.
3. Move Activity of the shortcut to background.
Change-Id: I04b3243bf51f3940167e4dca6f5a32d9e3cf2841
Avoid using 'two pane' and 'large screen' because
they are implementation details exposure.
Bug: 201662312
Test: build pass
Change-Id: Id3555f734ff11e31d2f4db0479331c4f27e9e715
This reverts commit 096c090b80.
Reason for revert: crash is fixed in this change
Bug: 202510128
Test: manual, build
Change-Id: Ifff8d58cfdcf43e123b11dee308665b2617cb4b3
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
Show full screen for CreateShortcutActivity because
-Launcher startActivityForResult for Intent.ACTION_CREATE_SHORTCUT and
activity stack starts from launcher, CreateShortcutActivity will not
follows SplitPaitRule registered by Settings.
- There is no CreateShortcutActivity entry point from Settings app UI.
Bug: 200916507
Test: manual
Launcher menu -> Widgets -> Settings -> select an item.
Observe if it goes back go launcher.
Change-Id: I437ff9b82d5a4548e10aed7bd083fd01352433f4
After users select a shortcut item in CreateShortcutActivity,
launchers need to get result from CreateShortcutActivity.
For large screen devices, Settings deep link will start
DeepLinkHomepageActivity and then DeepLinkHomepageActivity
starts the deep link page. The CreateShortcutActivity result
deos not forward to launcher and there is no shortcut added.
This change uses Intent.FLAG_ACTIVITY_FORWARD_RESULT to
forward result from CreateShortcutActivity to launcher.
Bug: 200889769
Test: manual
Long click launcher -> Widget -> Settings ->
select an item and check if it adds a short on launcher.
Change-Id: Idd5fc642be5c1fb2f747316c3ddcd9b7f0b33852
Sender of deep link intent may want to send intent extra data to the
deep link target Activity by merging intent extra.
Bug: 197048599
Bug: 197926040
Test: manual
1. Click quick Setting 'Internet button'.
2. Click the gear button of a connected Wi-Fi.
3. Observe if the Wi-Fi detail page shows the connected Wi-Fi.
Change-Id: I32040ee21a747cae710df2e12a8f5b66aff086fa
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
This change supports deep link to Settings app internal pages
and external pages outside Settings app.
Apps need android.permission.ALLOW_TWO_PANES_DEEP_LINK_IN_SETTINGS
to send the intent of Settings#ACTION_SETTINGS_LARGE_SCREEN_DEEP_LINK.
Settings app will startActivity for the intent from
Settings#EXTRA_SETTINGS_LARGE_SCREEN_DEEP_LINK_INTENT_URI.
Bug: 197048599
Test: build pass
Change-Id: Idaf4a8be4603c1308f16fb4e378266c1e52acb40
- Make the transition logic simpler in SettingsBaseActivity.
- Remove the redundant transition code in SettingsActivity.
Bug: 177479937
Test: rebuild and click on pages.
Change-Id: I65cae59d4eae99e3b9c324c9b6ce89f2349aaf8b
This issue happen on Developer and Wi-Fi pages, so the problem
should be solved on SettingsActivity.
Fix: 181341927
Test: Run robotest and see the ui
Change-Id: I57722cfcbeb6390c88101d808429346045e57c92
We've applied a new transition from Search to Settings, where if users
click on the up-button, the transition will not be applied. Hence, this
CL makes the up-button behave the same as the back key to address this.
- Also remove the transition target as it is not necessary.
Fixes: 177968777
Test: 1. Search "Gesture"
2. Click on "Gesture"
3. Tap the up-button and see the applied transition
Change-Id: I046424f244426750d98046703c05ae0a1d567c67
The new material library has been updated to be able to support
android.widget.Toolbar, so the redundant toolbar has to be removed.
Bug: 176882938
Test: visual verified
Change-Id: Ibada6b9d315c14d79e9f9f8015cbb5e00fbeea38
To log Settings metrics, the MainSwitch extends MainSwitchBar and
replace the SwitchBar in SettingsActivity.
Bug: 175181773
Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: I3add3702e9058ad9192b5172c7cf0e2ccfb55a70
Currently there is no transition while redirecting users from Settings
Search result to Settings. This CL gets Shared X-Axis transition applied
to make a better visual experience.
Bug: 177480699
Test: Click on a search result and see the transition.
Change-Id: Iad9b0c1168a939582e2648bc023c1321f9ec8049
Settings app is planning to make toolbar collapsible for next
Android release. This CL is to add a new layout for
CollapsingToolbarLayout in the Settings app and to update the theme
correspondly. This feature will be controlled by feature flag, which
makes Settings app compacitible with the existing layout.
Bug: 174451673
Test: manul test and visual verification
1) Enable the feature and open Settings app
2) Navigate to each sub page and check if toolbar is collapsible
Change-Id: Ibef524bbaa7ae3f0a43db7e40e599f42e009437f
Align the logic for selecting between the setup and non-setup versions
of the lock screen settings title layout, with the logic used in
ChooseLockGeneric. This means using
WizardManagerHelper.isAnySetupWizard, rather than
WizardManagerHelper.isDeviceProvisioned.
Fixes: 151552453
Test: Manually verify screens in consumer setup, enterprise setup, and
Settings app
Change-Id: I75cd9e509320b9ef9b929dd592f16e8130d80a6e
Bug: 141601408
Test: Settings->Storage, click work tab, click Other apps. It should
navigate to Apps storage page and focus on WORK tab.
Change-Id: Ida91b279e771a2c7c960ce83b8e13310c87112e8
- Search box is hidden if user set intent extra isSetupFlow true
Fixes: 135717823
Test: search box is hidden in the following command
adb shell am start -a android.settings.SETTINGS --ez isSetupFlow true
Change-Id: Ia3d955c9390d6b0eef9391b9b35b6a483eb63d26
- Add ProfileSelectManageApplications containing tabLayout
- Modify StorageItemPreferenceController to display only personal
or work profile data
- Add getTargetFragment in Utils to handle fragment selection
Bug: 141601408
Test: manual
Change-Id: Ie4db1ce2e77f60a82018e5a3e1f2fccb812502dc
- Add Tablayout in ProfileSelectFragment
- Add AccountWorkProfileDashboardFragment inherited from
ProfileSelectFragment
- Add ProfileFragmentBridge to convert AccountDashboardFragment
to AccountProfileSelectFragment
- Use flag settings_work_profile to guard the new fragment
Bug: 141601408
Test: Settings->developer options->feature flags->
turn settings_work_profile on/off, then go to settings->account
to see if UI is changed.
Change-Id: Ifb32c22cdeab69c51517664081cacf4a401c46a1
- use SummaryProvider to provide the summary of UserSettings
- use WifiDisplayPreferenceController to replace the summary loader
in WifiDisplaySettings
- use ConfigureNotificationPreferernceController to replace the
sumary load in ConfigureNotificationSettings
Fixes: 141653158
Test: robolectric
Change-Id: Id5f5ed645707caa0b25ecae5252174cbf017651c
SettingsIntelligence put a null in intent extra bundle, caused the
crash. Check the null before use it.
Fixes: 137351833
Test: make RunSettingsRoboTests
Change-Id: I9630760396c72bddf6a11314b869873c3b83b45a
SettingsActivity now calls finishAndRemoveTask
instead of only finish() to prevent blank
recent task from showing in overview.
Test: Visually inspected bug doesn't exist. Wrote
Roboelectric tests
Fixes: 129733119
Change-Id: I5b73c1b611e6eb52bb6665c215276efdc85c19b2
This reverts commit 9e98b8cf0f.
We have to set clipToPadding false on scrollView to make it extend below
navbar. But the side effect is it stops clipping to padding. So it
overlaps with sibling views. In this case anything pinned on top of
screen (switchbar, pinned header for most UIs, and preview indicator for
font size page).
To fix them:
1. in preview pages, just revert back to clipTo*. Their UI doesn't scroll
so it they don't need to special clip flag to begin with.
2. For pinned to top headers, we need to change the "z-order" by setting
elevation and make sure background is not transparent.
Fixes: 132182711
Fixes: 132672399
Test: visually on normal screen, font size scree, wifi main setting UI,
wifi data usage screen
Reason for revert: Rollforward with fix.
Change-Id: Ib6f7c4167b9a680a336f2a7310d82340094d3aac