aboutsummaryrefslogtreecommitdiff
path: root/src/com/android/tv/onboarding/SetupSourcesFragment.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/tv/onboarding/SetupSourcesFragment.java')
-rw-r--r--src/com/android/tv/onboarding/SetupSourcesFragment.java33
1 files changed, 9 insertions, 24 deletions
diff --git a/src/com/android/tv/onboarding/SetupSourcesFragment.java b/src/com/android/tv/onboarding/SetupSourcesFragment.java
index ebf32d00..23145503 100644
--- a/src/com/android/tv/onboarding/SetupSourcesFragment.java
+++ b/src/com/android/tv/onboarding/SetupSourcesFragment.java
@@ -30,7 +30,6 @@ import android.support.v17.leanback.widget.GuidanceStylist.Guidance;
import android.support.v17.leanback.widget.GuidedAction;
import android.support.v17.leanback.widget.GuidedActionsStylist;
import android.support.v17.leanback.widget.VerticalGridView;
-import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -60,16 +59,14 @@ import java.util.List;
* A fragment for channel source info/setup.
*/
public class SetupSourcesFragment extends SetupMultiPaneFragment {
+ private static final String TAG = "SetupSourcesFragment";
+
public static final String ACTION_CATEGORY =
"com.android.tv.onboarding.SetupSourcesFragment";
public static final int ACTION_PLAY_STORE = 1;
- public static final int DEFAULT_THEME = -1;
-
private static final String SETUP_TRACKER_LABEL = "Setup fragment";
- private static int sTheme = DEFAULT_THEME;
-
private InputSetupRunnable mInputSetupRunnable;
private ContentFragment mContentFragment;
@@ -77,12 +74,7 @@ public class SetupSourcesFragment extends SetupMultiPaneFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
- LayoutInflater localInflater = inflater;
- if (sTheme != -1) {
- ContextThemeWrapper themeWrapper = new ContextThemeWrapper(getActivity(), sTheme);
- localInflater = inflater.cloneInContext(themeWrapper);
- }
- View view = super.onCreateView(localInflater, container, savedInstanceState);
+ View view = super.onCreateView(inflater, container, savedInstanceState);
TvApplication.getSingletons(getActivity()).getTracker().sendScreenView(SETUP_TRACKER_LABEL);
return view;
}
@@ -97,10 +89,10 @@ public class SetupSourcesFragment extends SetupMultiPaneFragment {
@Override
protected SetupGuidedStepFragment onCreateContentFragment() {
mContentFragment = new ContentFragment();
+ mContentFragment.setParentFragment(this);
Bundle arguments = new Bundle();
arguments.putBoolean(SetupGuidedStepFragment.KEY_THREE_PANE, true);
mContentFragment.setArguments(arguments);
- mContentFragment.setParentFragment(this);
return mContentFragment;
}
@@ -110,13 +102,6 @@ public class SetupSourcesFragment extends SetupMultiPaneFragment {
}
/**
- * Sets the custom theme dynamically.
- */
- public static void setTheme(int theme) {
- sTheme = theme;
- }
-
- /**
* Call this method to run customized input setup.
*
* @param runnable runnable to be called when the input setup is necessary.
@@ -173,6 +158,11 @@ public class SetupSourcesFragment extends SetupMultiPaneFragment {
handleInputChanged();
}
+ @Override
+ public void onInputUpdated(String inputId) {
+ handleInputChanged();
+ }
+
private void handleInputChanged() {
// The actions created while enter transition is running will not be included in the
// fragment transition.
@@ -395,11 +385,6 @@ public class SetupSourcesFragment extends SetupMultiPaneFragment {
updateActions();
}
- @Override
- public int onProvideTheme() {
- return sTheme == DEFAULT_THEME ? super.onProvideTheme() : sTheme;
- }
-
void executePendingAction() {
switch (mPendingAction) {
case PENDING_ACTION_INPUT_CHANGED: