Apply the AlertDialog theme

so that the correct colors are applied when the system contrast is
changed.

Bug: 335712994
Test: manual
Change-Id: I2f6ba3360fc4935db302e8d89f4df8d200a43a29
This commit is contained in:
Manish Singh
2024-05-15 15:45:06 +00:00
parent fd0dd5dfdd
commit a270176634

View File

@@ -22,7 +22,6 @@ import static com.android.internal.app.SetScreenLockDialogActivity.LAUNCH_REASON
import static com.android.settings.activityembedding.EmbeddedDeepLinkUtils.tryStartMultiPaneDeepLink;
import android.app.ActivityOptions;
import android.app.AlertDialog;
import android.app.KeyguardManager;
import android.app.PendingIntent;
import android.app.settings.SettingsEnums;
@@ -37,6 +36,7 @@ import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.FragmentActivity;
import com.android.internal.annotations.VisibleForTesting;
@@ -152,7 +152,7 @@ public class PrivateSpaceAuthenticationActivity extends FragmentActivity {
startActivity(setScreenLockPromptIntent);
finish();
} else {
new AlertDialog.Builder(this)
new AlertDialog.Builder(this, R.style.Theme_AlertDialog)
.setTitle(R.string.no_device_lock_title)
.setMessage(R.string.no_device_lock_summary)
.setPositiveButton(