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

Commit d011e3d7 authored by Louis Pullen-Freilich's avatar Louis Pullen-Freilich Committed by Android (Google) Code Review
Browse files

Merge "Remove usages of now removed getThemedContext()" into qt-dev

parents 2177a2b9 c6717ff0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ public abstract class BaseActivity
        // ToDo Create tool to check resource version before applyStyle for the theme
        // If version code is not match, we should reset overlay package to default,
        // in case Activity continueusly encounter resource not found exception
        getThemedContext().getTheme().applyStyle(R.style.DocumentsDefaultTheme, false);
        getTheme().applyStyle(R.style.DocumentsDefaultTheme, false);

        super.onCreate(icicle);

+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ public class AppsRowManager {
        final LinearLayout appsGroup = activity.findViewById(R.id.apps_group);
        appsGroup.removeAllViews();

        final LayoutInflater inflater = LayoutInflater.from(activity.getThemedContext());
        final LayoutInflater inflater = activity.getLayoutInflater();
        for (AppsRowItemData data : mDataList) {
            View item = inflater.inflate(R.layout.apps_item, appsGroup, false);
            bindView(item, data);
+1 −2
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ package com.android.documentsui.inspector;

import static androidx.core.util.Preconditions.checkArgument;

import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.content.res.TypedArray;
@@ -53,7 +52,7 @@ public class InspectorActivity extends AppCompatActivity {
        // ToDo Create tool to check resource version before applyStyle for the theme
        // If version code is not match, we should reset overlay package to default,
        // in case Activity continueusly encounter resource not found exception
        getThemedContext().getTheme().applyStyle(R.style.DocumentsDefaultTheme, false);
        getTheme().applyStyle(R.style.DocumentsDefaultTheme, false);

        setContentView(R.layout.inspector_activity);

+3 −2
Original line number Diff line number Diff line
@@ -65,12 +65,13 @@ public class AppsRowManagerTest {
        mAppsRowManager = new AppsRowManager(mActionHandler);

        Context context = InstrumentationRegistry.getInstrumentation().getTargetContext();
        LayoutInflater layoutInflater = LayoutInflater.from(context);
        mState = new State();
        mActivity = mock(BaseActivity.class);
        mAppsRow = LayoutInflater.from(context).inflate(R.layout.apps_row, null);
        mAppsRow = layoutInflater.inflate(R.layout.apps_row, null);
        mAppsGroup = mAppsRow.findViewById(R.id.apps_row);

        when(mActivity.getThemedContext()).thenReturn(context);
        when(mActivity.getLayoutInflater()).thenReturn(layoutInflater);
        when(mActivity.getDisplayState()).thenReturn(mState);
        when(mActivity.findViewById(R.id.apps_row)).thenReturn(mAppsRow);
        when(mActivity.findViewById(R.id.apps_group)).thenReturn(mAppsGroup);