Loading packages/SettingsLib/Android.bp +42 −30 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ package { } android_library { name: "SettingsLib", static_libs: [ Loading @@ -26,44 +25,20 @@ android_library { "iconloader", "WifiTrackerLibRes", "SettingsLibHelpUtils", "SettingsLibRestrictedLockUtils", "SettingsLibActionBarShadow", "SettingsLibAppPreference", "SettingsLibSearchWidget", "SettingsLibSettingsSpinner", "SettingsLibIllustrationPreference", "SettingsLibLayoutPreference", "SettingsLibMainSwitchPreference", "SettingsLibActionButtonsPreference", "SettingsLibEntityHeaderWidgets", "SettingsLibBarChartPreference", "SettingsLibProgressBar", "SettingsLibAdaptiveIcon", "SettingsLibRadioButtonPreference", "SettingsLibSelectorWithWidgetPreference", "SettingsLibDeviceStateRotationLock", "SettingsLibDisplayUtils", "SettingsLibUtils", "SettingsLibEmergencyNumber", "SettingsLibTopIntroPreference", "SettingsLibBannerMessagePreference", "SettingsLibFooterPreference", "SettingsLibUsageProgressBarPreference", "SettingsLibCollapsingToolbarBaseActivity", "SettingsLibTwoTargetPreference", "SettingsLibSettingsTransition", "SettingsLibButtonPreference", "SettingsLibDeviceStateRotationLock", "SettingsLibProfileSelector", "SettingsLibSearchWidget", "SettingsLibUtils", "SettingsLibWidget", "setupdesign", "zxing-core-1.7", "androidx.room_room-runtime", "settingslib_flags_lib", ], plugins: ["androidx.room_room-compiler-plugin"], use_resource_processor: true, resource_dirs: ["res"], srcs: [ Loading @@ -72,6 +47,43 @@ android_library { ], } // Group all the libraries with namespace "com.android.settingslib.widget", to allow SettingsLib to // set use_resource_processor = true. // We can remove SettingsLibWidget when all these libraries have its own namespace. android_library { name: "SettingsLibWidget", visibility: ["//visibility:private"], manifest: "AndroidManifest-SettingsLibWidget.xml", static_libs: [ "SettingsLibActionBarShadow", "SettingsLibActionButtonsPreference", "SettingsLibAdaptiveIcon", "SettingsLibAppPreference", "SettingsLibBannerMessagePreference", "SettingsLibBarChartPreference", "SettingsLibButtonPreference", "SettingsLibCollapsingToolbarBaseActivity", "SettingsLibEntityHeaderWidgets", "SettingsLibFooterPreference", "SettingsLibHelpUtils", "SettingsLibIllustrationPreference", "SettingsLibLayoutPreference", "SettingsLibMainSwitchPreference", "SettingsLibProfileSelector", "SettingsLibProgressBar", "SettingsLibRadioButtonPreference", "SettingsLibRestrictedLockUtils", "SettingsLibSelectorWithWidgetPreference", "SettingsLibSettingsSpinner", "SettingsLibSettingsTransition", "SettingsLibTopIntroPreference", "SettingsLibTwoTargetPreference", "SettingsLibUsageProgressBarPreference", ], resource_dirs: [], } // NOTE: Keep this module in sync with ./common.mk java_defaults { name: "SettingsLibDefaults", Loading packages/SettingsLib/AndroidManifest-SettingsLibWidget.xml 0 → 100644 +18 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2023 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <manifest package="com.android.settingslib.widget" /> packages/SettingsLib/src/com/android/settingslib/RestrictedSwitchPreference.java +2 −2 Original line number Diff line number Diff line Loading @@ -126,10 +126,10 @@ public class RestrictedSwitchPreference extends SwitchPreference { switchSummary = isChecked() ? getUpdatableEnterpriseString( getContext(), ENABLED_BY_ADMIN_SWITCH_SUMMARY, R.string.enabled_by_admin) com.android.settingslib.widget.R.string.enabled_by_admin) : getUpdatableEnterpriseString( getContext(), DISABLED_BY_ADMIN_SWITCH_SUMMARY, R.string.disabled_by_admin); com.android.settingslib.widget.R.string.disabled_by_admin); } else { switchSummary = mRestrictedSwitchSummary; } Loading packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java +2 −1 Original line number Diff line number Diff line Loading @@ -1776,7 +1776,8 @@ public class ApplicationsState { final int userId = UserHandle.getUserId(this.info.uid); if (UserManager.get(context).isManagedProfile(userId)) { this.labelDescription = context.getString( com.android.settingslib.R.string.accessibility_work_profile_app_description, com.android.settingslib.utils.R .string.accessibility_work_profile_app_description, this.label); } else { this.labelDescription = this.label; Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/BroadcastDialog.java +2 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,8 @@ public class BroadcastDialog extends AlertDialog { View layout = View.inflate(mContext, R.layout.broadcast_dialog, null); final Window window = getWindow(); window.setContentView(layout); window.setWindowAnimations(R.style.Theme_AlertDialog_SettingsLib); window.setWindowAnimations( com.android.settingslib.widget.R.style.Theme_AlertDialog_SettingsLib); TextView title = layout.findViewById(R.id.dialog_title); TextView subTitle = layout.findViewById(R.id.dialog_subtitle); Loading Loading
packages/SettingsLib/Android.bp +42 −30 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ package { } android_library { name: "SettingsLib", static_libs: [ Loading @@ -26,44 +25,20 @@ android_library { "iconloader", "WifiTrackerLibRes", "SettingsLibHelpUtils", "SettingsLibRestrictedLockUtils", "SettingsLibActionBarShadow", "SettingsLibAppPreference", "SettingsLibSearchWidget", "SettingsLibSettingsSpinner", "SettingsLibIllustrationPreference", "SettingsLibLayoutPreference", "SettingsLibMainSwitchPreference", "SettingsLibActionButtonsPreference", "SettingsLibEntityHeaderWidgets", "SettingsLibBarChartPreference", "SettingsLibProgressBar", "SettingsLibAdaptiveIcon", "SettingsLibRadioButtonPreference", "SettingsLibSelectorWithWidgetPreference", "SettingsLibDeviceStateRotationLock", "SettingsLibDisplayUtils", "SettingsLibUtils", "SettingsLibEmergencyNumber", "SettingsLibTopIntroPreference", "SettingsLibBannerMessagePreference", "SettingsLibFooterPreference", "SettingsLibUsageProgressBarPreference", "SettingsLibCollapsingToolbarBaseActivity", "SettingsLibTwoTargetPreference", "SettingsLibSettingsTransition", "SettingsLibButtonPreference", "SettingsLibDeviceStateRotationLock", "SettingsLibProfileSelector", "SettingsLibSearchWidget", "SettingsLibUtils", "SettingsLibWidget", "setupdesign", "zxing-core-1.7", "androidx.room_room-runtime", "settingslib_flags_lib", ], plugins: ["androidx.room_room-compiler-plugin"], use_resource_processor: true, resource_dirs: ["res"], srcs: [ Loading @@ -72,6 +47,43 @@ android_library { ], } // Group all the libraries with namespace "com.android.settingslib.widget", to allow SettingsLib to // set use_resource_processor = true. // We can remove SettingsLibWidget when all these libraries have its own namespace. android_library { name: "SettingsLibWidget", visibility: ["//visibility:private"], manifest: "AndroidManifest-SettingsLibWidget.xml", static_libs: [ "SettingsLibActionBarShadow", "SettingsLibActionButtonsPreference", "SettingsLibAdaptiveIcon", "SettingsLibAppPreference", "SettingsLibBannerMessagePreference", "SettingsLibBarChartPreference", "SettingsLibButtonPreference", "SettingsLibCollapsingToolbarBaseActivity", "SettingsLibEntityHeaderWidgets", "SettingsLibFooterPreference", "SettingsLibHelpUtils", "SettingsLibIllustrationPreference", "SettingsLibLayoutPreference", "SettingsLibMainSwitchPreference", "SettingsLibProfileSelector", "SettingsLibProgressBar", "SettingsLibRadioButtonPreference", "SettingsLibRestrictedLockUtils", "SettingsLibSelectorWithWidgetPreference", "SettingsLibSettingsSpinner", "SettingsLibSettingsTransition", "SettingsLibTopIntroPreference", "SettingsLibTwoTargetPreference", "SettingsLibUsageProgressBarPreference", ], resource_dirs: [], } // NOTE: Keep this module in sync with ./common.mk java_defaults { name: "SettingsLibDefaults", Loading
packages/SettingsLib/AndroidManifest-SettingsLibWidget.xml 0 → 100644 +18 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2023 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <manifest package="com.android.settingslib.widget" />
packages/SettingsLib/src/com/android/settingslib/RestrictedSwitchPreference.java +2 −2 Original line number Diff line number Diff line Loading @@ -126,10 +126,10 @@ public class RestrictedSwitchPreference extends SwitchPreference { switchSummary = isChecked() ? getUpdatableEnterpriseString( getContext(), ENABLED_BY_ADMIN_SWITCH_SUMMARY, R.string.enabled_by_admin) com.android.settingslib.widget.R.string.enabled_by_admin) : getUpdatableEnterpriseString( getContext(), DISABLED_BY_ADMIN_SWITCH_SUMMARY, R.string.disabled_by_admin); com.android.settingslib.widget.R.string.disabled_by_admin); } else { switchSummary = mRestrictedSwitchSummary; } Loading
packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java +2 −1 Original line number Diff line number Diff line Loading @@ -1776,7 +1776,8 @@ public class ApplicationsState { final int userId = UserHandle.getUserId(this.info.uid); if (UserManager.get(context).isManagedProfile(userId)) { this.labelDescription = context.getString( com.android.settingslib.R.string.accessibility_work_profile_app_description, com.android.settingslib.utils.R .string.accessibility_work_profile_app_description, this.label); } else { this.labelDescription = this.label; Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/BroadcastDialog.java +2 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,8 @@ public class BroadcastDialog extends AlertDialog { View layout = View.inflate(mContext, R.layout.broadcast_dialog, null); final Window window = getWindow(); window.setContentView(layout); window.setWindowAnimations(R.style.Theme_AlertDialog_SettingsLib); window.setWindowAnimations( com.android.settingslib.widget.R.style.Theme_AlertDialog_SettingsLib); TextView title = layout.findViewById(R.id.dialog_title); TextView subTitle = layout.findViewById(R.id.dialog_subtitle); Loading