diff --git a/app/src/main/java/com/limelight/AppView.java b/app/src/main/java/com/limelight/AppView.java index 42f0362b..f08cdd25 100644 --- a/app/src/main/java/com/limelight/AppView.java +++ b/app/src/main/java/com/limelight/AppView.java @@ -235,6 +235,10 @@ public class AppView extends Activity implements AdapterFragmentCallbacks { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + // Assume we're in the foreground when created to avoid a race + // between binding to CMS and onResume() + inForeground = true; + shortcutHelper = new ShortcutHelper(this); UiHelper.setLocale(this); diff --git a/app/src/main/java/com/limelight/PcView.java b/app/src/main/java/com/limelight/PcView.java index 305c7c9a..0efff0bc 100644 --- a/app/src/main/java/com/limelight/PcView.java +++ b/app/src/main/java/com/limelight/PcView.java @@ -165,6 +165,10 @@ public class PcView extends Activity implements AdapterFragmentCallbacks { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + // Assume we're in the foreground when created to avoid a race + // between binding to CMS and onResume() + inForeground = true; + // Create a GLSurfaceView to fetch GLRenderer unless we have // a cached result already. final GlPreferences glPrefs = GlPreferences.readPreferences(this);