Loading AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -4274,7 +4274,7 @@ <!-- Show regulatory info (from settings item or dialing "*#07#") --> <activity android:name="RegulatoryInfoDisplayActivity" android:theme="@style/Theme.AlertDialog" android:theme="@style/Transparent" android:label="@string/regulatory_labels" android:exported="true" android:enabled="@bool/config_show_regulatory_info"> Loading res/values/themes_expressive.xml +9 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,13 @@ <resources xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"> <style name="Transparent.Expressive"> <item name="alertDialogTheme">@style/Theme.AlertDialog.SettingsLib.Expressive</item> <!-- For AlertDialog --> <item name="android:alertDialogTheme">@style/Theme.AlertDialog.SettingsLib.Expressive</item> </style> <style name="Theme.Settings.Expressive" parent="Theme.SettingsBase.Expressive"> <item name="android:clipToPadding">false</item> <item name="android:clipChildren">false</item> Loading Loading @@ -48,6 +55,8 @@ <!-- For AndroidX AlertDialog --> <item name="alertDialogTheme">@style/Theme.AlertDialog.SettingsLib.Expressive</item> <!-- For AlertDialog --> <item name="android:alertDialogTheme">@style/Theme.AlertDialog.SettingsLib.Expressive</item> <item name="*android:lockPatternStyle">@style/LockPatternStyle</item> Loading src/com/android/settings/RegulatoryInfoDisplayActivity.kt +16 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.settings import android.app.Activity import android.content.res.Resources import android.os.Bundle import android.view.Gravity import android.widget.ImageView Loading @@ -24,6 +25,7 @@ import android.widget.TextView import androidx.appcompat.app.AlertDialog import com.android.settings.deviceinfo.regulatory.RegulatoryInfo.getRegulatoryInfo import com.android.settings.overlay.FeatureFactory.Companion.featureFactory import com.android.settingslib.widget.SettingsThemeHelper.isExpressiveTheme /** * [Activity] that displays regulatory information for the "Regulatory information" Loading @@ -40,6 +42,11 @@ class RegulatoryInfoDisplayActivity : Activity() { /** Display the regulatory info graphic in a dialog window. */ override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val resId = if (isExpressiveTheme(this)) R.style.Transparent_Expressive else R.style.Transparent setTheme(resId) val builder = AlertDialog.Builder(this) .setTitle(R.string.regulatory_labels) .setOnDismissListener { finish() } // close the activity Loading Loading @@ -71,4 +78,13 @@ class RegulatoryInfoDisplayActivity : Activity() { if (regulatoryInfoText.isNotBlank()) return regulatoryInfoText return featureFactory.hardwareInfoFeatureProvider?.countryOfOriginLabel } /** Returns the current theme and checks if needing to apply expressive theme. */ override fun getTheme(): Resources.Theme? { val theme = super.getTheme() if (isExpressiveTheme(this)) { theme.applyStyle(R.style.Transparent_Expressive, true) } return theme } } Loading
AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -4274,7 +4274,7 @@ <!-- Show regulatory info (from settings item or dialing "*#07#") --> <activity android:name="RegulatoryInfoDisplayActivity" android:theme="@style/Theme.AlertDialog" android:theme="@style/Transparent" android:label="@string/regulatory_labels" android:exported="true" android:enabled="@bool/config_show_regulatory_info"> Loading
res/values/themes_expressive.xml +9 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,13 @@ <resources xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"> <style name="Transparent.Expressive"> <item name="alertDialogTheme">@style/Theme.AlertDialog.SettingsLib.Expressive</item> <!-- For AlertDialog --> <item name="android:alertDialogTheme">@style/Theme.AlertDialog.SettingsLib.Expressive</item> </style> <style name="Theme.Settings.Expressive" parent="Theme.SettingsBase.Expressive"> <item name="android:clipToPadding">false</item> <item name="android:clipChildren">false</item> Loading Loading @@ -48,6 +55,8 @@ <!-- For AndroidX AlertDialog --> <item name="alertDialogTheme">@style/Theme.AlertDialog.SettingsLib.Expressive</item> <!-- For AlertDialog --> <item name="android:alertDialogTheme">@style/Theme.AlertDialog.SettingsLib.Expressive</item> <item name="*android:lockPatternStyle">@style/LockPatternStyle</item> Loading
src/com/android/settings/RegulatoryInfoDisplayActivity.kt +16 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.settings import android.app.Activity import android.content.res.Resources import android.os.Bundle import android.view.Gravity import android.widget.ImageView Loading @@ -24,6 +25,7 @@ import android.widget.TextView import androidx.appcompat.app.AlertDialog import com.android.settings.deviceinfo.regulatory.RegulatoryInfo.getRegulatoryInfo import com.android.settings.overlay.FeatureFactory.Companion.featureFactory import com.android.settingslib.widget.SettingsThemeHelper.isExpressiveTheme /** * [Activity] that displays regulatory information for the "Regulatory information" Loading @@ -40,6 +42,11 @@ class RegulatoryInfoDisplayActivity : Activity() { /** Display the regulatory info graphic in a dialog window. */ override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val resId = if (isExpressiveTheme(this)) R.style.Transparent_Expressive else R.style.Transparent setTheme(resId) val builder = AlertDialog.Builder(this) .setTitle(R.string.regulatory_labels) .setOnDismissListener { finish() } // close the activity Loading Loading @@ -71,4 +78,13 @@ class RegulatoryInfoDisplayActivity : Activity() { if (regulatoryInfoText.isNotBlank()) return regulatoryInfoText return featureFactory.hardwareInfoFeatureProvider?.countryOfOriginLabel } /** Returns the current theme and checks if needing to apply expressive theme. */ override fun getTheme(): Resources.Theme? { val theme = super.getTheme() if (isExpressiveTheme(this)) { theme.applyStyle(R.style.Transparent_Expressive, true) } return theme } }