summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyeongkab.Nam <Kyeongkab.Nam@sony.com>2018-10-09 05:55:42 (GMT)
committerLuca Stefani <luca.stefani.ge1@gmail.com>2019-07-27 20:57:26 (GMT)
commite114b10cffa7b243896e9a04e168d7eb8daa9fa5 (patch)
treeb5904b834b6da9f043f7a1734e3df4e8f1e9c743
parentf275ab8cfaa7ee7bb34f51b5787c0f0d336fbaa4 (diff)
downloadframeworks_base-e114b10cffa7b243896e9a04e168d7eb8daa9fa5.zip
frameworks_base-e114b10cffa7b243896e9a04e168d7eb8daa9fa5.tar.gz
frameworks_base-e114b10cffa7b243896e9a04e168d7eb8daa9fa5.tar.bz2
Fix to register the receiver for all users
To control Pip in secondary users, tv/PipManager needs to register the receiver handling ACTION_MEDIA_RESOURCE_GRANTED for all users. Test: manual - start video playback in restricted profile Change-Id: Iefceacf4a65229ab2ffaa0b607171cd6ee8ae272
-rw-r--r--packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java b/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java
index d6f6760..42d6153 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java
@@ -35,6 +35,7 @@ import android.media.session.PlaybackState;
import android.os.Debug;
import android.os.Handler;
import android.os.RemoteException;
+import android.os.UserHandle;
import android.text.TextUtils;
import android.util.Log;
import android.util.Pair;
@@ -242,7 +243,8 @@ public class PipManager implements BasePipManager {
ActivityManagerWrapper.getInstance().registerTaskStackListener(mTaskStackListener);
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(Intent.ACTION_MEDIA_RESOURCE_GRANTED);
- mContext.registerReceiver(mBroadcastReceiver, intentFilter);
+ mContext.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL, intentFilter,
+ null, null);
if (sSettingsPackageAndClassNamePairList == null) {
String[] settings = mContext.getResources().getStringArray(