The change replaces all existing usage of private resources in
SettingsLib with corresponding public resources. The only exception
is android:string/config_headlineFontFamily where there's no proper
replaccement.
The library is currently used by bundled apps (such as SettingsGoogle)
and unbundled apps (such as PermissionController and
CellBroadcastReceiver). Since we still want these bundled apps to
reference config_headlineFontFamily properly while not breaking
unbundled apps due to them referencing private attributes, we added a
new attribute settingslib_config_headlineFontFamily (alongside with
other FontFamily variance for completeness) in
SettingsTheme/res/values-v31/strings.xml which points to
config_headlineFontFamily by default. Then, in separate CLs, we will add
resource overrides to these unbundled apps to replace the value of
settingslib_config_headlineFontFamily to point to a public value. While
this means that the style of the pages from the unbundled apps will be
different from the rest of SettingsLib clients, the change provides a
tactical fix to make sure that these unbundled apps won't crash when
shipped to other devices. We can address the issue at its core by
potentially exposing some private resources in future Android releases.
Bug: 191387775
Bug: 190964071
Bug: 196106314
Test: manual test to confirm this is a no-op CL.
Change-Id: Ie25950d9f54964aa40038a27b302ed017e4e4d15
- Remove the duplicated setting in the ContentDescription.
Bug: 191735947
Test: manual test
Test: make RunSettingsLibRoboTests -j ROBOTEST_FILTER=com.android.settingslib.widget
Change-Id: If28d0002dd1087173623b654c67bc7597d721a85
apply the new settings widget lib for the emergency alert main feature
switch.
Bug: 183574149
Test: Manual
Change-Id: Idfdb2696056faf3dbe4ccb0061f2b61c33e94292
using Switch Access.
- Disable the importantForAccessibility of the MainSwitchBar's
parent layout.
Fix: 182227784
Test: robotest and operate the switch preference manually
Change-Id: If1780361fcc7d7e0e53400d068ef4d2c31d6d8af
disabled.
- Use the switch style of SettingsTheme to make the switch UI
consistent.
Fix: 189062669
Test: robotest and operate the switch preference manually
Change-Id: Ic0280fd3986726008225530fd1705ad7df0b17a6
- It's because we refactored BuildCompat to BuildCompatUtils and didn't
replace it in another CL at the same time.
Fixes: 191628501
Test: rebuild
Change-Id: Ibeb231a268465f2642b9452c1760492a65c67254
happens off of the target region.
- Disable the focusable and clickable features.
Fix: 189079003
Test: robotest and test the switch manually
Change-Id: I0fa19c132ddfd5a3e010bf8328c6b84c1087d78b
RestrictedPreferenceHelper.
- Return the EnforcedAdmin object if the preference is retricted.
Bug: 179245126
Test: robotest and see the UI
Change-Id: I0687bb5e1bafa6c50f7c4e1400e6d4ed7c03c9b1
Add some new NewApi lint errors to lint-baseline.xml
Bug: 188805387
Test: m out/soong/.intermediates/frameworks/base/packages/SettingsLib/MainSwitchPreference/SettingsLibMainSwitchPreference/android_common/lint/lint-report.xml
Change-Id: Ia1077b3077cd14cb1b1f39352195558d0644a3f7
Merged-In: Ia1077b3077cd14cb1b1f39352195558d0644a3f7
(cherry picked from commit c1fe1ef47d)
Add the title to the content description of Switch.
Fix: 182228819
Fix: 182227784
Test: robotest and manually test the UI
Change-Id: I3cad922e903df783ee7eaf727b82f16f3345ff30
MainSwitchPreference should synchronize the switch state of
MainSwitchBar.
Fix: 187391143
Test: robotest and see the UI
Change-Id: Ifa3d21f7ce3ba6bdcfa3c254b2aa1a7668618829
The workaround is accessing the resources dynamically with
Resources.getIdentifier(), however this makes it incompatible with R8
which will think the resource is unused and remove it, resulting in a
runtime exception. There is currently no way to have consumer ProGuard
texts in Soong, and we cannot disable R8 for PermissionController
because it would severely regress our APK size and make build unhappy.
The real cause for the original test failure is that, Settings unit
test used to include SettingsLib libraries in its static_libs, and
this caused duplicate R classes to be included in its test APK (which
is already in Settings APK) and resulted in the wrong R class being
loaded when accessing resources from Settings context.
So we should remove the SettingsLib dependencies in Settings unit test
and remove the workaround here, to correctly fix the issue and unblock
R8 usage.
Bug: 183340630
Bug: 177638625
Bug: 183342958
Test: atest SettingsSliderPreferenceControllerTest
Test: atest PrivateVolumeForgetTest
Change-Id: I404892ccb7c2004ec3f81df69c1dc4bceed150df
We are enabling a new lint check where the min sdk != compile sdk.
It has produced a lot of errors and adding the baseline file(s)
allows us to continue work without introducing more problems.
Bug: 150847901
Test: m lint-check
Change-Id: Ide8a8fe80ba31396f23853ab266afcbcc33af9a6
Somehow Resource IDs are inconsistent between SettingsLib and
SettingsUnitTests. This is a workaround for NotFoundException
in SettingsUnitTests.
Bug: 183342958
Test: atest com.android.settings.deviceinfo.PrivateVolumeForgetTest
Change-Id: If513d5796d4dcd50261d9dd366f6a0def51e0ec4
- Fix the MainSwitchBar overlapping issue.
- Add setTitle method to support string resource id.
- Add setChecked method to fix the state of switch not sync issue.
- Get the resource id of title from xml.
Fix: 178425979
Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: I332b017c6a6e32e5ea3929d4b3c7e81104445bcc
- Update switch size
- Update title magrin right
- Use default text color
- Update switch margin right
- Support xml title attribute
Fix: 177967927
Fix: 177968636
Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: I226abbffc1539cc31e64f4a3b3723c95b40e5780
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