diff options
-rw-r--r-- | AndroidManifest.xml | 13 | ||||
-rw-r--r-- | src/com/android/tv/MainActivity.java | 4 | ||||
-rw-r--r-- | src/com/android/tv/dvr/recorder/RecordingScheduler.java | 3 | ||||
-rw-r--r-- | tests/robotests/src/com/android/tv/MediaSessionWrapperTest.java | 5 | ||||
-rw-r--r-- | tuner/src/com/android/tv/tuner/setup/BaseTunerSetupActivity.java | 4 |
5 files changed, 18 insertions, 11 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 75e2c4d5..31d9ee6b 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -20,9 +20,6 @@ xmlns:tools="http://schemas.android.com/tools" package="com.android.tv"> - <uses-sdk android:minSdkVersion="23" - android:targetSdkVersion="29"/> - <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.CHANGE_HDMI_CEC_ACTIVE_SOURCE"/> @@ -153,6 +150,7 @@ android:resource="@xml/searchable"/> </activity> <activity android:name="com.android.tv.LauncherActivity" + android:exported="false" android:configChanges="keyboard|keyboardHidden" android:theme="@android:style/Theme.Translucent.NoTitleBar"/> <activity android:name="com.android.tv.SetupPassthroughActivity" @@ -166,6 +164,7 @@ </intent-filter> </activity> <activity android:name="com.android.tv.SelectInputActivity" + android:exported="true" android:configChanges="keyboard|keyboardHidden" android:launchMode="singleTask" android:theme="@style/Theme.SelectInputActivity"> @@ -175,6 +174,7 @@ </intent-filter> </activity> <activity android:name="com.android.tv.onboarding.OnboardingActivity" + android:exported="false" android:configChanges="keyboard|keyboardHidden" android:launchMode="singleTop" android:theme="@style/Theme.Setup.GuidedStep"/> @@ -219,14 +219,18 @@ android:theme="@style/Theme.TV.Dvr.Series.Settings.GuidedStep"/> <activity android:name="com.android.tv.dvr.ui.DvrSeriesSettingsActivity" android:configChanges="keyboard|keyboardHidden" + android:exported="false" android:theme="@style/Theme.TV.Dvr.Series.Settings.GuidedStep"/> <activity android:name="com.android.tv.dvr.ui.DvrSeriesDeletionActivity" android:configChanges="keyboard|keyboardHidden" + android:exported="false" android:theme="@style/Theme.TV.Dvr.Series.Deletion.GuidedStep"/> <activity android:name="com.android.tv.dvr.ui.DvrSeriesScheduledDialogActivity" + android:exported="false" android:theme="@style/Theme.TV.dialog.HalfSizedDialog"/> <activity android:name="com.android.tv.dvr.ui.list.DvrSchedulesActivity" android:configChanges="keyboard|keyboardHidden" + android:exported="false" android:theme="@style/Theme.Leanback.Details"/> <activity android:name="com.android.tv.dvr.ui.list.DvrHistoryActivity" android:configChanges="keyboard|keyboardHidden" @@ -236,6 +240,7 @@ <service android:name="com.android.tv.recommendation.NotificationService" android:exported="false"/> <service android:name="com.android.tv.recommendation.ChannelPreviewUpdater$ChannelPreviewUpdateService" + android:exported="false" android:permission="android.permission.BIND_JOB_SERVICE"/> <receiver android:name="com.android.tv.receiver.BootCompletedReceiver" @@ -272,12 +277,14 @@ </intent-filter> </activity> <!-- DVR --> <service android:name="com.android.tv.dvr.recorder.DvrRecordingService" + android:exported="false" android:label="@string/dvr_service_name"/> <receiver android:name="com.android.tv.dvr.recorder.DvrStartRecordingReceiver" android:exported="false"/> <service android:name="com.android.tv.data.epg.EpgFetchService" + android:exported="false" android:permission="android.permission.BIND_JOB_SERVICE"/> </application> diff --git a/src/com/android/tv/MainActivity.java b/src/com/android/tv/MainActivity.java index 1f2fd027..cb731260 100644 --- a/src/com/android/tv/MainActivity.java +++ b/src/com/android/tv/MainActivity.java @@ -726,8 +726,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 { diff --git a/tests/robotests/src/com/android/tv/MediaSessionWrapperTest.java b/tests/robotests/src/com/android/tv/MediaSessionWrapperTest.java index 5be62acb..c0263fa7 100644 --- a/tests/robotests/src/com/android/tv/MediaSessionWrapperTest.java +++ b/tests/robotests/src/com/android/tv/MediaSessionWrapperTest.java @@ -56,9 +56,8 @@ public class MediaSessionWrapperTest { @Before public void setUp() { - pendingIntent = - PendingIntent.getActivity( - RuntimeEnvironment.application, TEST_REQUEST_CODE, new Intent(), 0); + pendingIntent = PendingIntent.getActivity(RuntimeEnvironment.application, TEST_REQUEST_CODE, + new Intent(), PendingIntent.FLAG_IMMUTABLE); mediaSessionWrapper = new MediaSessionWrapper(RuntimeEnvironment.application, pendingIntent) { @Override diff --git a/tuner/src/com/android/tv/tuner/setup/BaseTunerSetupActivity.java b/tuner/src/com/android/tv/tuner/setup/BaseTunerSetupActivity.java index 05026907..99f3e6dc 100644 --- a/tuner/src/com/android/tv/tuner/setup/BaseTunerSetupActivity.java +++ b/tuner/src/com/android/tv/tuner/setup/BaseTunerSetupActivity.java @@ -463,8 +463,8 @@ public abstract class BaseTunerSetupActivity extends SetupActivity { */ private static PendingIntent createPendingIntentForSetupActivity( Context context, Intent tunerSetupIntent) { - return PendingIntent.getActivity( - context, 0, tunerSetupIntent, PendingIntent.FLAG_UPDATE_CURRENT); + return PendingIntent.getActivity(context, 0, tunerSetupIntent, + PendingIntent.FLAG_UPDATE_CURRENT|PendingIntent.FLAG_IMMUTABLE); } /** Creates {@link Tuner} instances in a worker thread * */ |