diff options
| author | 2016-10-07 19:29:56 +0000 | |
|---|---|---|
| committer | 2016-10-07 19:29:56 +0000 | |
| commit | 3d2783c82b796a855f4163865fe2f543fa2f64a2 (patch) | |
| tree | bbb3202c702747cb1cac24d68be93e9fe30abd9b | |
| parent | 1e864e32c5c5ac1a798365c27bc20611badda596 (diff) | |
| parent | 7696b0d06b3d78e9c4175b86b5a24927346c9533 (diff) | |
When adding dialog window but not creating update the configuration. am: d7dbec7e4c
am: 7696b0d06b
Change-Id: I536f02e97cb0969859454fd6250703056bca0b93
| -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(); |