summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Massimo Carli <mcarli@google.com> 2023-05-05 16:44:43 +0000
committer Massimo Carli <mcarli@google.com> 2023-05-09 11:57:29 +0000
commitff6a080e450c824da233b910796419ebb4099336 (patch)
tree30977c621b40f7a168c3dd0f034556fd958d2dc9
parent0b263f790ccebddce066876cbe2a12626ee4d58c (diff)
Remove temporary double icon workarounds
The root cause of the double restart icon problem has been now fixed at native level so we remove all the temporal workarounds. This reverts what's done in ag/22162524 and ag/21096323 Fixes: 280816887 Test: `atest WMShellUnitTests:CompatUIWindowManagerTest` Change-Id: Ic6dc9c3a6cab523dd744cc806cc9ec68d01b9747
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUILayout.java9
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUIWindowManager.java7
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/CompatUIWindowManagerTest.java5
3 files changed, 2 insertions, 19 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUILayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUILayout.java
index f65c26ada04d..d44b4d8f63b6 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUILayout.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUILayout.java
@@ -21,7 +21,6 @@ import android.app.TaskInfo;
import android.app.TaskInfo.CameraCompatControlState;
import android.content.Context;
import android.util.AttributeSet;
-import android.view.MotionEvent;
import android.view.View;
import android.widget.ImageButton;
import android.widget.LinearLayout;
@@ -113,14 +112,6 @@ class CompatUILayout extends LinearLayout {
}
@Override
- public boolean onInterceptTouchEvent(MotionEvent ev) {
- if (ev.getAction() == MotionEvent.ACTION_DOWN) {
- mWindowManager.relayout();
- }
- return super.onInterceptTouchEvent(ev);
- }
-
- @Override
protected void onFinishInflate() {
super.onFinishInflate();
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUIWindowManager.java b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUIWindowManager.java
index d4778fa7a58a..065806df3dc8 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUIWindowManager.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUIWindowManager.java
@@ -204,14 +204,7 @@ class CompatUIWindowManager extends CompatUIWindowManagerAbstract {
: taskStableBounds.right - taskBounds.left - mLayout.getMeasuredWidth();
final int positionY = taskStableBounds.bottom - taskBounds.top
- mLayout.getMeasuredHeight();
- // To secure a proper visualisation, we hide the layout while updating the position of
- // the {@link SurfaceControl} it belongs.
- final int oldVisibility = mLayout.getVisibility();
- if (oldVisibility == View.VISIBLE) {
- mLayout.setVisibility(View.GONE);
- }
updateSurfacePosition(positionX, positionY);
- mLayout.setVisibility(oldVisibility);
}
private void updateVisibilityOfViews() {
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/CompatUIWindowManagerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/CompatUIWindowManagerTest.java
index 55781f1b4d6f..78c3cbdaace6 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/CompatUIWindowManagerTest.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/CompatUIWindowManagerTest.java
@@ -28,7 +28,6 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.anyBoolean;
-import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.clearInvocations;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
@@ -363,14 +362,14 @@ public class CompatUIWindowManagerTest extends ShellTestCase {
mWindowManager.updateVisibility(/* canShow= */ false);
verify(mWindowManager, never()).createLayout(anyBoolean());
- verify(mLayout, atLeastOnce()).setVisibility(View.GONE);
+ verify(mLayout).setVisibility(View.GONE);
// Show button.
doReturn(View.GONE).when(mLayout).getVisibility();
mWindowManager.updateVisibility(/* canShow= */ true);
verify(mWindowManager, never()).createLayout(anyBoolean());
- verify(mLayout, atLeastOnce()).setVisibility(View.VISIBLE);
+ verify(mLayout).setVisibility(View.VISIBLE);
}
@Test