Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef0ca083 authored by Haijie Hong's avatar Haijie Hong
Browse files

Use transparent theme for bluetooth dialogs

Bug: 399532172
Test: local tested
Flag: com.android.settings.flags.enable_bluetooth_settings_expressive_design
Change-Id: Ife827173aca91cc856942c7fb316e611375f28ff
parent 63f3ebd0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -25,8 +25,8 @@ import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentActivity;

import com.android.settings.R;
import com.android.settingslib.widget.SettingsThemeHelper;
import com.android.settingslib.widget.theme.R;

/** A dialog to ask the user to forget a bluetooth device when the key is missing. */
public class BluetoothKeyMissingDialog extends FragmentActivity {
@@ -36,7 +36,7 @@ public class BluetoothKeyMissingDialog extends FragmentActivity {
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (SettingsThemeHelper.isExpressiveTheme(this)) {
            setTheme(R.style.Theme_AlertDialog_SettingsLib_Expressive);
            setTheme(R.style.Transparent_Expressive);
        }

        getWindow().addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
+2 −2
Original line number Diff line number Diff line
@@ -29,8 +29,8 @@ import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import androidx.fragment.app.FragmentActivity;

import com.android.settings.R;
import com.android.settingslib.widget.SettingsThemeHelper;
import com.android.settingslib.widget.theme.R;

/**
 * BluetoothPairingDialog asks the user to enter a PIN / Passkey / simple confirmation
@@ -70,7 +70,7 @@ public class BluetoothPairingDialog extends FragmentActivity {
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (SettingsThemeHelper.isExpressiveTheme(this)) {
            setTheme(R.style.Theme_AlertDialog_SettingsLib_Expressive);
            setTheme(R.style.Transparent_Expressive);
        }

        getWindow().addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
+1 −3
Original line number Diff line number Diff line
@@ -83,9 +83,7 @@ public class RequestPermissionActivity extends Activity implements
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (SettingsThemeHelper.isExpressiveTheme(this)) {
            setTheme(
                    com.android.settingslib.widget.theme.R.style
                            .Theme_AlertDialog_SettingsLib_Expressive);
            setTheme(R.style.Transparent_Expressive);
        }

        getWindow().addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);