Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Revert "Fix issues with wrong configuration being used to inflate lay…
Browse files Browse the repository at this point in the history
…outs. Bug: 27700406"

Framework bug was fixed by ag/900274, so this is no longer needed.

This reverts commit 062efd0.

Change-Id: I8ebfad33420d908444910a2feffa09661b0542ff
  • Loading branch information
Anna Galusza committed Mar 30, 2016
1 parent 062efd0 commit d3dcce0
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/com/android/settings/PreviewPagerAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ public PreviewPagerAdapter(Context context, int[] previewSampleResIds,
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);
Expand All @@ -73,10 +69,6 @@ public PreviewPagerAdapter(Context context, int[] previewSampleResIds,
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
Expand Down

0 comments on commit d3dcce0

Please sign in to comment.