summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/view/contentcapture/ContentCaptureManager.java32
-rw-r--r--core/java/android/view/contentcapture/MainContentCaptureSession.java5
-rw-r--r--core/java/com/android/internal/app/ResolverActivity.java3
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/recents/IOverviewProxy.aidl5
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java23
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java21
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java12
9 files changed, 37 insertions, 76 deletions
diff --git a/core/java/android/view/contentcapture/ContentCaptureManager.java b/core/java/android/view/contentcapture/ContentCaptureManager.java
index 1664637eac56..d067d4bc366b 100644
--- a/core/java/android/view/contentcapture/ContentCaptureManager.java
+++ b/core/java/android/view/contentcapture/ContentCaptureManager.java
@@ -378,7 +378,7 @@ public final class ContentCaptureManager {
private final Object mLock = new Object();
@NonNull
- private final Context mContext;
+ private final StrippedContext mContext;
@NonNull
private final IContentCaptureManager mService;
@@ -414,9 +414,37 @@ public final class ContentCaptureManager {
}
/** @hide */
+ static class StrippedContext {
+ final String mPackageName;
+ final String mContext;
+ final @UserIdInt int mUserId;
+
+ private StrippedContext(Context context) {
+ mPackageName = context.getPackageName();
+ mContext = context.toString();
+ mUserId = context.getUserId();
+ }
+
+ @Override
+ public String toString() {
+ return mContext;
+ }
+
+ public String getPackageName() {
+ return mPackageName;
+ }
+
+ @UserIdInt
+ public int getUserId() {
+ return mUserId;
+ }
+ }
+
+ /** @hide */
public ContentCaptureManager(@NonNull Context context,
@NonNull IContentCaptureManager service, @NonNull ContentCaptureOptions options) {
- mContext = Objects.requireNonNull(context, "context cannot be null");
+ Objects.requireNonNull(context, "context cannot be null");
+ mContext = new StrippedContext(context);
mService = Objects.requireNonNull(service, "service cannot be null");
mOptions = Objects.requireNonNull(options, "options cannot be null");
diff --git a/core/java/android/view/contentcapture/MainContentCaptureSession.java b/core/java/android/view/contentcapture/MainContentCaptureSession.java
index 90384b520315..1f5e462d71fd 100644
--- a/core/java/android/view/contentcapture/MainContentCaptureSession.java
+++ b/core/java/android/view/contentcapture/MainContentCaptureSession.java
@@ -36,7 +36,6 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UiThread;
import android.content.ComponentName;
-import android.content.Context;
import android.content.pm.ParceledListSlice;
import android.graphics.Insets;
import android.graphics.Rect;
@@ -103,7 +102,7 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
private final AtomicBoolean mDisabled = new AtomicBoolean(false);
@NonNull
- private final Context mContext;
+ private final ContentCaptureManager.StrippedContext mContext;
@NonNull
private final ContentCaptureManager mManager;
@@ -197,7 +196,7 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
}
}
- protected MainContentCaptureSession(@NonNull Context context,
+ protected MainContentCaptureSession(@NonNull ContentCaptureManager.StrippedContext context,
@NonNull ContentCaptureManager manager, @NonNull Handler handler,
@NonNull IContentCaptureManager systemServerInterface) {
mContext = context;
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index c70e26f65829..47400deac34b 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -1098,6 +1098,9 @@ public class ResolverActivity extends Activity implements
@Override // ResolverListCommunicator
public final void onPostListReady(ResolverListAdapter listAdapter, boolean doPostProcessing,
boolean rebuildCompleted) {
+ if (isDestroyed()) {
+ return;
+ }
if (isAutolaunching()) {
return;
}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/IOverviewProxy.aidl b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/IOverviewProxy.aidl
index bfbe88c475ac..abefeba9c417 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/IOverviewProxy.aidl
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/IOverviewProxy.aidl
@@ -60,11 +60,6 @@ oneway interface IOverviewProxy {
void onSystemUiStateChanged(int stateFlags) = 16;
/**
- * Sent when the split screen is resized
- */
- void onSplitScreenSecondaryBoundsChanged(in Rect bounds, in Rect insets) = 17;
-
- /**
* Sent when suggested rotation button could be shown
*/
void onRotationProposal(int rotation, boolean isValid) = 18;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java
index 46c4f410d078..ba97297421b3 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java
@@ -108,7 +108,6 @@ import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
-import java.util.function.BiConsumer;
import java.util.function.Supplier;
import javax.inject.Inject;
@@ -470,8 +469,6 @@ public class OverviewProxyService extends CurrentUserTracker implements
};
private final StatusBarWindowCallback mStatusBarWindowCallback = this::onStatusBarStateChanged;
- private final BiConsumer<Rect, Rect> mSplitScreenBoundsChangeListener =
- this::notifySplitScreenBoundsChanged;
// This is the death handler for the binder from the launcher service
private final IBinder.DeathRecipient mOverviewServiceDeathRcpt
@@ -839,26 +836,6 @@ public class OverviewProxyService extends CurrentUserTracker implements
}
}
- /**
- * Notifies the Launcher of split screen size changes
- *
- * @param secondaryWindowBounds Bounds of the secondary window including the insets
- * @param secondaryWindowInsets stable insets received by the secondary window
- */
- public void notifySplitScreenBoundsChanged(
- Rect secondaryWindowBounds, Rect secondaryWindowInsets) {
- try {
- if (mOverviewProxy != null) {
- mOverviewProxy.onSplitScreenSecondaryBoundsChanged(
- secondaryWindowBounds, secondaryWindowInsets);
- } else {
- Log.e(TAG_OPS, "Failed to get overview proxy for split screen bounds.");
- }
- } catch (RemoteException e) {
- Log.e(TAG_OPS, "Failed to call onSplitScreenSecondaryBoundsChanged()", e);
- }
- }
-
private final ScreenLifecycle.Observer mLifecycleObserver = new ScreenLifecycle.Observer() {
/**
* Notifies the Launcher that screen turned on and ready to use
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index 92f5c851f208..350f49bcf37d 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -455,7 +455,6 @@ public final class NotificationPanelViewController {
* need to take this into account in our panel height calculation.
*/
private boolean mQsAnimatorExpand;
- private boolean mIsLaunchTransitionFinished;
private ValueAnimator mQsSizeChangeAnimator;
private boolean mQsScrimEnabled = true;
private boolean mQsTouchAboveFalsingThreshold;
@@ -1753,7 +1752,6 @@ public final class NotificationPanelViewController {
}
public void resetViews(boolean animate) {
- mIsLaunchTransitionFinished = false;
mCentralSurfaces.getGutsManager().closeAndSaveGuts(true /* leavebehind */, true /* force */,
true /* controls */, -1 /* x */, -1 /* y */, true /* resetMenu */);
if (animate && !isFullyCollapsed()) {
@@ -3779,10 +3777,6 @@ public final class NotificationPanelViewController {
mQs.closeCustomizer();
}
- public boolean isLaunchTransitionFinished() {
- return mIsLaunchTransitionFinished;
- }
-
public void setIsLaunchAnimationRunning(boolean running) {
boolean wasRunning = mIsLaunchAnimationRunning;
mIsLaunchAnimationRunning = running;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
index 15cc086586da..0ad72ab77bf9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
@@ -2569,12 +2569,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
// ordering.
mMainExecutor.execute(mShadeController::runPostCollapseRunnables);
}
- } else if (mNotificationPanelViewController.isLaunchTransitionFinished()) {
- // We are not dismissing the shade, but the launch transition is already
- // finished,
- // so nobody will call readyForKeyguardDone anymore. Post it such that
- // keyguardDonePending gets called first.
- mMainExecutor.execute(mStatusBarKeyguardViewManager::readyForKeyguardDone);
}
return deferred;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index a00e75642f55..9e2821806693 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -476,7 +476,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
} else if (mKeyguardStateController.isShowing() && !hideBouncerOverDream) {
if (!isWakeAndUnlocking()
&& !(mBiometricUnlockController.getMode() == MODE_DISMISS_BOUNCER)
- && !mNotificationPanelViewController.isLaunchTransitionFinished()
&& !isUnlockCollapsing()) {
if (mBouncer != null) {
mBouncer.setExpansion(fraction);
@@ -845,21 +844,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
if (isShowing && isOccluding) {
SysUiStatsLog.write(SysUiStatsLog.KEYGUARD_STATE_CHANGED,
SysUiStatsLog.KEYGUARD_STATE_CHANGED__STATE__OCCLUDED);
- if (mNotificationPanelViewController.isLaunchTransitionFinished()) {
- final Runnable endRunnable = new Runnable() {
- @Override
- public void run() {
- mNotificationShadeWindowController.setKeyguardOccluded(isOccluded);
- reset(true /* hideBouncerWhenShowing */);
- }
- };
- mCentralSurfaces.fadeKeyguardAfterLaunchTransition(
- null /* beforeFading */,
- endRunnable,
- endRunnable);
- return;
- }
-
if (mCentralSurfaces.isLaunchingActivityOverLockscreen()) {
// When isLaunchingActivityOverLockscreen() is true, we know for sure that the post
// collapse runnables will be run.
@@ -931,8 +915,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
long uptimeMillis = SystemClock.uptimeMillis();
long delay = Math.max(0, startTime + HIDE_TIMING_CORRECTION_MS - uptimeMillis);
- if (mNotificationPanelViewController.isLaunchTransitionFinished()
- || mKeyguardStateController.isFlingingToDismissKeyguard()) {
+ if (mKeyguardStateController.isFlingingToDismissKeyguard()) {
final boolean wasFlingingToDismissKeyguard =
mKeyguardStateController.isFlingingToDismissKeyguard();
mCentralSurfaces.fadeKeyguardAfterLaunchTransition(new Runnable() {
@@ -1309,7 +1292,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
@Override
public boolean shouldDisableWindowAnimationsForUnlock() {
- return mNotificationPanelViewController.isLaunchTransitionFinished();
+ return false;
}
@Override
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
index 716666657871..ec8d71136452 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
@@ -306,17 +306,6 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
- public void onPanelExpansionChanged_neverTranslatesBouncerWhenLaunchingApp() {
- when(mNotificationPanelView.isLaunchTransitionFinished()).thenReturn(true);
- mStatusBarKeyguardViewManager.onPanelExpansionChanged(
- expansionEvent(
- /* fraction= */ KeyguardBouncer.EXPANSION_VISIBLE,
- /* expanded= */ true,
- /* tracking= */ false));
- verify(mBouncer, never()).setExpansion(anyFloat());
- }
-
- @Test
public void onPanelExpansionChanged_neverTranslatesBouncerWhenShadeLocked() {
when(mStatusBarStateController.getState()).thenReturn(StatusBarState.SHADE_LOCKED);
mStatusBarKeyguardViewManager.onPanelExpansionChanged(
@@ -361,7 +350,6 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
@Test
public void setOccluded_isInLaunchTransition_onKeyguardOccludedChangedCalled() {
- when(mNotificationPanelView.isLaunchTransitionFinished()).thenReturn(true);
mStatusBarKeyguardViewManager.show(null);
mStatusBarKeyguardViewManager.setOccluded(true /* occluded */, false /* animated */);