Code in SettingsProvider will need to use DeviceStateRotationLockSettingsManager,
but shouldn't have to pull in the entire SettingsLib just for one class.
Bug: 196933725
Test: atest DeviceStateRotationLockSettingsManagerTest
Test: build Android
Change-Id: I93679700c1638396c5930386c82fa23f1f3ad6a0
Add two APIs
1. isActivityEmbedded() knows whether current activity is
embedded in the Settings app or not.
2. shouldHideBackButton knows whether current activity is
suggested to show back button or not.
Bug: 219000314
Test: Use the api in Settings app, and behavior is correct.
Change-Id: If1d29a8d9bdb896b179275e13de649872a5b94fe
This is the first in a series of CLs to add a new avatar picker.
This CL adds the basic avatar picker screen to show a set of
predefined images (that can be supplied as an array of drawables).
Resources are provided to adapt the screen to phones and tablets
of various sizes.
Future CLs will integrate the take photo and choose photo
functionality from the current dialog, and will also add a set
of default icons that can be chosen if no predefined images
have been provided.
Bug: 215134398
Test: manual check screen on various screen sizes
Change-Id: I6ce95549cc17dc5a9b67d9dc43c5b7d2bda37874
This is an utility class to access relevant embedding activity feature
supported by Settings.
Bug: 201722672
Test: manual test
1) Run the apk built with this utils, and check some features work well
on large screen
Change-Id: I9f2a1fff57632ca2841b61a862f107d7df735247
This rename makes it slightly less confusing to have both radio and checkbox display options. Functionally, this preference was already equivalent to a checkbox (with checking/unchecking functionality managed by the caller); the reason to use this class for settings checkboxes rather than the base CheckBoxPreference is for the added widget functionality.
This change leaves RadioButtonPreference as-is to make it easier to bring google3 uses in without having to be in lockstep, but RadioButtonPreference will be deleted in a future CL.
Test: SelectorWithWidgetPreferenceTest, RunSettingsLibRoboTests
Bug: 190180868
Change-Id: I0811997b4625f1292b1842ea353a90221159bb50
SettingsLib should not depend on WifiTrackerLib since WifiTrackerLib's
min_sdk_level will keep updating to use the latest Wifi APIs. Since many
other apps use SettingsLib and may not have their min_sdk_level updated,
we should make sure WifiTrackerLib's min_sdk_level is decoupled from
SettingsLib's.
Bug: 187099809
Test: build
Change-Id: I5e530e9b714870e61e519c2eaccc6710683a66d3
SettingsTransitionActivity is an abstract activity being in charge of
the transition feature. Activities extending it will get settings
transition applied.
We make CollapsingToolbarBaseActivity extend this activity. Clients
extending CollapsingToolbarBaseActivity will have both app bar behaviour
and the transition applied.
Also add android:transitionName into the collapsing layout, so the
transition would start from the back arrow on the action bar.
And bump the min_sdk to 29 to relevant dependencies.
Bug: 177480673
Test: rebuild and apply it on NotificationHistoryActivity
Change-Id: I8e070a0f07080d027fec7b944bdcdbb758ae44b7
This transition helper is created to share with settings that are
injected/out of Settings codebase to ensure the page transitions are
consistent across Settings app.
Bug: 177480673
Test: rebuild and test with Settings
Change-Id: Ibb51d102db4d5365ae82f81d91c4bae7092d6e31
Revert "Update GoogleWifiTrackerLib min_sdk_version to match Wif..."
Revert "[WifiTrackerLib] Put @hide methods in separate wrapper p..."
Revert "Update TwoPanelSettingsLib min_sdk_version to match Sett..."
Revert "Update BluetoothServices min_sdk_version to match Settin..."
Revert "Update DroidTwoPanelSettingsLib min_sdk_version to match..."
Revert submission 13842044-wifitrackerlib-hideapi
Reason for revert: build breakage
Reverted Changes:
I85b8ed34a:[WifiTrackerLib] Put @hide methods in separate wra...
I891f51aab:Update DroidTwoPanelSettingsLib min_sdk_version to...
If8e82e047:Update GoogleWifiTrackerLib min_sdk_version to mat...
I4529627fb:Update BluetoothServices min_sdk_version to match ...
I87b46a09b:Update TwoPanelSettingsLib min_sdk_version to matc...
I65a3246b4:Update min_sdk_versions to match WifiTrackerLib
Change-Id: I083b764b42e5cf5476b1ec9ed3a9b2d5ed12afc9
SettingsLib min_sdk_version (and modules dependent on it) should
match the updated min_sdk_version of WifiTrackerlib (30)
Test: build
Bug: 162368129
Change-Id: I65a3246b40fc724b157756daec635392e99141e1
On Android S, each of subsetting pages will have a collapsing toolbar to
enlarge its title. However, there are many different pages from
differennt apps. So we extracted a base activity with collapsing toolbar
layout so it is easier to enbale a collapsing toolbar in their own
pages.
Bug: 179380824
Test: visual verified
Change-Id: Ic505d65320081589d1e1b5eb4bd2af7a06e60d39
This preference contains an usage summary and
a total summary and a horizontal progress bar.
The number of usage summary will show with
enlarged font size.
Bug: 174964885
Test: atest UsageProgressBarPreferenceTest
Change-Id: I97fc27ac2b8d08202e776713bc035bd9b80bbbbc
Based on our ux spec, we create this widget to
let everyone can follow up our spec easily.
Bug: 175181773
Test: Run robotest and apply this widget in Settings and see the ui
Change-Id: I4ea5f38c44aacfeb2c8dbe4a7d31159712f95441
Currently, developer needs to import SettingsLib to use
footer preference. But the size of SettingsLib is too huge.
We extract the footer preference as a lib so that developer
only needs to import a small lib for using footer.
Test: Rebuilt apk, and see the footer preference
Fix: 173088235
Change-Id: I35ba99a49c7a13542d79f0340eecdbe9844102d0
Based on our ux spec, we create this widget to
let everyone can follow up our spec easily.
Bug: 173184155
Test: Run robotest and apply this widget in Settings and see the ui
Change-Id: I65ebf5f5d9c59e9e52bfb5ad0d8a003a9642303a
This util class manages getting/setting default emergency numbers,
shared by settings, EmergencyInfo and other clients.
The logic is copied from Personal Safety app - http://shortn/_Z7qtV6RpJG
Bug: 172609395
Test: manual
Change-Id: I9062d84f49556d2b7e7866c43d64dac55d48f4f4
Based on our ux spec, so we create this widget to let everyone
can follow our spec easily.
Test: Apply this widget in Settings and confirm it.
Bug: 173087905
Change-Id: I481b350c417745cc3332b403877627e081cc0f73
The method this change moves needs to be accessed by permission
controller which doesn't have access to platform apis. The new module
SettingsLibUtils requires system api. Other methods in SettingsLib which
don't need platform apis could also be moved into this module.
Test: Use talkback on permission screens
Bug: 127602715
Change-Id: I017fd22712c3e6eb38a0aa1fb95d4331e9b56a2a
- Provide an abstract api named getScheduleInfoList.
- Implement a ScheduleInfo class.
Fixes: 148995400
Test: compilation
Change-Id: I236627daa478fb2d2d138a8832680b1ec2464b3b
In order to prevent DoS attack from icon size,
we're usinga system lib to help convert any loaded
drawable into a flattened bitmap with an appropriate size.
Test: Rebuild
Bug: 33646131
Change-Id: I92e76fb4e4c23c4995f63ebd2df8cbe0a349fbce
We're currently importing the whole of SettingsLib into the Settings
Backup Agent just to access a single static method. This seems to
have contributed to a the regression which relates to b/139373401.
This CL separates the 3 related methods out into their own build
target so the amount of code included in SettingsBackupAgent is
much smaller.
A later CL will remove the original location after all usages
have been redirected to this new location
Bug: 139373401
Test: atest SettingsProviderTest SettingsLibRoboTests
Change-Id: I36fbc21daddcf068491b58db01b66f540ac26cf7
Create a new battery drawable that will load enough resources from
frameworks/base/core/res/res/ to allow for theming overlays. The current
things are overlayable:
- Perimeter path: the outer shape of the battery (including the
terminal)
- Fill mask: path defining the shape of the fill
- Bolt path: charging bolt path. draws with appropriate protection for
visibilty
- Powersave path: path of the plus sign that draws when in powersave
mode. also draws with protection
Test: visual; sysui demo mode
Bug: 123705805
Change-Id: I2bb15fd10e3fec63cb115a8f216794933b717404
Move the logic for a horizontal progress bar into its own library in
SettingsLib.
Bug: 123538370
Test: Code using this library still works.
Change-Id: I700c5e481bf32077e19e606d797e5b698b2cc33a
And remove dependency to settingslib.core.Lifecycle. This class use
androidx.Lifecycle instead.
Bug: 123311100
Test: robotests
Change-Id: I80bbbf4bc2759e574d8dabf1799b3bded216f2f3
- Per Q design, we will show a bar chart in Settings > Privacy page.
Permission team also needs this bar chart in their page.
- Create a new library named SettingsLibBarChartPreference
Test: visual, robotest
Change-Id: Iff5a1233357a6aa6a667c0059f542a1b444b59a2
Fixes: 117623686
- Rename lib name of ActionButtonsPreference and LayoutPreference.
- Remove Settings* prefix for directory name of LayoutPreference.
The LayoutPreference is in settingslib so it's pretty clear
it's a settings widget.
Test: Rebuild SettingsLib and robotest Settings
Change-Id: Ic5004c42ad08b0a7f31a2716e4af067da19b6fa2
Fixes: 120706174
This reverts commit 2c8d699c97.
Reason for revert: broke build when combined with ag/5781147
Bug: 120706174
Change-Id: I67d5a020c8c283344457643bb3ee6585b63f53c4
- Rename lib name of ActionButtonsPreference and LayoutPreference.
- Remove Settings* prefix for directory name of LayoutPreference.
The LayoutPreference is in settingslib so it's pretty clear
it's a settings widget.
Test: Rebuild SettingsLib and robotest Settings
Change-Id: Ief827067dec85bb5b3ce07d97723c0323aece294
Fixes: 120706174
- Create a library named EntityHeaderWidgets, it can contains
other entity header wdigets in the future.
- Create a controller of AppEntitiesHeader,
then user can initialize its view easily.
Test: visual, robotest
Change-Id: If11b3eba75334f66b72472b2139e0e7d93984dce
Fixes: 117621156
- Rename lib name of ActionButtonsPreference and LayoutPreference.
- Remove Settings* prefix for directory name of LayoutPreference.
The LayoutPreference is in settingslib so it's pretty clear
it's a settings widget.
Test: Rebuild
Change-Id: I8f4b8643ee4b2cb3756d1c3e82d91021916e08c2
Fixes: 120706174
Since this widget will be used by other app,
we move it into SettingsLib.
Test: robotest
Bug: 120005054
Change-Id: Ib54b33d676ca6f742f18fae398a36b217340373c