Force restart button creation after full rotation
When ending in size compat mode after a 180 degree rotation we need to recreate the restart button to avoid a wrong output. Bug: 270033823 Test: Run existing `atest WMShellUnitTests:CompatUIControllerTest` Change-Id: Ibbf29000830070458e0d054abd5f0b88ca0ed1d4
This commit is contained in:
@@ -21,6 +21,7 @@ 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;
|
||||
@@ -111,6 +112,14 @@ class CompatUILayout extends LinearLayout {
|
||||
mWindowManager.relayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
||||
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
mWindowManager.relayout();
|
||||
}
|
||||
return super.onInterceptTouchEvent(ev);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFinishInflate() {
|
||||
super.onFinishInflate();
|
||||
|
||||
Reference in New Issue
Block a user