aboutsummaryrefslogtreecommitdiff
path: root/src/com
diff options
context:
space:
mode:
authorNick Chalko <nchalko@google.com>2019-12-03 12:25:50 -0800
committernchalko <nchalko@google.com>2019-12-03 21:07:34 +0000
commitf66fb8f7e12ad448dcf741268072439b5380a9fb (patch)
tree20c13132b50173180be2d023f56b0aa83054cc26 /src/com
parent6decbb427547111a727aab9954a3c9ce654af90b (diff)
downloadTV-f66fb8f7e12ad448dcf741268072439b5380a9fb.tar.gz
Add FLAG_ACTIVITY_NEW_TASK when handling the guide key.
PiperOrigin-RevId: 283598013 Change-Id: I32e58498f5302398912831f79f39a6425e8482b5 Bug: 144168602
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/tv/TvApplication.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/tv/TvApplication.java b/src/com/android/tv/TvApplication.java
index bc8226cf..284ca121 100644
--- a/src/com/android/tv/TvApplication.java
+++ b/src/com/android/tv/TvApplication.java
@@ -24,7 +24,7 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
-import android.media.tv.TvContract;
+import android.media.tv.TvContract.Programs;
import android.media.tv.TvInputInfo;
import android.media.tv.TvInputManager;
import android.media.tv.TvInputManager.TvInputCallback;
@@ -370,7 +370,9 @@ public abstract class TvApplication extends BaseApplication implements TvSinglet
public void handleGuideKey() {
if (!mMainActivityWrapper.isResumed()) {
- startActivity(new Intent(Intent.ACTION_VIEW, TvContract.Programs.CONTENT_URI));
+ startActivity(
+ new Intent(Intent.ACTION_VIEW, Programs.CONTENT_URI)
+ .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
} else {
mMainActivityWrapper.getMainActivity().getOverlayManager().toggleProgramGuide();
}
@@ -385,7 +387,8 @@ public abstract class TvApplication extends BaseApplication implements TvSinglet
/** Handles the global key KEYCODE_DVR. */
public void handleDvrKey() {
- startActivity(new Intent(this, DvrBrowseActivity.class));
+ startActivity(
+ new Intent(this, DvrBrowseActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
}
/** Handles the global key KEYCODE_TV_INPUT. */