Merge "Cleanup ENABLE_PIP_APP_ICON_OVERLAY" into udc-qpr-dev

This commit is contained in:
Hongwei Wang
2023-08-16 16:45:34 +00:00
committed by Android (Google) Code Review
3 changed files with 6 additions and 22 deletions

View File

@@ -63,7 +63,6 @@ import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.view.Choreographer;
import android.view.Display;
import android.view.Surface;
@@ -1735,17 +1734,13 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
// animation.
// TODO(b/272819817): cleanup the null-check and extra logging.
final boolean hasTopActivityInfo = mTaskInfo.topActivityInfo != null;
if (!hasTopActivityInfo) {
ProtoLog.w(ShellProtoLogGroup.WM_SHELL_TRANSITIONS,
"%s: TaskInfo.topActivityInfo is null", TAG);
}
if (SystemProperties.getBoolean(
"persist.wm.debug.enable_pip_app_icon_overlay", true)
&& hasTopActivityInfo) {
if (hasTopActivityInfo) {
animator.setAppIconContentOverlay(
mContext, currentBounds, mTaskInfo.topActivityInfo,
mPipBoundsState.getLauncherState().getAppIconSizePx());
} else {
ProtoLog.w(ShellProtoLogGroup.WM_SHELL_TRANSITIONS,
"%s: TaskInfo.topActivityInfo is null", TAG);
animator.setColorContentOverlay(mContext);
}
} else {

View File

@@ -49,7 +49,6 @@ import android.content.Context;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.IBinder;
import android.os.SystemProperties;
import android.view.Surface;
import android.view.SurfaceControl;
import android.view.WindowManager;
@@ -902,17 +901,13 @@ public class PipTransition extends PipTransitionController {
// animation.
// TODO(b/272819817): cleanup the null-check and extra logging.
final boolean hasTopActivityInfo = taskInfo.topActivityInfo != null;
if (!hasTopActivityInfo) {
ProtoLog.w(ShellProtoLogGroup.WM_SHELL_TRANSITIONS,
"%s: TaskInfo.topActivityInfo is null", TAG);
}
if (SystemProperties.getBoolean(
"persist.wm.debug.enable_pip_app_icon_overlay", true)
&& hasTopActivityInfo) {
if (hasTopActivityInfo) {
animator.setAppIconContentOverlay(
mContext, currentBounds, taskInfo.topActivityInfo,
mPipBoundsState.getLauncherState().getAppIconSizePx());
} else {
ProtoLog.w(ShellProtoLogGroup.WM_SHELL_TRANSITIONS,
"%s: TaskInfo.topActivityInfo is null", TAG);
animator.setColorContentOverlay(mContext);
}
} else {

View File

@@ -544,12 +544,6 @@ object Flags {
val ENABLE_PIP_SIZE_LARGE_SCREEN =
sysPropBooleanFlag("persist.wm.debug.enable_pip_size_large_screen", default = true)
// TODO(b/265998256): Tracking bug
@Keep
@JvmField
val ENABLE_PIP_APP_ICON_OVERLAY =
sysPropBooleanFlag("persist.wm.debug.enable_pip_app_icon_overlay", default = true)
// TODO(b/293252410) : Tracking Bug
@JvmField