summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/current.txt5
-rw-r--r--api/system-current.txt5
-rw-r--r--api/test-current.txt5
-rw-r--r--core/java/android/app/Notification.java5
-rw-r--r--core/java/android/service/notification/NotificationListenerService.java21
-rw-r--r--packages/PrintSpooler/res/layout/add_printer_list_header.xml3
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java14
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java39
-rw-r--r--services/core/java/com/android/server/AppOpsService.java15
-rw-r--r--services/core/java/com/android/server/am/ActivityStack.java16
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java8
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java6
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java4
-rw-r--r--telecomm/java/android/telecom/Call.java5
20 files changed, 107 insertions, 68 deletions
diff --git a/api/current.txt b/api/current.txt
index ed1a1ce56e47..1f7dd26d6b60 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -34633,8 +34633,8 @@ package android.service.notification {
method public void onNotificationRemoved(android.service.notification.StatusBarNotification, android.service.notification.NotificationListenerService.RankingMap);
method public final void requestInterruptionFilter(int);
method public final void requestListenerHints(int);
- method public static void requestRebind(android.content.ComponentName) throws android.os.RemoteException;
- method public final void requestUnbind() throws android.os.RemoteException;
+ method public static void requestRebind(android.content.ComponentName);
+ method public final void requestUnbind();
method public final void setNotificationsShown(java.lang.String[]);
field public static final int HINT_HOST_DISABLE_CALL_EFFECTS = 4; // 0x4
field public static final int HINT_HOST_DISABLE_EFFECTS = 1; // 0x1
@@ -36010,7 +36010,6 @@ package android.telecom {
field public static final int PROPERTY_GENERIC_CONFERENCE = 2; // 0x2
field public static final int PROPERTY_HIGH_DEF_AUDIO = 16; // 0x10
field public static final int PROPERTY_WIFI = 8; // 0x8
- field public static final deprecated int PROPERTY_WORK_CALL = 32; // 0x20
}
public final class CallAudioState implements android.os.Parcelable {
diff --git a/api/system-current.txt b/api/system-current.txt
index cbc9c00b909c..da430c0ea436 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -37359,8 +37359,8 @@ package android.service.notification {
method public void registerAsSystemService(android.content.Context, android.content.ComponentName, int) throws android.os.RemoteException;
method public final void requestInterruptionFilter(int);
method public final void requestListenerHints(int);
- method public static void requestRebind(android.content.ComponentName) throws android.os.RemoteException;
- method public final void requestUnbind() throws android.os.RemoteException;
+ method public static void requestRebind(android.content.ComponentName);
+ method public final void requestUnbind();
method public final void setNotificationsShown(java.lang.String[]);
method public final void setOnNotificationPostedTrim(int);
method public void unregisterAsSystemService() throws android.os.RemoteException;
@@ -38846,7 +38846,6 @@ package android.telecom {
field public static final int PROPERTY_GENERIC_CONFERENCE = 2; // 0x2
field public static final int PROPERTY_HIGH_DEF_AUDIO = 16; // 0x10
field public static final int PROPERTY_WIFI = 8; // 0x8
- field public static final deprecated int PROPERTY_WORK_CALL = 32; // 0x20
}
public static abstract deprecated class Call.Listener extends android.telecom.Call.Callback {
diff --git a/api/test-current.txt b/api/test-current.txt
index 523e7f48f262..a67d45e70dba 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -34710,8 +34710,8 @@ package android.service.notification {
method public void onNotificationRemoved(android.service.notification.StatusBarNotification, android.service.notification.NotificationListenerService.RankingMap);
method public final void requestInterruptionFilter(int);
method public final void requestListenerHints(int);
- method public static void requestRebind(android.content.ComponentName) throws android.os.RemoteException;
- method public final void requestUnbind() throws android.os.RemoteException;
+ method public static void requestRebind(android.content.ComponentName);
+ method public final void requestUnbind();
method public final void setNotificationsShown(java.lang.String[]);
field public static final int HINT_HOST_DISABLE_CALL_EFFECTS = 4; // 0x4
field public static final int HINT_HOST_DISABLE_EFFECTS = 1; // 0x1
@@ -36087,7 +36087,6 @@ package android.telecom {
field public static final int PROPERTY_GENERIC_CONFERENCE = 2; // 0x2
field public static final int PROPERTY_HIGH_DEF_AUDIO = 16; // 0x10
field public static final int PROPERTY_WIFI = 8; // 0x8
- field public static final deprecated int PROPERTY_WORK_CALL = 32; // 0x20
}
public final class CallAudioState implements android.os.Parcelable {
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index bd94a17de402..50780584ed37 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -3106,6 +3106,11 @@ public class Notification implements Parcelable
}
private Drawable getProfileBadgeDrawable() {
+ if (mContext.getUserId() == UserHandle.USER_SYSTEM) {
+ // This user can never be a badged profile,
+ // and also includes USER_ALL system notifications.
+ return null;
+ }
// Note: This assumes that the current user can read the profile badge of the
// originating user.
return mContext.getPackageManager().getUserBadgeForDensityNoBackground(
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java
index 25fe4ffaa471..1557a2718b55 100644
--- a/core/java/android/service/notification/NotificationListenerService.java
+++ b/core/java/android/service/notification/NotificationListenerService.java
@@ -790,11 +790,14 @@ public abstract class NotificationListenerService extends Service {
* <p>This method will fail for listeners that have
* not been granted the permission by the user.
*/
- public static void requestRebind(ComponentName componentName)
- throws RemoteException {
+ public static void requestRebind(ComponentName componentName) {
INotificationManager noMan = INotificationManager.Stub.asInterface(
ServiceManager.getService(Context.NOTIFICATION_SERVICE));
- noMan.requestBindListener(componentName);
+ try {
+ noMan.requestBindListener(componentName);
+ } catch (RemoteException ex) {
+ throw ex.rethrowFromSystemServer();
+ }
}
/**
@@ -807,12 +810,16 @@ public abstract class NotificationListenerService extends Service {
* <p>The service should wait for the {@link #onListenerConnected()} event
* before performing this operation. I know it's tempting, but you must wait.
*/
- public final void requestUnbind() throws RemoteException {
+ public final void requestUnbind() {
if (mWrapper != null) {
INotificationManager noMan = getNotificationInterface();
- noMan.requestUnbindListener(mWrapper);
- // Disable future messages.
- isConnected = false;
+ try {
+ noMan.requestUnbindListener(mWrapper);
+ // Disable future messages.
+ isConnected = false;
+ } catch (RemoteException ex) {
+ throw ex.rethrowFromSystemServer();
+ }
}
}
diff --git a/packages/PrintSpooler/res/layout/add_printer_list_header.xml b/packages/PrintSpooler/res/layout/add_printer_list_header.xml
index ff342cbbb0fa..9eee0c46c124 100644
--- a/packages/PrintSpooler/res/layout/add_printer_list_header.xml
+++ b/packages/PrintSpooler/res/layout/add_printer_list_header.xml
@@ -16,7 +16,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
- android:layout_height="?android:attr/listPreferredItemHeightSmall"
+ android:layout_height="wrap_content"
+ android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:orientation="horizontal"
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
index 64f83a938928..1a944ce71796 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
@@ -417,8 +417,8 @@ public class SystemServicesProxy {
options.setLaunchStackId(DOCKED_STACK_ID);
mIam.startActivityFromRecents(taskId, options.toBundle());
return true;
- } catch (RemoteException | IllegalArgumentException e) {
- e.printStackTrace();
+ } catch (Exception e) {
+ Log.e(TAG, "Failed to dock task: " + taskId + " with createMode: " + createMode, e);
}
return false;
}
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
index 64eaeec98948..f728aa438aa5 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
+++ b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
@@ -1065,9 +1065,6 @@ public class DividerView extends FrameLayout implements OnTouchListener,
mEntranceAnimationRunning = true;
resizeStack(position, mSnapAlgorithm.getMiddleTarget().position,
mSnapAlgorithm.getMiddleTarget());
-
- // Vibrate after docking
- performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
}
public final void onBusEvent(RecentsDrawnEvent drawnEvent) {
@@ -1105,9 +1102,6 @@ public class DividerView extends FrameLayout implements OnTouchListener,
mExitStartPosition = getCurrentPosition();
stopDragging(mExitStartPosition, target, 336 /* duration */, 100 /* startDelay */,
0 /* endDelay */, Interpolators.FAST_OUT_SLOW_IN);
-
- // Vibrate after undocking
- performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
index 182075f15186..0df12044c46e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
@@ -215,17 +215,23 @@ public class NotificationGroupManager implements HeadsUpManager.OnHeadsUpChanged
public boolean isOnlyChildInSuppressedGroup(StatusBarNotification sbn) {
return isGroupSuppressed(sbn.getGroupKey())
- && isOnlyChildInGroup(sbn);
+ && isOnlyChild(sbn);
}
- public boolean isOnlyChildInGroup(StatusBarNotification sbn) {
+ private boolean isOnlyChild(StatusBarNotification sbn) {
return !sbn.getNotification().isGroupSummary()
&& getTotalNumberOfChildren(sbn) == 1;
}
+ public boolean isOnlyChildInGroup(StatusBarNotification sbn) {
+ return isOnlyChild(sbn) && getLogicalGroupSummary(sbn) != null;
+ }
+
private int getTotalNumberOfChildren(StatusBarNotification sbn) {
- return getNumberOfIsolatedChildren(sbn.getGroupKey())
- + mGroupMap.get(sbn.getGroupKey()).children.size();
+ int isolatedChildren = getNumberOfIsolatedChildren(sbn.getGroupKey());
+ NotificationGroup group = mGroupMap.get(sbn.getGroupKey());
+ int realChildren = group != null ? group.children.size() : 0;
+ return isolatedChildren + realChildren;
}
private boolean isGroupSuppressed(String groupKey) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 9dbec6da2bc2..6a37099d0b7d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -39,6 +39,7 @@ import android.view.WindowInsets;
import android.view.accessibility.AccessibilityEvent;
import android.widget.FrameLayout;
import android.widget.TextView;
+
import com.android.internal.logging.MetricsLogger;
import com.android.keyguard.KeyguardStatusView;
import com.android.systemui.AutoReinflateContainer;
@@ -2291,6 +2292,12 @@ public class NotificationPanelView extends PanelView implements
setLaunchingAffordance(false);
}
+ @Override
+ public void setAlpha(float alpha) {
+ super.setAlpha(alpha);
+ mNotificationStackScroller.setParentFadingOut(alpha != 1.0f);
+ }
+
/**
* Set whether we are currently launching an affordance. This is currently only set when
* launched via a camera gesture.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index e3ce1e27f3e6..073994f8a5ce 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -3865,6 +3865,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
mScrimController.forceHideScrims(true /* hide */);
updateMediaMetaData(false, true);
mNotificationPanel.setAlpha(1);
+ mStackScroller.setParentFadingOut(true);
mNotificationPanel.animate()
.alpha(0)
.setStartDelay(FADE_KEYGUARD_START_DELAY)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
index eae0b8e47614..9c4480e60efa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -322,6 +322,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener,
if (scrim instanceof ScrimView) {
float alpha2 = getDozeAlpha(scrim);
float alpha = 1 - (1 - alpha1) * (1 - alpha2);
+ alpha = Math.max(0, Math.min(1.0f, alpha));
((ScrimView) scrim).setScrimColor(Color.argb((int) (alpha * 255), 0, 0, 0));
} else {
scrim.setAlpha(alpha1);
@@ -468,6 +469,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener,
PropertyValuesHolder[] values = previousAnimator.getValues();
float relativeDiff = alpha - previousEndValue;
float newStartValue = previousStartValue + relativeDiff;
+ newStartValue = Math.max(0, Math.min(1.0f, newStartValue));
values[0].setFloatValues(newStartValue, alpha);
scrim.setTag(TAG_START_ALPHA, newStartValue);
scrim.setTag(TAG_END_ALPHA, alpha);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java
index ddded49d2e36..21d03fd8443a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java
@@ -53,7 +53,7 @@ public class BrightnessMirrorController {
public void showMirror() {
mBrightnessMirror.setVisibility(View.VISIBLE);
- mStackScroller.setFadedOut(true);
+ mStackScroller.setFadingOut(true);
mScrimBehind.animateViewAlpha(0.0f, TRANSITION_DURATION_OUT, Interpolators.ALPHA_OUT);
outAnimation(mNotificationPanel.animate())
.withLayer();
@@ -67,7 +67,7 @@ public class BrightnessMirrorController {
@Override
public void run() {
mBrightnessMirror.setVisibility(View.INVISIBLE);
- mStackScroller.setFadedOut(false);
+ mStackScroller.setFadingOut(false);
}
});
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
index 70d4aec0f8df..f7a2d2b173c0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -333,7 +333,8 @@ public class NotificationStackScrollLayout extends ViewGroup
private PorterDuffXfermode mSrcMode = new PorterDuffXfermode(PorterDuff.Mode.SRC);
private boolean mPulsing;
private boolean mDrawBackgroundAsSrc;
- private boolean mFadedOut;
+ private boolean mFadingOut;
+ private boolean mParentFadingOut;
private boolean mGroupExpandedForMeasure;
private View mForcedScroll;
private float mBackgroundFadeAmount = 1.0f;
@@ -470,7 +471,8 @@ public class NotificationStackScrollLayout extends ViewGroup
}
private void updateSrcDrawing() {
- mBackgroundPaint.setXfermode(mDrawBackgroundAsSrc && !mFadedOut ? mSrcMode : null);
+ mBackgroundPaint.setXfermode(mDrawBackgroundAsSrc && (!mFadingOut && !mParentFadingOut)
+ ? mSrcMode : null);
invalidate();
}
@@ -1871,7 +1873,7 @@ public class NotificationStackScrollLayout extends ViewGroup
}
private void applyCurrentBackgroundBounds() {
- if (!mFadedOut) {
+ if (!mFadingOut) {
mScrimController.setExcludedBackgroundArea(mCurrentBounds);
}
invalidate();
@@ -3610,22 +3612,33 @@ public class NotificationStackScrollLayout extends ViewGroup
updateNotificationAnimationStates();
}
- public void setFadedOut(boolean fadingOut) {
- if (fadingOut != mFadedOut) {
- mFadedOut = fadingOut;
- if (fadingOut) {
- mScrimController.setExcludedBackgroundArea(null);
- } else {
- applyCurrentBackgroundBounds();
- }
- updateSrcDrawing();
+ public void setFadingOut(boolean fadingOut) {
+ if (fadingOut != mFadingOut) {
+ mFadingOut = fadingOut;
+ updateFadingState();
+ }
+ }
+
+ public void setParentFadingOut(boolean fadingOut) {
+ if (fadingOut != mParentFadingOut) {
+ mParentFadingOut = fadingOut;
+ updateFadingState();
}
}
+ private void updateFadingState() {
+ if (mFadingOut || mParentFadingOut || mAmbientState.isDark()) {
+ mScrimController.setExcludedBackgroundArea(null);
+ } else {
+ applyCurrentBackgroundBounds();
+ }
+ updateSrcDrawing();
+ }
+
@Override
public void setAlpha(@FloatRange(from = 0.0, to = 1.0) float alpha) {
super.setAlpha(alpha);
- setFadedOut(alpha != 1.0f);
+ setFadingOut(alpha != 1.0f);
}
/**
diff --git a/services/core/java/com/android/server/AppOpsService.java b/services/core/java/com/android/server/AppOpsService.java
index ca3c39f51e62..dab7d706a6d2 100644
--- a/services/core/java/com/android/server/AppOpsService.java
+++ b/services/core/java/com/android/server/AppOpsService.java
@@ -1316,13 +1316,14 @@ public class AppOpsService extends IAppOpsService.Stub {
// For each client, check that the given op is not restricted, or that the given
// package is exempt from the restriction.
ClientRestrictionState restrictionState = mOpUserRestrictions.valueAt(i);
- if (restrictionState.hasRestriction(code, packageName, userHandle)
- && AppOpsManager.opAllowSystemBypassRestriction(code)) {
- // If we are the system, bypass user restrictions for certain codes
- synchronized (this) {
- Ops ops = getOpsRawLocked(uid, packageName, true);
- if ((ops != null) && ops.isPrivileged) {
- return false;
+ if (restrictionState.hasRestriction(code, packageName, userHandle)) {
+ if (AppOpsManager.opAllowSystemBypassRestriction(code)) {
+ // If we are the system, bypass user restrictions for certain codes
+ synchronized (this) {
+ Ops ops = getOpsRawLocked(uid, packageName, true);
+ if ((ops != null) && ops.isPrivileged) {
+ return false;
+ }
}
}
return true;
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 3811b616a7f2..9718ae86d42e 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -1819,22 +1819,24 @@ final class ActivityStack {
private boolean shouldBeVisible(ActivityRecord r, boolean behindTranslucentActivity,
boolean stackVisibleBehind, ActivityRecord visibleBehind,
boolean behindFullscreenActivity) {
- // mLaunchingBehind: Activities launching behind are at the back of the task stack
- // but must be drawn initially for the animation as though they were visible.
- final boolean activityVisibleBehind =
- (behindTranslucentActivity || stackVisibleBehind) && visibleBehind == r;
if (!okToShowLocked(r)) {
return false;
}
+ // mLaunchingBehind: Activities launching behind are at the back of the task stack
+ // but must be drawn initially for the animation as though they were visible.
+ final boolean activityVisibleBehind =
+ (behindTranslucentActivity || stackVisibleBehind) && visibleBehind == r;
+
boolean isVisible =
!behindFullscreenActivity || r.mLaunchTaskBehind || activityVisibleBehind;
if (isVisible && r.isRecentsActivity()) {
- // Recents activity can only be visible if the home stack isn't fullscreen or is the
- // focused stack.
- isVisible = !mFullscreen || mStackSupervisor.isFocusedStack(this);
+ // Recents activity can only be visible if the home stack is the focused stack or we are
+ // in split-screen mode.
+ isVisible = mStackSupervisor.getStack(DOCKED_STACK_ID) != null
+ || mStackSupervisor.isFocusedStack(this);
}
return isVisible;
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 82cd0fa0c25d..aaed8ca9181d 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -2359,7 +2359,13 @@ public class WindowManagerService extends IWindowManager.Stub
// immediately after the enter animation is done. If the app is not yet drawn then
// it will show up as a flicker.
win.mRemoveOnExit = true;
- win.mWindowRemovalAllowed = true;
+ // Request a focus update as this window's input channel is already gone. Otherwise
+ // we could have no focused window in input manager.
+ final boolean focusChanged = updateFocusedWindowLocked(
+ UPDATE_FOCUS_WILL_PLACE_SURFACES, false /*updateInputWindows*/);
+ if (focusChanged) {
+ mInputMonitor.updateInputWindowsLw(false /*force*/);
+ }
Binder.restoreCallingIdentity(origId);
return;
}
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index e5e74a663eb0..c15afb339646 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -1265,8 +1265,8 @@ final class WindowState implements WindowManagerPolicy.WindowState {
* @return true if the window should be considered while evaluating allDrawn flags.
*/
boolean mightAffectAllDrawn(boolean visibleOnly) {
- final boolean isViewVisible = (mViewVisibility == View.VISIBLE)
- && (mAppToken == null || !mAppToken.clientHidden);
+ final boolean isViewVisible = (mAppToken == null || !mAppToken.clientHidden)
+ && (mViewVisibility == View.VISIBLE) && !mWindowRemovalAllowed;
return (isOnScreenIgnoringKeyguard() && (!visibleOnly || isViewVisible)
|| mWinAnimator.mAttrType == TYPE_BASE_APPLICATION)
&& !mAnimatingExit && !mDestroying;
@@ -1822,7 +1822,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
/** @return true if this window desires key events. */
boolean canReceiveKeys() {
return isVisibleOrAdding()
- && (mViewVisibility == View.VISIBLE)
+ && (mViewVisibility == View.VISIBLE) && !mRemoveOnExit
&& ((mAttrs.flags & WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE) == 0)
&& (mAppToken == null || mAppToken.windowsAreFocusable())
&& !isAdjustedForMinimizedDock();
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index a5eb0b217d1f..c1913decde16 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -484,7 +484,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
});
}
- if (Intent.ACTION_BOOT_COMPLETED.equals(action)
+ if (Intent.ACTION_USER_UNLOCKED.equals(action)
+ || Intent.ACTION_USER_STARTED.equals(action)
|| KeyChain.ACTION_STORAGE_CHANGED.equals(action)) {
int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_ALL);
new MonitoringCertNotificationTask().execute(userId);
@@ -1582,6 +1583,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
filter.addAction(Intent.ACTION_USER_ADDED);
filter.addAction(Intent.ACTION_USER_REMOVED);
filter.addAction(Intent.ACTION_USER_STARTED);
+ filter.addAction(Intent.ACTION_USER_UNLOCKED);
filter.addAction(KeyChain.ACTION_STORAGE_CHANGED);
filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
mContext.registerReceiverAsUser(mReceiver, UserHandle.ALL, filter, null, mHandler);
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index 43f8739f74fd..7d7e1eb29e80 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -287,11 +287,6 @@ public final class Call {
public static final int PROPERTY_HIGH_DEF_AUDIO = 0x00000010;
/**
- * @deprecated Use {@link #PROPERTY_ENTERPRISE_CALL} instead.
- */
- public static final int PROPERTY_WORK_CALL = 0x00000020;
-
- /**
* Whether the call is associated with the work profile.
*/
public static final int PROPERTY_ENTERPRISE_CALL = 0x00000020;