diff options
| author | 2016-10-08 21:33:16 +0000 | |
|---|---|---|
| committer | 2016-10-08 21:33:16 +0000 | |
| commit | 6f10b511a9817bf37dd870955ff269c49d6256a5 (patch) | |
| tree | 035ddaff663bee093a9f9a3078d844cfeb7a41c8 | |
| parent | bd599e4caaac364dc72e020d0f43b8d34b322160 (diff) | |
| parent | 3d2783c82b796a855f4163865fe2f543fa2f64a2 (diff) | |
When adding dialog window but not creating update the configuration. am: d7dbec7e4c am: 7696b0d06b
am: 3d2783c82b
Change-Id: Iaf8dd88bbbb63c7ebc5b5963f1e30a23d6df0909
| -rw-r--r-- | core/java/android/app/Dialog.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java index 85a0403fe57e..6e2c464e9a37 100644 --- a/core/java/android/app/Dialog.java +++ b/core/java/android/app/Dialog.java @@ -32,6 +32,7 @@ import android.content.ComponentName; import android.content.Context; import android.content.ContextWrapper; import android.content.DialogInterface; +import android.content.res.Configuration; import android.content.pm.ApplicationInfo; import android.graphics.drawable.Drawable; import android.net.Uri; @@ -288,9 +289,14 @@ public class Dialog implements DialogInterface, Window.Callback, } mCanceled = false; - + if (!mCreated) { dispatchOnCreate(null); + } else { + // Fill the DecorView in on any configuration changes that + // may have occured while it was removed from the WindowManager. + final Configuration config = mContext.getResources().getConfiguration(); + mWindow.getDecorView().dispatchConfigurationChanged(config); } onStart(); |