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

Commit a3d8c316 authored by Anna Galusza's avatar Anna Galusza Committed by Android (Google) Code Review
Browse files

Merge "Revert "Fix issues with wrong configuration being used to inflate...

Merge "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." into nyc-dev
parents b5e2f54c d3dcce02
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -49,10 +49,6 @@ public class PreviewPagerAdapter extends PagerAdapter {
                               Configuration[] configurations) {
        mPreviewFrames = new FrameLayout[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] = new FrameLayout(context);
            mPreviewFrames[i].setLayoutParams(new LinearLayout.LayoutParams(
@@ -76,10 +72,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