Rename RadioButtonPreference to SelectorWithWidgetPreference, and add a checkbox styling option.
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
diff --git a/packages/SettingsLib/SelectorWithWidgetPreference/Android.bp b/packages/SettingsLib/SelectorWithWidgetPreference/Android.bp
new file mode 100644
index 0000000..bcc64d3
--- /dev/null
+++ b/packages/SettingsLib/SelectorWithWidgetPreference/Android.bp
@@ -0,0 +1,27 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "frameworks_base_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["frameworks_base_license"],
+}
+
+android_library {
+ name: "SettingsLibSelectorWithWidgetPreference",
+
+ srcs: ["src/**/*.java"],
+ resource_dirs: ["res"],
+
+ static_libs: [
+ "androidx.preference_preference",
+ "SettingsLibSettingsTheme",
+ ],
+
+ sdk_version: "system_current",
+ min_sdk_version: "21",
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.permission",
+ ],
+}