From d3dcce029d6fa334e707a443db2404be9f739e83 Mon Sep 17 00:00:00 2001 From: Anna Galusza Date: Wed, 30 Mar 2016 21:39:13 +0000 Subject: [PATCH] Revert "Fix issues with wrong configuration being used to inflate layouts. Bug: 27700406" Framework bug was fixed by ag/900274, so this is no longer needed. This reverts commit 062efd0f1771e8cda5275cb64ec75035c86f79de. Change-Id: I8ebfad33420d908444910a2feffa09661b0542ff --- src/com/android/settings/PreviewPagerAdapter.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/com/android/settings/PreviewPagerAdapter.java b/src/com/android/settings/PreviewPagerAdapter.java index 68dc71fa346..8032f92002a 100644 --- a/src/com/android/settings/PreviewPagerAdapter.java +++ b/src/com/android/settings/PreviewPagerAdapter.java @@ -47,10 +47,6 @@ public class PreviewPagerAdapter extends PagerAdapter { Configuration[] configurations) { mPreviewFrames = new TouchBlockingFrameLayout[previewSampleResIds.length]; - // We need to get the copy of the original configuration before we call - // createConfigurationContext() as that call changes the current configuration for the App. - final Configuration origConfig = context.getResources().getConfiguration(); - for (int i = 0; i < previewSampleResIds.length; ++i) { mPreviewFrames[i] = (TouchBlockingFrameLayout) LayoutInflater.from(context) .inflate(R.layout.preview_frame_container, null); @@ -73,10 +69,6 @@ public class PreviewPagerAdapter extends PagerAdapter { mPreviewFrames[i].addView(sampleView); } } - - // Create a context with the original App configuration since the last configuration passed - // to createConfigurationContext() becomes the configuration for any new views inflated. - context.createConfigurationContext(origConfig); } @Override