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

Commit d3844bcf authored by The Android Open Source Project's avatar The Android Open Source Project
Browse files

merge from froyo-plus-aosp

Change-Id: I9bd45d66c9586b99635d7d05d1f351126bfc9840
parents 7e343b8d 766d1b74
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -22877,6 +22877,18 @@
<parameter name="context" type="android.content.Context">
<parameter name="context" type="android.content.Context">
</parameter>
</parameter>
</constructor>
</constructor>
<constructor name="AlertDialog.Builder"
 type="android.app.AlertDialog.Builder"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="context" type="android.content.Context">
</parameter>
<parameter name="theme" type="int">
</parameter>
</constructor>
<method name="create"
<method name="create"
 return="android.app.AlertDialog"
 return="android.app.AlertDialog"
 abstract="false"
 abstract="false"
+11 −1
Original line number Original line Diff line number Diff line
@@ -265,12 +265,22 @@ public class AlertDialog extends Dialog implements DialogInterface {
    
    
    public static class Builder {
    public static class Builder {
        private final AlertController.AlertParams P;
        private final AlertController.AlertParams P;
        private int mTheme;
        
        
        /**
        /**
         * Constructor using a context for this builder and the {@link AlertDialog} it creates.
         * Constructor using a context for this builder and the {@link AlertDialog} it creates.
         */
         */
        public Builder(Context context) {
        public Builder(Context context) {
            this(context, com.android.internal.R.style.Theme_Dialog_Alert);
        }

        /**
         * Constructor using a context and theme for this builder and
         * the {@link AlertDialog} it creates.
         */
        public Builder(Context context, int theme) {
            P = new AlertController.AlertParams(context);
            P = new AlertController.AlertParams(context);
            mTheme = theme;
        }
        }
        
        
        /**
        /**
@@ -783,7 +793,7 @@ public class AlertDialog extends Dialog implements DialogInterface {
         * to do and want this to be created and displayed.
         * to do and want this to be created and displayed.
         */
         */
        public AlertDialog create() {
        public AlertDialog create() {
            final AlertDialog dialog = new AlertDialog(P.mContext);
            final AlertDialog dialog = new AlertDialog(P.mContext, mTheme);
            P.apply(dialog.mAlert);
            P.apply(dialog.mAlert);
            dialog.setCancelable(P.mCancelable);
            dialog.setCancelable(P.mCancelable);
            dialog.setOnCancelListener(P.mOnCancelListener);
            dialog.setOnCancelListener(P.mOnCancelListener);