am c4f32bb7: am 8f52135f: Merge "Allow apps from managed profles to close notification shade." into lmp-mr1-dev
* commit 'c4f32bb74315d36217238acc0af8fbf798a2cd09': Allow apps from managed profles to close notification shade.
This commit is contained in:
@@ -689,6 +689,12 @@ public abstract class BaseStatusBar extends SystemUI implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean isCurrentProfile(int userId) {
|
||||||
|
synchronized (mCurrentProfiles) {
|
||||||
|
return mCurrentProfiles.get(userId) != null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getCurrentMediaNotificationKey() {
|
public String getCurrentMediaNotificationKey() {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -922,7 +922,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
|||||||
filter.addAction("fake_artwork");
|
filter.addAction("fake_artwork");
|
||||||
}
|
}
|
||||||
filter.addAction(ACTION_DEMO);
|
filter.addAction(ACTION_DEMO);
|
||||||
context.registerReceiver(mBroadcastReceiver, filter);
|
context.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL, filter, null, null);
|
||||||
|
|
||||||
// listen for USER_SETUP_COMPLETE setting (per-user)
|
// listen for USER_SETUP_COMPLETE setting (per-user)
|
||||||
resetUserSetupObserver();
|
resetUserSetupObserver();
|
||||||
@@ -3096,12 +3096,14 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
|||||||
if (DEBUG) Log.v(TAG, "onReceive: " + intent);
|
if (DEBUG) Log.v(TAG, "onReceive: " + intent);
|
||||||
String action = intent.getAction();
|
String action = intent.getAction();
|
||||||
if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)) {
|
if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)) {
|
||||||
int flags = CommandQueue.FLAG_EXCLUDE_NONE;
|
if (isCurrentProfile(getSendingUserId())) {
|
||||||
String reason = intent.getStringExtra("reason");
|
int flags = CommandQueue.FLAG_EXCLUDE_NONE;
|
||||||
if (reason != null && reason.equals(SYSTEM_DIALOG_REASON_RECENT_APPS)) {
|
String reason = intent.getStringExtra("reason");
|
||||||
flags |= CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL;
|
if (reason != null && reason.equals(SYSTEM_DIALOG_REASON_RECENT_APPS)) {
|
||||||
|
flags |= CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL;
|
||||||
|
}
|
||||||
|
animateCollapsePanels(flags);
|
||||||
}
|
}
|
||||||
animateCollapsePanels(flags);
|
|
||||||
}
|
}
|
||||||
else if (Intent.ACTION_SCREEN_OFF.equals(action)) {
|
else if (Intent.ACTION_SCREEN_OFF.equals(action)) {
|
||||||
mScreenOn = false;
|
mScreenOn = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user