feat: 修改Android.bp为gradle的配置完成
This commit is contained in:
parent
ab4348bcd2
commit
ea31ed79bf
@ -2,7 +2,7 @@ plugins {
|
|||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
alias(libs.plugins.kotlin.android)
|
alias(libs.plugins.kotlin.android)
|
||||||
alias(libs.plugins.atomicfu)
|
alias(libs.plugins.atomicfu)
|
||||||
alias(libs.plugins.protobuf)
|
// alias(libs.plugins.protobuf)
|
||||||
}
|
}
|
||||||
|
|
||||||
//preBuild {
|
//preBuild {
|
||||||
@ -34,7 +34,7 @@ android {
|
|||||||
compileSdk 34
|
compileSdk 34
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.android.car.settings"
|
applicationId "com.cariad.cea.settings"
|
||||||
minSdk 31
|
minSdk 31
|
||||||
targetSdk 34
|
targetSdk 34
|
||||||
versionCode 1
|
versionCode 1
|
||||||
@ -47,7 +47,7 @@ android {
|
|||||||
manifest.srcFile 'AndroidManifest.xml'
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
java.srcDirs = ['src']
|
java.srcDirs = ['src']
|
||||||
res.srcDirs = ['res', 'res-export', 'res-product']
|
res.srcDirs = ['res', 'res-export', 'res-product']
|
||||||
proto.srcDirs = ['protos']
|
// proto.srcDirs = ['protos']
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@ -79,7 +79,7 @@ android {
|
|||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
platform {
|
platform {
|
||||||
storeFile file("platform.jks")
|
storeFile file("../platform.jks")
|
||||||
storePassword 'android'
|
storePassword 'android'
|
||||||
keyAlias 'androidkey'
|
keyAlias 'androidkey'
|
||||||
keyPassword 'android'
|
keyPassword 'android'
|
||||||
@ -101,7 +101,7 @@ android {
|
|||||||
|
|
||||||
applicationVariants.all { variant ->
|
applicationVariants.all { variant ->
|
||||||
variant.outputs.all {
|
variant.outputs.all {
|
||||||
outputFileName = "BSettings.apk"
|
outputFileName = "CariadSettings.apk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -125,9 +125,9 @@ dependencies {
|
|||||||
implementation files('../libs/notification_flags_lib.jar')
|
implementation files('../libs/notification_flags_lib.jar')
|
||||||
implementation files('../libs/securebox.jar')
|
implementation files('../libs/securebox.jar')
|
||||||
|
|
||||||
implementation files('../libs/FingerprintManagerInteractor.jar')
|
// implementation files('../libs/FingerprintManagerInteractor.jar')
|
||||||
implementation files('../libs/MediaDrmSettingsFlagsLib.jar')
|
implementation files('../libs/MediaDrmSettingsFlagsLib.jar')
|
||||||
implementation files('../libs/Settings-change-ids.jar')
|
// implementation files('../libs/Settings-change-ids.jar')
|
||||||
// SettingsLib的依赖在后面整体配置
|
// SettingsLib的依赖在后面整体配置
|
||||||
implementation files('../libs/aconfig_settings_flags_lib.jar')
|
implementation files('../libs/aconfig_settings_flags_lib.jar')
|
||||||
implementation files('../libs/accessibility_settings_flags_lib.jar')
|
implementation files('../libs/accessibility_settings_flags_lib.jar')
|
||||||
@ -144,7 +144,8 @@ dependencies {
|
|||||||
implementation files('../libs/settings-log-bridge-protos-lite.jar')
|
implementation files('../libs/settings-log-bridge-protos-lite.jar')
|
||||||
implementation files('../libs/settings-logtags.jar')
|
implementation files('../libs/settings-logtags.jar')
|
||||||
implementation files('../libs/settings-telephony-protos-lite.jar')
|
implementation files('../libs/settings-telephony-protos-lite.jar')
|
||||||
implementation files('../libs/setupdesign-lottie-loading-layout.jar')
|
// implementation files('../libs/setupdesign-lottie-loading-layout.jar')
|
||||||
|
implementation project(':lottie_loading_layout')
|
||||||
|
|
||||||
implementation files('../libs/statslog-settings.jar')
|
implementation files('../libs/statslog-settings.jar')
|
||||||
implementation files('../libs/settingslib_flags_lib.jar')
|
implementation files('../libs/settingslib_flags_lib.jar')
|
||||||
@ -221,23 +222,23 @@ dependencies {
|
|||||||
implementation libs.dagger
|
implementation libs.dagger
|
||||||
annotationProcessor libs.dagger.compiler
|
annotationProcessor libs.dagger.compiler
|
||||||
}
|
}
|
||||||
protobuf {
|
//protobuf {
|
||||||
protoc {
|
// protoc {
|
||||||
// 通用 artifact
|
// // 通用 artifact
|
||||||
artifact = 'com.google.protobuf:protoc:3.8.0'
|
// artifact = 'com.google.protobuf:protoc:3.8.0'
|
||||||
// MacOS
|
// // MacOS
|
||||||
if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) {
|
// if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) {
|
||||||
artifact = 'com.google.protobuf:protoc:3.8.0:osx-x86_64'
|
// artifact = 'com.google.protobuf:protoc:3.8.0:osx-x86_64'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
generateProtoTasks {
|
// generateProtoTasks {
|
||||||
all().each { task ->
|
// all().each { task ->
|
||||||
task.builtins {
|
// task.builtins {
|
||||||
remove java
|
// remove java
|
||||||
java {
|
// java {
|
||||||
option "lite"
|
// option "lite"
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
@ -0,0 +1,50 @@
|
|||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
<PreferenceScreen
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:key="content_protection_preference_subpage"
|
||||||
|
android:title="@string/content_protection_preference_title">
|
||||||
|
|
||||||
|
<com.android.settingslib.widget.TopIntroPreference
|
||||||
|
android:key="content_protection_preference_top_intro"
|
||||||
|
android:title="@string/content_protection_preference_subpage_summary"
|
||||||
|
settings:searchable="false"/>
|
||||||
|
|
||||||
|
<com.android.settings.widget.SettingsMainSwitchPreference
|
||||||
|
android:key="content_protection_preference_user_consent_switch"
|
||||||
|
android:title="@string/content_protection_preference_user_consent_switch_title"
|
||||||
|
settings:controller=
|
||||||
|
"com.android.settings.security.ContentProtectionTogglePreferenceController"/>
|
||||||
|
|
||||||
|
<com.android.settingslib.widget.IllustrationPreference
|
||||||
|
android:key="content_protection_preference_subpage_illustration"
|
||||||
|
android:selectable="false"
|
||||||
|
settings:lottie_rawRes="@drawable/content_protection_preference_illustration"
|
||||||
|
settings:searchable="false" />
|
||||||
|
|
||||||
|
<com.android.settingslib.RestrictedSwitchPreference
|
||||||
|
android:key="content_protection_preference_user_consent_work_profile_switch"
|
||||||
|
android:title="@string/content_protection_preference_user_consent_work_profile_switch_title"
|
||||||
|
settings:controller="com.android.settings.security.ContentProtectionWorkSwitchController"
|
||||||
|
settings:restrictedSwitchSummary="@string/summary_placeholder"
|
||||||
|
settings:useAdditionalSummary="true"/>
|
||||||
|
|
||||||
|
<com.android.settingslib.widget.FooterPreference
|
||||||
|
android:key="content_protection_preference_subpage_footer"
|
||||||
|
android:title="@string/content_protection_preference_subpage_info" />
|
||||||
|
</PreferenceScreen>
|
@ -235,7 +235,7 @@
|
|||||||
<string name="share" msgid="8502235338607613795">"分享"</string>
|
<string name="share" msgid="8502235338607613795">"分享"</string>
|
||||||
<string name="add" msgid="8335206931421683426">"添加"</string>
|
<string name="add" msgid="8335206931421683426">"添加"</string>
|
||||||
<string name="remove" msgid="1028414219245072102">"移除"</string>
|
<string name="remove" msgid="1028414219245072102">"移除"</string>
|
||||||
<string name="settings_label" msgid="943294133671632976">"设置"</string>
|
<string name="settings_label" msgid="943294133671632976">"Cariad设置"</string>
|
||||||
<string name="settings_label_launcher" msgid="820982375501978609">"设置"</string>
|
<string name="settings_label_launcher" msgid="820982375501978609">"设置"</string>
|
||||||
<string name="settings_shortcut" msgid="8548239727871847171">"设置快捷方式"</string>
|
<string name="settings_shortcut" msgid="8548239727871847171">"设置快捷方式"</string>
|
||||||
<string name="airplane_mode" msgid="3196085857882526817">"飞行模式"</string>
|
<string name="airplane_mode" msgid="3196085857882526817">"飞行模式"</string>
|
||||||
|
@ -549,7 +549,7 @@
|
|||||||
<string name="remove">Remove</string>
|
<string name="remove">Remove</string>
|
||||||
|
|
||||||
<!-- Title of the Settings activity shown within the application itself. -->
|
<!-- Title of the Settings activity shown within the application itself. -->
|
||||||
<string name="settings_label">Settings</string>
|
<string name="settings_label">Cariad Settings</string>
|
||||||
<!-- Title of the Settings activity shown in the Launcher. [CHAR LIMIT=20] -->
|
<!-- Title of the Settings activity shown in the Launcher. [CHAR LIMIT=20] -->
|
||||||
<string name="settings_label_launcher">Settings</string>
|
<string name="settings_label_launcher">Settings</string>
|
||||||
<!-- Label for option to select a settings panel as a shortcut -->
|
<!-- Label for option to select a settings panel as a shortcut -->
|
||||||
|
@ -911,7 +911,7 @@ public class WifiConfigController implements TextWatcher,
|
|||||||
if (TextUtils.isEmpty(ipAddr)) return R.string.wifi_ip_settings_invalid_ip_address;
|
if (TextUtils.isEmpty(ipAddr)) return R.string.wifi_ip_settings_invalid_ip_address;
|
||||||
|
|
||||||
Inet4Address inetAddr = getIPv4Address(ipAddr);
|
Inet4Address inetAddr = getIPv4Address(ipAddr);
|
||||||
if (inetAddr == null || inetAddr.equals(Inet4Address.ANY)) {
|
if (inetAddr == null /*|| inetAddr.equals(Inet4Address.ANY)*/) {
|
||||||
return R.string.wifi_ip_settings_invalid_ip_address;
|
return R.string.wifi_ip_settings_invalid_ip_address;
|
||||||
}
|
}
|
||||||
// Copy all fields into the builder first and set desired value later with builder.
|
// Copy all fields into the builder first and set desired value later with builder.
|
||||||
|
@ -924,7 +924,7 @@ public class WifiConfigController2 implements TextWatcher,
|
|||||||
if (TextUtils.isEmpty(ipAddr)) return R.string.wifi_ip_settings_invalid_ip_address;
|
if (TextUtils.isEmpty(ipAddr)) return R.string.wifi_ip_settings_invalid_ip_address;
|
||||||
|
|
||||||
Inet4Address inetAddr = getIPv4Address(ipAddr);
|
Inet4Address inetAddr = getIPv4Address(ipAddr);
|
||||||
if (inetAddr == null || inetAddr.equals(Inet4Address.ANY)) {
|
if (inetAddr == null /*|| inetAddr.equals(Inet4Address.ANY)*/) {
|
||||||
return R.string.wifi_ip_settings_invalid_ip_address;
|
return R.string.wifi_ip_settings_invalid_ip_address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -451,4 +451,19 @@ public class WifiNetworkDetailsFragment extends RestrictedDashboardFragment impl
|
|||||||
? getString(R.string.hotspot_battery_charging_summary, formatPercentage(percentage))
|
? getString(R.string.hotspot_battery_charging_summary, formatPercentage(percentage))
|
||||||
: formatPercentage(percentage));
|
: formatPercentage(percentage));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getHelpResource() {
|
||||||
|
return super.getHelpResource();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onForget(@NonNull WifiDialog2 dialog) {
|
||||||
|
// WifiDialog2.WifiDialog2Listener.super.onForget(dialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onScan(@NonNull WifiDialog2 dialog, @NonNull String ssid) {
|
||||||
|
// WifiDialog2.WifiDialog2Listener.super.onScan(dialog, ssid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -213,12 +213,12 @@ public class WifiDetailPreferenceController2 extends AbstractPreferenceControlle
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onForget(@NonNull WifiDialog2 dialog) {
|
public void onForget(@NonNull WifiDialog2 dialog) {
|
||||||
WifiDialog2Listener.super.onForget(dialog);
|
// WifiDialog2Listener.super.onForget(dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onScan(@NonNull WifiDialog2 dialog, @NonNull String ssid) {
|
public void onScan(@NonNull WifiDialog2 dialog, @NonNull String ssid) {
|
||||||
WifiDialog2Listener.super.onScan(dialog, ssid);
|
// WifiDialog2Listener.super.onScan(dialog, ssid);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class CarrierIdAsyncQueryHandler extends AsyncQueryHandler {
|
private class CarrierIdAsyncQueryHandler extends AsyncQueryHandler {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[versions]
|
[versions]
|
||||||
agp = "8.2.2"
|
agp = "8.6.0"
|
||||||
kotlin = "1.9.0"
|
kotlin = "1.9.0"
|
||||||
coreKtx = "1.13.0-beta01"
|
coreKtx = "1.13.0-beta01"
|
||||||
junit = "4.13.2"
|
junit = "4.13.2"
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
#Thu Dec 05 10:28:28 HKT 2024
|
#Thu Dec 05 10:28:28 HKT 2024
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
@ -18,6 +18,9 @@ dependencyResolutionManagement {
|
|||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven { url 'https://jitpack.io' }
|
maven { url 'https://jitpack.io' }
|
||||||
|
flatDir {
|
||||||
|
dirs "libs"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user