Loading core/java/android/view/ContextThemeWrapper.java +3 −6 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import android.content.res.Resources; * wrapped context. */ public class ContextThemeWrapper extends ContextWrapper { private Context mBase; private int mThemeResource; private Resources.Theme mTheme; private LayoutInflater mInflater; Loading @@ -39,13 +38,11 @@ public class ContextThemeWrapper extends ContextWrapper { public ContextThemeWrapper(Context base, int themeres) { super(base); mBase = base; mThemeResource = themeres; } @Override protected void attachBaseContext(Context newBase) { super.attachBaseContext(newBase); mBase = newBase; } /** Loading Loading @@ -109,11 +106,11 @@ public class ContextThemeWrapper extends ContextWrapper { @Override public Object getSystemService(String name) { if (LAYOUT_INFLATER_SERVICE.equals(name)) { if (mInflater == null) { mInflater = LayoutInflater.from(mBase).cloneInContext(this); mInflater = LayoutInflater.from(getBaseContext()).cloneInContext(this); } return mInflater; } return mBase.getSystemService(name); return getBaseContext().getSystemService(name); } /** Loading @@ -135,7 +132,7 @@ public class ContextThemeWrapper extends ContextWrapper { final boolean first = mTheme == null; if (first) { mTheme = getResources().newTheme(); Resources.Theme theme = mBase.getTheme(); Resources.Theme theme = getBaseContext().getTheme(); if (theme != null) { mTheme.setTo(theme); } Loading Loading
core/java/android/view/ContextThemeWrapper.java +3 −6 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import android.content.res.Resources; * wrapped context. */ public class ContextThemeWrapper extends ContextWrapper { private Context mBase; private int mThemeResource; private Resources.Theme mTheme; private LayoutInflater mInflater; Loading @@ -39,13 +38,11 @@ public class ContextThemeWrapper extends ContextWrapper { public ContextThemeWrapper(Context base, int themeres) { super(base); mBase = base; mThemeResource = themeres; } @Override protected void attachBaseContext(Context newBase) { super.attachBaseContext(newBase); mBase = newBase; } /** Loading Loading @@ -109,11 +106,11 @@ public class ContextThemeWrapper extends ContextWrapper { @Override public Object getSystemService(String name) { if (LAYOUT_INFLATER_SERVICE.equals(name)) { if (mInflater == null) { mInflater = LayoutInflater.from(mBase).cloneInContext(this); mInflater = LayoutInflater.from(getBaseContext()).cloneInContext(this); } return mInflater; } return mBase.getSystemService(name); return getBaseContext().getSystemService(name); } /** Loading @@ -135,7 +132,7 @@ public class ContextThemeWrapper extends ContextWrapper { final boolean first = mTheme == null; if (first) { mTheme = getResources().newTheme(); Resources.Theme theme = mBase.getTheme(); Resources.Theme theme = getBaseContext().getTheme(); if (theme != null) { mTheme.setTo(theme); } Loading