diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml index b9bbbefc233f9..98c6702f899da 100644 --- a/packages/Shell/AndroidManifest.xml +++ b/packages/Shell/AndroidManifest.xml @@ -207,8 +207,9 @@ + android:theme="@android:style/Theme.DeviceDefault.DayNight" + android:defaultToDeviceProtectedStorage="true" + android:directBootAware="true"> diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java index d445687b1d534..ea878703f3d3f 100644 --- a/packages/Shell/src/com/android/shell/BugreportProgressService.java +++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java @@ -77,6 +77,7 @@ import android.util.Log; import android.util.Pair; import android.util.Patterns; import android.util.SparseArray; +import android.view.ContextThemeWrapper; import android.view.IWindowManager; import android.view.View; import android.view.View.OnFocusChangeListener; @@ -1635,11 +1636,13 @@ public class BugreportProgressService extends Service { void initialize(final Context context, BugreportInfo info) { final String dialogTitle = context.getString(R.string.bugreport_info_dialog_title, info.id); + final Context themedContext = new ContextThemeWrapper( + context, com.android.internal.R.style.Theme_DeviceDefault_DayNight); // First initializes singleton. if (mDialog == null) { @SuppressLint("InflateParams") // It's ok pass null ViewRoot on AlertDialogs. - final View view = View.inflate(context, R.layout.dialog_bugreport_info, null); + final View view = View.inflate(themedContext, R.layout.dialog_bugreport_info, null); mInfoName = (EditText) view.findViewById(R.id.name); mInfoTitle = (EditText) view.findViewById(R.id.title); @@ -1656,7 +1659,7 @@ public class BugreportProgressService extends Service { } }); - mDialog = new AlertDialog.Builder(context) + mDialog = new AlertDialog.Builder(themedContext) .setView(view) .setTitle(dialogTitle) .setCancelable(true)