Commit Graph

31 Commits

Author SHA1 Message Date
Evan Severson
80ed3ae416 Create module for settingslib which don't require platform_apis
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
2020-05-27 19:23:35 +00:00
Sunny Shao
ffc352b9f9 Remove feature flag, unused lib and test cases
Fixes: 155949554
Test: make RunSettingsLibRoboTests -j56
Change-Id: I54a31aed503f7f058887720ab4fe01ca2f39ff93
2020-05-25 13:38:54 +08:00
Steven Liu
cbbf56d7a7 Seperate WifiTrackerLib from other components.
To reduce the maintain effort for customizing WifiTrackerLib.

Bug: 146652802
Test: build

Change-Id: I335e8357bbc6dd423f3e6c25fbbfe9dd3ae5834e
2020-03-09 07:25:19 -07:00
Sunny Shao
9de5cca3fe Add a SchedulesProvider
- Provide an abstract api named getScheduleInfoList.
- Implement a ScheduleInfo class.

Fixes: 148995400
Test: compilation
Change-Id: I236627daa478fb2d2d138a8832680b1ec2464b3b
2020-02-13 17:04:20 +08:00
Tsung-Mao Fang
9e9910267a Create a util method to get icon badged.
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
2020-02-06 16:55:12 +08:00
Al Sutton
e5e7916b06 Extract common display density configuraiton code
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
2019-08-28 07:03:57 +01:00
Quang Luong
714cd06b02 Added WifiEntryPreference as WifiEntry version of AccessPointPreference
Added WifiEntryPreference and LongPressWifiEntryPreference to replace
AccessPointPreference using WifiEntry instead of AccessPoint.

Test: atest WifiEntryPreferenceTest && manual - visual verification with
dummy entries.
Bug: 70983952

Change-Id: I7234a9371737c32ee8d585c2802e4ce03a36a441
2019-08-21 18:49:08 -07:00
Raff Tsai
f2b34b9954 Move RadioButtonPreference from Settings to SettingsLib
Bug: 138620011
Test: build, make RunSettingsLibRoboTests
Change-Id: I49fc53503eb5bb3cdd6f2bae66e5d0b7808e5d3d
2019-08-01 12:47:09 +08:00
hughchen
ed6a4d2829 Separate library from SettingsLib
Separated library for following class:
- AdaptiveIcon.java
- AdaptiveIconShapeDrawable.java
- AdaptiveOutlineDrawable.java
- TileUtils.java
- DashboardCategory.java
- Tile.java

Bug: 128570540
Test: RunSettingsLibRoboTests
Change-Id: I616e68f6e5ac9afee805793e80374aabebc69ccb
2019-03-29 11:29:04 +08:00
Evan Laird
2259da403c Create a battery icon that loads paths
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
2019-02-26 13:42:03 -05:00
Joel Galenson
2c8d05c7a7 Add horizontal progress bar SettingsLib library.
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
2019-02-12 13:18:27 -08:00
TreeHugger Robot
6745b68f81 Merge "Provide java_defaults as a counterpart to the settings.mk file" 2019-02-05 19:40:23 +00:00
Sasha Smundak
0f019d083e Provide java_defaults as a counterpart to the settings.mk file
To be used during the Android.mk->Android.bp conversion.

Test: treehugger
Change-Id: I9e57744737430ff7e1ab57891dc81d1dd3bbcb83
2019-01-29 16:52:09 -08:00
Fan Zhang
391da986af Move ActionBarShadowController to settingslib.
And remove dependency to settingslib.core.Lifecycle. This class use
androidx.Lifecycle instead.

Bug: 123311100
Test: robotests
Change-Id: I80bbbf4bc2759e574d8dabf1799b3bded216f2f3
2019-01-29 15:51:31 -08:00
tmfang
2badb3e13b Create a bar char preference widget
- 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
2018-12-18 18:09:10 +08:00
tmfang
37e497c9c5 Rename two targets to have SettingsLib prefix
- 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
2018-12-14 18:11:41 +08:00
Colin Cross
cf132457d6 Revert "Rename two targets to have SettingsLib prefix"
This reverts commit 2c8d699c97.

Reason for revert: broke build when combined with ag/5781147
Bug: 120706174

Change-Id: I67d5a020c8c283344457643bb3ee6585b63f53c4
2018-12-13 03:14:54 +00:00
tmfang
2c8d699c97 Rename two targets to have SettingsLib prefix
- 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
2018-12-11 22:25:46 +08:00
tmfang
7bdcf69dea Create an AppEntitiesHeader widget
- 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
2018-12-11 17:04:56 +08:00
Fan Zhang
d7687f987d Revert "Rename two targets to have SettingsLib prefix"
This reverts commit 2f7fd418f6.

Reason for revert: broke settings presubmit

Change-Id: I3c72ea8949c5a4df858f3dfc2a931786cad4cb83
2018-12-10 21:58:01 +00:00
tmfang
2f7fd418f6 Rename two targets to have SettingsLib prefix
- 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
2018-12-08 23:51:35 +08:00
tmfang
be96afdcef Move ActionButtonPreference into SettingsLib
Since this widget will be used by other app,
we move it into SettingsLib.

Test: robotest
Bug: 120005054
Change-Id: Ib54b33d676ca6f742f18fae398a36b217340373c
2018-12-03 11:05:10 +08:00
tmfang
baee8e97f5 Move LayoutPreference into SettingsLib
- Since LayoutPreference will be used by other apps,
  we move it into SettingsLibs

Test: robotest
Bug: 120005054
Change-Id: Iec509cbd9f27d9f0172c7d035b0f7797d1528380
2018-11-26 19:24:16 +08:00
hughchen
b89929aae6 Implement MediaDevice for seamless transfer
Bug: 117129183
Test: Build pass
Change-Id: I467dff44c9e6fd65a4fac8da1367aebb4e208859
2018-11-13 10:31:48 +08:00
Colin Cross
c31dc3f21f Use static_libs for androidx dependencies
androidx dependencies should always be static, and Soong is
changing to match Make and not include resources from libraries
in libs.

Test: m checkbuild
Change-Id: I478856e7d4d380f5d2623885e04d3923716b68e9
2018-10-17 16:24:58 -07:00
tmfang
cdf9a83ff2 Create a custom drop-down filter spinner
Create a drop-down filter widget let other apps can use it.
UX goal is to use this widget on a bunch of page.
For example, Permissions, All apps, Sunshine, etc.

Change-Id: I0e939388d307deff9bad51e3ef415043814ec49e
Fixes: 112706966
Test: robotests
2018-10-09 12:02:26 +08:00
Fan Zhang
f8165ccc70 Add search resources to settingslib-search
Bug: 113128828
Test: manual
Change-Id: I4202351ccf6afaa274f7cd718da2578c99f47b4e
2018-09-28 14:35:56 -07:00
Fan Zhang
5b8116d6c6 Move AppPreference to SettingsLib so other apps can use it.
Change-Id: I5240dcacdcd8b87a0965a0a9359cd7832b42e590
Fixes: 116364655
Test: robotests
2018-09-24 12:51:16 -07:00
Philip P. Moltmann
4e615e6986 Factor some RestrictedLockUtils out of SettingLib
Also make the new lib only use system-apis.

This allows mainline module to use the new
RestrictedLockUtilsSettingLib.

Unfortunately the whole RestrictedLockUtils would have caused to much
new system-api. Hence it was split into RestrictedLockUtils and
RestrictedLockUtilsInternal. This caused a lot of trivial code changes.

Bug: 110953302
Test: Built
Change-Id: I693b3bf56f3be71f0790776e3aad5694717786ef
2018-08-30 11:59:29 -07:00
Philip P. Moltmann
51c6c4c2b8 Factor out HelpUtils into @SystemAPI lib
This is the first of a few sub-libraries that will get factored out of
the settings lib. These libs will be included by mainline modules which
are compiles against system-api.

Bug: 110953302
Test: Looked at UI
      m -j RunRoboSettingsLibTests
Change-Id: I16347e565aca554d6a8653df35765c2194479e78
2018-08-29 09:26:12 -07:00
Jason Monk
a2f2d82f26 Convert sysui to bp
Test: tests gonna test, builds gonna build
Change-Id: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
2018-08-16 19:40:39 -04:00