aboutsummaryrefslogtreecommitdiff
path: root/src/com/android
diff options
context:
space:
mode:
authorHari Raj Vijayakumar <Hariraj.vijayakumar@vantiva.net>2023-02-01 12:06:27 +0530
committerHari Raj Vijayakumar <Hariraj.vijayakumar@vantiva.net>2023-02-10 14:36:08 +0530
commit0437ab8af1aa6652f3b7267aab39a60bf260a682 (patch)
tree827c6af4669bef2219bef197a33cdf594a15ca03 /src/com/android
parent2823b1be937d343f9775c10c9ce1f95b58861ea8 (diff)
downloadTV-0437ab8af1aa6652f3b7267aab39a60bf260a682.tar.gz
Remove hardcoded SDK version in manifest to fix GTS failure
- Update SDK level will be latest as handled in Android.bp - Port app code to Android 12+ Bug: 267273470 Test: GtsPermissionTestCases Change-Id: I995192914f85ad41aaf2ceb4e5a03f44473ab560
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/tv/MainActivity.java4
-rw-r--r--src/com/android/tv/dvr/recorder/RecordingScheduler.java3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/tv/MainActivity.java b/src/com/android/tv/MainActivity.java
index 8dbafe47..374f9f7a 100644
--- a/src/com/android/tv/MainActivity.java
+++ b/src/com/android/tv/MainActivity.java
@@ -717,8 +717,8 @@ public class MainActivity extends Activity
mAudioCapabilitiesReceiver = new AudioCapabilitiesReceiver(this, null);
mAudioCapabilitiesReceiver.register();
Intent nowPlayingIntent = new Intent(this, MainActivity.class);
- PendingIntent pendingIntent =
- PendingIntent.getActivity(this, REQUEST_CODE_NOW_PLAYING, nowPlayingIntent, 0);
+ PendingIntent pendingIntent = PendingIntent.getActivity(this, REQUEST_CODE_NOW_PLAYING,
+ nowPlayingIntent, PendingIntent.FLAG_IMMUTABLE);
mMediaSessionWrapper = new MediaSessionWrapper(this, pendingIntent);
mTvViewUiManager.restoreDisplayMode(false);
diff --git a/src/com/android/tv/dvr/recorder/RecordingScheduler.java b/src/com/android/tv/dvr/recorder/RecordingScheduler.java
index f309537d..475c17f8 100644
--- a/src/com/android/tv/dvr/recorder/RecordingScheduler.java
+++ b/src/com/android/tv/dvr/recorder/RecordingScheduler.java
@@ -322,7 +322,8 @@ public class RecordingScheduler extends TvInputCallback implements ScheduledReco
long wakeAt = nextStartTime - MS_TO_WAKE_BEFORE_START;
if (DEBUG) Log.d(TAG, "Set alarm to record at " + wakeAt);
Intent intent = new Intent(mContext, DvrStartRecordingReceiver.class);
- PendingIntent alarmIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0);
+ PendingIntent alarmIntent =
+ PendingIntent.getBroadcast(mContext, 0, intent, PendingIntent.FLAG_IMMUTABLE);
// This will cancel the previous alarm.
mAlarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, wakeAt, alarmIntent);
} else {