Apply new settings widget lib for the cbr main feature switch
apply the new settings widget lib for the emergency alert main feature switch. Bug: 183574149 Test: Manual Change-Id: Idfdb2696056faf3dbe4ccb0061f2b61c33e94292
This commit is contained in:
@@ -21,4 +21,8 @@ android_library {
|
||||
|
||||
sdk_version: "system_current",
|
||||
min_sdk_version: "28",
|
||||
apex_available: [
|
||||
"//apex_available:platform",
|
||||
"com.android.cellbroadcast",
|
||||
],
|
||||
}
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<issues format="5" by="lint 4.1.0" client="cli" variant="all" version="4.1.0">
|
||||
|
||||
<issue
|
||||
id="NewApi"
|
||||
message="`@android:id/switch_widget` requires API level 24 (current min is 21)"
|
||||
errorLine1=" android:id="@android:id/switch_widget""
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="frameworks/base/packages/SettingsLib/MainSwitchPreference/res/layout/settingslib_main_switch_bar.xml"
|
||||
line="49"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="NewApi"
|
||||
message="`@android:style/Widget.Material.CompoundButton.Switch` requires API level 24 (current min is 21)"
|
||||
errorLine1=" <style name="MainSwitch.Settingslib" parent="@android:style/Widget.Material.CompoundButton.Switch">"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="frameworks/base/packages/SettingsLib/MainSwitchPreference/res/values/styles.xml"
|
||||
line="24"
|
||||
column="39"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="NewApi"
|
||||
message="`@android:style/Widget.Material.CompoundButton.Switch` requires API level 24 (current min is 21)"
|
||||
errorLine1=" <style name="SwitchBar.Switch.Settingslib" parent="@android:style/Widget.Material.CompoundButton.Switch">"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="frameworks/base/packages/SettingsLib/MainSwitchPreference/res/values/styles.xml"
|
||||
line="28"
|
||||
column="43"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="NewApi"
|
||||
message="`android:trackTint` requires API level 23 (current min is 21)"
|
||||
errorLine1=" <item name="android:trackTint">@color/settingslib_switchbar_switch_track_tint</item>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="frameworks/base/packages/SettingsLib/MainSwitchPreference/res/values/styles.xml"
|
||||
line="29"
|
||||
column="15"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="NewApi"
|
||||
severity="Error"
|
||||
message="`@android:color/system_neutral2_300` requires API level 31 (current min is 21)"
|
||||
errorLine1=" <color name="settingslib_thumb_off_color">@android:color/system_neutral2_300</color>"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="frameworks/base/packages/SettingsLib/MainSwitchPreference/res/values-night/colors.xml"
|
||||
line="23"
|
||||
column="47"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="NewApi"
|
||||
severity="Error"
|
||||
message="`@android:color/system_accent2_700` requires API level 31 (current min is 21)"
|
||||
errorLine1=" <color name="settingslib_track_on_color">@android:color/system_accent2_700</color>"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="frameworks/base/packages/SettingsLib/MainSwitchPreference/res/values-night/colors.xml"
|
||||
line="26"
|
||||
column="46"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="NewApi"
|
||||
severity="Error"
|
||||
message="`@android:color/system_neutral1_700` requires API level 31 (current min is 21)"
|
||||
errorLine1=" <color name="settingslib_track_off_color">@android:color/system_neutral1_700</color>"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="frameworks/base/packages/SettingsLib/MainSwitchPreference/res/values-night/colors.xml"
|
||||
line="29"
|
||||
column="47"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="NewApi"
|
||||
severity="Error"
|
||||
message="`@android:color/system_neutral2_100` requires API level 31 (current min is 21)"
|
||||
errorLine1=" <color name="settingslib_thumb_off_color">@android:color/system_neutral2_100</color>"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="frameworks/base/packages/SettingsLib/MainSwitchPreference/res/values/colors.xml"
|
||||
line="30"
|
||||
column="47"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="NewApi"
|
||||
severity="Error"
|
||||
message="`@android:color/system_neutral2_600` requires API level 31 (current min is 21)"
|
||||
errorLine1=" <color name="settingslib_track_off_color">@android:color/system_neutral2_600</color>"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="frameworks/base/packages/SettingsLib/MainSwitchPreference/res/values/colors.xml"
|
||||
line="36"
|
||||
column="47"/>
|
||||
</issue>
|
||||
|
||||
</issues>
|
||||
@@ -13,6 +13,10 @@ android_library {
|
||||
srcs: ["src/**/*.java"],
|
||||
resource_dirs: ["res"],
|
||||
|
||||
static_libs: [
|
||||
"androidx.annotation_annotation",
|
||||
],
|
||||
|
||||
sdk_version: "system_current",
|
||||
min_sdk_version: "21",
|
||||
|
||||
@@ -20,5 +24,6 @@ android_library {
|
||||
|
||||
"//apex_available:platform",
|
||||
"com.android.permission",
|
||||
"com.android.cellbroadcast",
|
||||
],
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<issues format="5" by="lint 4.1.0" client="cli" variant="all" version="4.1.0">
|
||||
|
||||
<issue
|
||||
id="NewApi"
|
||||
message="Call requires API level 23 (current min is 21): `android.content.Context#getSystemService`"
|
||||
errorLine1=" return context.getSystemService(UserManager.class).isManagedProfile(userId)"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="frameworks/base/packages/SettingsLib/Utils/src/com/android/settingslib/utils/applications/AppUtils.java"
|
||||
line="58"
|
||||
column="24"/>
|
||||
</issue>
|
||||
|
||||
</issues>
|
||||
@@ -19,9 +19,12 @@ package com.android.settingslib.utils.applications;
|
||||
import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.UserManager;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.android.settingslib.utils.R;
|
||||
|
||||
public class AppUtils {
|
||||
@@ -49,6 +52,7 @@ public class AppUtils {
|
||||
* work app for accessibility purpose.
|
||||
* If the app is in a work profile, then add a "work" prefix to the app name.
|
||||
*/
|
||||
@RequiresApi(Build.VERSION_CODES.M)
|
||||
public static String getAppContentDescription(Context context, String packageName,
|
||||
int userId) {
|
||||
final CharSequence appLabel = getApplicationLabel(context.getPackageManager(), packageName);
|
||||
|
||||
Reference in New Issue
Block a user