diff --git a/Settings/AndroidManifest.xml b/Settings/AndroidManifest.xml index aed51f3e..382c4c86 100644 --- a/Settings/AndroidManifest.xml +++ b/Settings/AndroidManifest.xml @@ -806,7 +806,7 @@ + android:theme="@style/Theme.Material3.DayNight.BottomSheetDialog"/> diff --git a/Settings/build.gradle b/Settings/build.gradle index b24a7103..30c98931 100644 --- a/Settings/build.gradle +++ b/Settings/build.gradle @@ -1,6 +1,8 @@ plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) + alias(libs.plugins.atomicfu) + alias(libs.plugins.protobuf) } //preBuild { @@ -45,6 +47,7 @@ android { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] res.srcDirs = ['res', 'res-export', 'res-product'] + proto.srcDirs = ['protos'] } buildTypes { @@ -60,17 +63,26 @@ android { kotlinOptions { jvmTarget = '17' } + + buildFeatures { + compose true + } + + composeOptions { + kotlinCompilerExtensionVersion = '1.5.0' // 假设1.4.0支持Kotlin 1.9.0 + } } dependencies { + compileOnly files('../libs/framework.jar') implementation libs.navigation.fragment.ktx implementation libs.window.window.java implementation libs.gson implementation libs.guava implementation files('../libs/BiometricsSharedLib.jar') + implementation files('../libs/BiometricsSharedLib-java.jar') implementation files('../libs/SystemUIUnfoldLib.jar') - implementation project(':WifiTrackerLib') implementation files('../libs/android.hardware.dumpstate-V1-java.jar') implementation files('../libs/android.hardware.dumpstate-V1.0-java.jar') implementation files('../libs/android.hardware.dumpstate-V1.1-java.jar') @@ -78,12 +90,55 @@ dependencies { implementation files('../libs/net-utils-framework-common.jar') implementation files('../libs/notification_flags_lib.jar') implementation files('../libs/securebox.jar') + + implementation files('../libs/FingerprintManagerInteractor.jar') + implementation files('../libs/MediaDrmSettingsFlagsLib.jar') + implementation files('../libs/Settings-change-ids.jar') + // SettingsLib的依赖在后面整体配置 + implementation files('../libs/aconfig_settings_flags_lib.jar') + implementation files('../libs/accessibility_settings_flags_lib.jar') + implementation files('../libs/app-usage-event-protos-lite.jar') + implementation files('../libs/battery-event-protos-lite.jar') + implementation files('../libs/battery-usage-slot-protos-lite.jar') implementation files('./libs/contextualcards.aar') + implementation files('../libs/development_settings_flag_lib.jar') + implementation files('../libs/factory_reset_flags_lib.jar') + implementation files('../libs/fuelgauge-log-protos-lite.jar') + implementation files('../libs/fuelgauge-usage-state-protos-lite.jar') + implementation files('../libs/power-anomaly-event-protos-lite.jar') + implementation files('../libs/settings-contextual-card-protos-lite.jar') + implementation files('../libs/settings-log-bridge-protos-lite.jar') + implementation files('../libs/settings-logtags.jar') + implementation files('../libs/settings-telephony-protos-lite.jar') + implementation files('../libs/setupdesign-lottie-loading-layout.jar') + + implementation files('../libs/statslog-settings.jar') + implementation files('../libs/settingslib_flags_lib.jar') + implementation files('../libs/wifi_aconfig_flags_lib.jar') + implementation files('../libs/android.view.accessibility.flags-aconfig-java.jar') + implementation files('../libs/telephony_flags_core_java_lib.jar') + + +// implementation files('../libs/SystemUISharedLib.jar') + implementation libs.androidx.appcompat + implementation libs.material + implementation libs.slice.builders + implementation libs.slice.core + implementation libs.slice.view + implementation libs.lottie +// implementation libs.compose.ui + implementation libs.compose.material3 + implementation libs.material.icons.core + implementation libs.preference + implementation libs.room.runtime + annotationProcessor libs.room.compiler + implementation libs.atomicfu implementation(project(':SettingsLib')) implementation(project(':SettingsLib:search')) implementation project(':SettingsLib:ActionBarShadow') implementation project(':SettingsLib:ActionButtonsPreference') + implementation project(':SettingsLib:ActivityEmbedding') implementation project(':SettingsLib:AdaptiveIcon') implementation project(':SettingsLib:AppPreference') implementation project(':SettingsLib:BannerMessagePreference') @@ -91,6 +146,7 @@ dependencies { implementation project(':SettingsLib:ButtonPreference') implementation project(':SettingsLib:CollapsingToolbarBaseActivity') implementation project(':SettingsLib:Color') + implementation project(':SettingsLib:DataStore') implementation project(':SettingsLib:DeviceStateRotationLock') implementation project(':SettingsLib:DisplayUtils') implementation project(':SettingsLib:EmergencyNumber') @@ -113,4 +169,40 @@ dependencies { implementation project(':SettingsLib:TwoTargetPreference') implementation project(':SettingsLib:UsageProgressBarPreference') implementation project(':SettingsLib:Utils') + + implementation project(':WifiTrackerLib') + implementation project(':setupdesign') + implementation project(':setupcompat') + implementation project(':iconloaderlib') +// implementation project(':lottie_loading_layout') + implementation project(':spa') + implementation project(':SettingsLib:SpaPrivileged') + + implementation libs.protobuf.javalite + implementation libs.protoc + implementation libs.zxing + implementation files('../libs/settingslib_media_flags_lib.jar') + implementation files('../libs/core-all.jar') + implementation libs.dagger + annotationProcessor libs.dagger.compiler } +protobuf { + protoc { + // 通用 artifact + artifact = 'com.google.protobuf:protoc:3.8.0' + // MacOS + if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) { + artifact = 'com.google.protobuf:protoc:3.8.0:osx-x86_64' + } + } + generateProtoTasks { + all().each { task -> + task.builtins { + remove java + java { + option "lite" + } + } + } + } +} \ No newline at end of file diff --git a/Settings/res/color/dream_card_color_state_list.xml b/Settings/res/color/dream_card_color_state_list.xml index 082408d1..fdac2d24 100644 --- a/Settings/res/color/dream_card_color_state_list.xml +++ b/Settings/res/color/dream_card_color_state_list.xml @@ -17,6 +17,6 @@ - - + + \ No newline at end of file diff --git a/Settings/res/color/dream_card_icon_color_state_list.xml b/Settings/res/color/dream_card_icon_color_state_list.xml index ed34ae39..3579b634 100644 --- a/Settings/res/color/dream_card_icon_color_state_list.xml +++ b/Settings/res/color/dream_card_icon_color_state_list.xml @@ -17,6 +17,6 @@ - - + + \ No newline at end of file diff --git a/Settings/res/color/dream_card_summary_color_state_list.xml b/Settings/res/color/dream_card_summary_color_state_list.xml index a1845f44..0ebf7a7b 100644 --- a/Settings/res/color/dream_card_summary_color_state_list.xml +++ b/Settings/res/color/dream_card_summary_color_state_list.xml @@ -17,6 +17,6 @@ - - + + \ No newline at end of file diff --git a/Settings/res/color/dream_card_text_color_state_list.xml b/Settings/res/color/dream_card_text_color_state_list.xml index b39bbed7..eeb1fa7d 100644 --- a/Settings/res/color/dream_card_text_color_state_list.xml +++ b/Settings/res/color/dream_card_text_color_state_list.xml @@ -17,6 +17,6 @@ - - + + \ No newline at end of file diff --git a/Settings/res/drawable/accessibility_contrast_button_background.xml b/Settings/res/drawable/accessibility_contrast_button_background.xml index 281fcef2..f5cafd0c 100644 --- a/Settings/res/drawable/accessibility_contrast_button_background.xml +++ b/Settings/res/drawable/accessibility_contrast_button_background.xml @@ -22,9 +22,9 @@ - + @@ -41,7 +41,7 @@ android:viewportHeight="24" android:tint="?attr/colorControlNormal"> @@ -55,7 +55,7 @@ android:left="@dimen/contrast_button_stroke_width" android:right="@dimen/contrast_button_stroke_width"> - + diff --git a/Settings/res/drawable/action_button_bg.xml b/Settings/res/drawable/action_button_bg.xml index b50cc414..51e00fe1 100644 --- a/Settings/res/drawable/action_button_bg.xml +++ b/Settings/res/drawable/action_button_bg.xml @@ -26,7 +26,7 @@ + android:color="?attr/colorAccentPrimaryVariant"/> diff --git a/Settings/res/drawable/battery_hints_chip_bg.xml b/Settings/res/drawable/battery_hints_chip_bg.xml index c2b662c2..48ac88b0 100644 --- a/Settings/res/drawable/battery_hints_chip_bg.xml +++ b/Settings/res/drawable/battery_hints_chip_bg.xml @@ -18,6 +18,6 @@ - + \ No newline at end of file diff --git a/Settings/res/drawable/broadcast_button_outline.xml b/Settings/res/drawable/broadcast_button_outline.xml index c8658a9f..ad96e4b3 100644 --- a/Settings/res/drawable/broadcast_button_outline.xml +++ b/Settings/res/drawable/broadcast_button_outline.xml @@ -29,7 +29,7 @@ - - + \ No newline at end of file diff --git a/Settings/res/drawable/color_contrast_preview_bottom_appbar_background.xml b/Settings/res/drawable/color_contrast_preview_bottom_appbar_background.xml index f3392fb0..93801012 100644 --- a/Settings/res/drawable/color_contrast_preview_bottom_appbar_background.xml +++ b/Settings/res/drawable/color_contrast_preview_bottom_appbar_background.xml @@ -17,7 +17,7 @@ - + - + diff --git a/Settings/res/drawable/color_contrast_preview_dialog_background.xml b/Settings/res/drawable/color_contrast_preview_dialog_background.xml index f60a271e..5151df19 100644 --- a/Settings/res/drawable/color_contrast_preview_dialog_background.xml +++ b/Settings/res/drawable/color_contrast_preview_dialog_background.xml @@ -17,6 +17,6 @@ - + \ No newline at end of file diff --git a/Settings/res/drawable/color_contrast_preview_icon_edit_background.xml b/Settings/res/drawable/color_contrast_preview_icon_edit_background.xml index 14c5f3c9..317dfc9b 100644 --- a/Settings/res/drawable/color_contrast_preview_icon_edit_background.xml +++ b/Settings/res/drawable/color_contrast_preview_icon_edit_background.xml @@ -17,6 +17,6 @@ - + \ No newline at end of file diff --git a/Settings/res/drawable/color_contrast_preview_icon_group_background.xml b/Settings/res/drawable/color_contrast_preview_icon_group_background.xml index b8554c19..1f42b9e7 100644 --- a/Settings/res/drawable/color_contrast_preview_icon_group_background.xml +++ b/Settings/res/drawable/color_contrast_preview_icon_group_background.xml @@ -17,6 +17,6 @@ - + \ No newline at end of file diff --git a/Settings/res/drawable/color_contrast_preview_icon_inbox_background.xml b/Settings/res/drawable/color_contrast_preview_icon_inbox_background.xml index 45d82852..a72a02ae 100644 --- a/Settings/res/drawable/color_contrast_preview_icon_inbox_background.xml +++ b/Settings/res/drawable/color_contrast_preview_icon_inbox_background.xml @@ -17,7 +17,7 @@ - + \ No newline at end of file diff --git a/Settings/res/drawable/color_contrast_preview_icon_star_background.xml b/Settings/res/drawable/color_contrast_preview_icon_star_background.xml index 335ee886..2d4551df 100644 --- a/Settings/res/drawable/color_contrast_preview_icon_star_background.xml +++ b/Settings/res/drawable/color_contrast_preview_icon_star_background.xml @@ -17,6 +17,6 @@ - + \ No newline at end of file diff --git a/Settings/res/drawable/color_contrast_preview_tag_background.xml b/Settings/res/drawable/color_contrast_preview_tag_background.xml index a7b051aa..58fb31bc 100644 --- a/Settings/res/drawable/color_contrast_preview_tag_background.xml +++ b/Settings/res/drawable/color_contrast_preview_tag_background.xml @@ -17,6 +17,6 @@ - + \ No newline at end of file diff --git a/Settings/res/drawable/dream_default_preview_icon.xml b/Settings/res/drawable/dream_default_preview_icon.xml index 8989929f..f2cdbbe2 100644 --- a/Settings/res/drawable/dream_default_preview_icon.xml +++ b/Settings/res/drawable/dream_default_preview_icon.xml @@ -20,6 +20,6 @@ android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> - \ No newline at end of file diff --git a/Settings/res/drawable/dream_preview_rounded_bg.xml b/Settings/res/drawable/dream_preview_rounded_bg.xml index 7cae599b..477ffb6f 100644 --- a/Settings/res/drawable/dream_preview_rounded_bg.xml +++ b/Settings/res/drawable/dream_preview_rounded_bg.xml @@ -17,6 +17,6 @@ - + \ No newline at end of file diff --git a/Settings/res/drawable/ic_article_24dp.xml b/Settings/res/drawable/ic_article_24dp.xml index 0b38daaf..e73d6313 100644 --- a/Settings/res/drawable/ic_article_24dp.xml +++ b/Settings/res/drawable/ic_article_24dp.xml @@ -22,6 +22,6 @@ android:tint="?attr/colorControlNormal" android:autoMirrored="true"> diff --git a/Settings/res/drawable/ic_article_filled_24dp.xml b/Settings/res/drawable/ic_article_filled_24dp.xml index e22d151b..2344aa9c 100644 --- a/Settings/res/drawable/ic_article_filled_24dp.xml +++ b/Settings/res/drawable/ic_article_filled_24dp.xml @@ -21,6 +21,6 @@ android:viewportHeight="24" android:tint="?attr/colorControlNormal"> diff --git a/Settings/res/drawable/ic_chat_bubble_24dp.xml b/Settings/res/drawable/ic_chat_bubble_24dp.xml index c7ad6bf2..4b72af9a 100644 --- a/Settings/res/drawable/ic_chat_bubble_24dp.xml +++ b/Settings/res/drawable/ic_chat_bubble_24dp.xml @@ -21,6 +21,6 @@ android:viewportHeight="24" android:tint="?attr/colorControlNormal"> diff --git a/Settings/res/drawable/ic_check_24dp.xml b/Settings/res/drawable/ic_check_24dp.xml index 0ed6b325..99b2bbb3 100644 --- a/Settings/res/drawable/ic_check_24dp.xml +++ b/Settings/res/drawable/ic_check_24dp.xml @@ -18,7 +18,7 @@ android:height="24dp" android:viewportWidth="24.0" android:viewportHeight="24.0" - android:tint="?androidprv:attr/colorAccent"> + android:tint="?attr/colorAccent"> diff --git a/Settings/res/drawable/ic_edit_24dp.xml b/Settings/res/drawable/ic_edit_24dp.xml index c9dbfc33..20269202 100644 --- a/Settings/res/drawable/ic_edit_24dp.xml +++ b/Settings/res/drawable/ic_edit_24dp.xml @@ -21,6 +21,6 @@ android:viewportHeight="24" android:tint="?attr/colorControlNormal"> diff --git a/Settings/res/drawable/ic_group_24dp.xml b/Settings/res/drawable/ic_group_24dp.xml index 92815c2c..32091044 100644 --- a/Settings/res/drawable/ic_group_24dp.xml +++ b/Settings/res/drawable/ic_group_24dp.xml @@ -21,6 +21,6 @@ android:viewportHeight="24" android:tint="?attr/colorControlNormal"> diff --git a/Settings/res/drawable/ic_inbox_24dp.xml b/Settings/res/drawable/ic_inbox_24dp.xml index 7800ea14..921402e0 100644 --- a/Settings/res/drawable/ic_inbox_24dp.xml +++ b/Settings/res/drawable/ic_inbox_24dp.xml @@ -21,6 +21,6 @@ android:viewportHeight="24" android:tint="?attr/colorControlNormal"> diff --git a/Settings/res/drawable/ic_modifier_keys_reset.xml b/Settings/res/drawable/ic_modifier_keys_reset.xml index 5345c257..8d845c3e 100644 --- a/Settings/res/drawable/ic_modifier_keys_reset.xml +++ b/Settings/res/drawable/ic_modifier_keys_reset.xml @@ -21,7 +21,7 @@ android:height="24.0dp" android:viewportWidth="24.0" android:viewportHeight="24.0" - android:tint="?androidprv:attr/materialColorPrimary"> + android:tint="?attr/materialColorPrimary"> diff --git a/Settings/res/drawable/ic_star_24dp.xml b/Settings/res/drawable/ic_star_24dp.xml index 38535e6c..97e538e4 100644 --- a/Settings/res/drawable/ic_star_24dp.xml +++ b/Settings/res/drawable/ic_star_24dp.xml @@ -21,6 +21,6 @@ android:viewportHeight="24" android:tint="?attr/colorControlNormal"> diff --git a/Settings/res/drawable/modifier_key_bordered.xml b/Settings/res/drawable/modifier_key_bordered.xml index 29316796..fc569623 100644 --- a/Settings/res/drawable/modifier_key_bordered.xml +++ b/Settings/res/drawable/modifier_key_bordered.xml @@ -25,7 +25,7 @@ + android:color="?attr/materialColorPrimary"/> diff --git a/Settings/res/drawable/modifier_key_colored.xml b/Settings/res/drawable/modifier_key_colored.xml index 995d7336..f76feb65 100644 --- a/Settings/res/drawable/modifier_key_colored.xml +++ b/Settings/res/drawable/modifier_key_colored.xml @@ -22,7 +22,7 @@ - + diff --git a/Settings/res/drawable/modifier_key_lisetview_background.xml b/Settings/res/drawable/modifier_key_lisetview_background.xml index 3353cfda..26e4d523 100644 --- a/Settings/res/drawable/modifier_key_lisetview_background.xml +++ b/Settings/res/drawable/modifier_key_lisetview_background.xml @@ -22,7 +22,7 @@ - + diff --git a/Settings/res/drawable/rounded_bg.xml b/Settings/res/drawable/rounded_bg.xml index ae12af89..41b5c039 100644 --- a/Settings/res/drawable/rounded_bg.xml +++ b/Settings/res/drawable/rounded_bg.xml @@ -17,7 +17,7 @@ - + - + android:color="?attr/materialColorPrimary"/> diff --git a/Settings/res/drawable/trackpad_button_done_colored.xml b/Settings/res/drawable/trackpad_button_done_colored.xml index 995d7336..f76feb65 100644 --- a/Settings/res/drawable/trackpad_button_done_colored.xml +++ b/Settings/res/drawable/trackpad_button_done_colored.xml @@ -22,7 +22,7 @@ - + diff --git a/Settings/res/drawable/user_select_background.xml b/Settings/res/drawable/user_select_background.xml index 7b751602..819efe2c 100644 --- a/Settings/res/drawable/user_select_background.xml +++ b/Settings/res/drawable/user_select_background.xml @@ -19,13 +19,13 @@ android:color="@color/settingslib_ripple_color"> - + - + diff --git a/Settings/res/drawable/volume_dialog_button_background_outline.xml b/Settings/res/drawable/volume_dialog_button_background_outline.xml index 36ffb93f..94fca464 100644 --- a/Settings/res/drawable/volume_dialog_button_background_outline.xml +++ b/Settings/res/drawable/volume_dialog_button_background_outline.xml @@ -21,7 +21,7 @@ - + \ No newline at end of file diff --git a/Settings/res/layout/accessibility_color_contrast_preview.xml b/Settings/res/layout/accessibility_color_contrast_preview.xml index 2646709d..edfd2991 100644 --- a/Settings/res/layout/accessibility_color_contrast_preview.xml +++ b/Settings/res/layout/accessibility_color_contrast_preview.xml @@ -28,7 +28,7 @@ + android:textColor="?attr/materialColorOnSurface"/> + android:textColor="?attr/materialColorOnSurface"/> + android:textColor="?attr/materialColorOnSurface"/> + android:textColor="?attr/materialColorOnSurfaceVariant"/> + android:tint="?attr/materialColorPrimary"/> diff --git a/Settings/res/layout/power_anomaly_hints.xml b/Settings/res/layout/power_anomaly_hints.xml index 3781046e..4df04218 100644 --- a/Settings/res/layout/power_anomaly_hints.xml +++ b/Settings/res/layout/power_anomaly_hints.xml @@ -38,6 +38,6 @@ android:paddingHorizontal="8dp" android:textAlignment="viewStart" android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle2" - android:textColor="?androidprv:attr/materialColorOnSurface"/> + android:textColor="?attr/materialColorOnSurface"/> \ No newline at end of file diff --git a/Settings/res/layout/private_space_confirm_deletion.xml b/Settings/res/layout/private_space_confirm_deletion.xml index 31418e1d..e3abeb75 100644 --- a/Settings/res/layout/private_space_confirm_deletion.xml +++ b/Settings/res/layout/private_space_confirm_deletion.xml @@ -14,17 +14,20 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - - - \ No newline at end of file + android:layout_height="match_parent"> + + + \ No newline at end of file diff --git a/Settings/res/layout/trackpad_gesture_preview.xml b/Settings/res/layout/trackpad_gesture_preview.xml index 15cc7431..54080f6a 100644 --- a/Settings/res/layout/trackpad_gesture_preview.xml +++ b/Settings/res/layout/trackpad_gesture_preview.xml @@ -82,7 +82,7 @@ android:paddingVertical="14dp" android:drawablePadding="9dp" style="@style/TrackpadButtonDone" - android:textColor="?androidprv:attr/materialColorOnPrimary" + android:textColor="?attr/materialColorOnPrimary" android:text="@string/gesture_button_next"/>