Snap for 5900950 from a2da38380c to rvc-release

Change-Id: I660e04655e3e576c19deca48fa384dbcc5a615b3
This commit is contained in:
android-build-team Robot
2019-09-26 03:06:09 +00:00
@@ -22,6 +22,8 @@ import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON;
import android.content.Context;
import android.graphics.Rect;
import android.os.RemoteException;
import android.util.Log;
import android.view.Gravity;
import com.android.launcher3.DeviceProfile;
@@ -42,11 +44,12 @@ import com.android.launcher3.uioverrides.touchcontrollers.TransposedQuickSwitchT
import com.android.launcher3.util.TouchController;
import com.android.launcher3.util.UiThreadHelper;
import com.android.launcher3.util.UiThreadHelper.AsyncCommand;
import com.android.quickstep.RecentsModel;
import com.android.quickstep.SysUINavigationMode;
import com.android.quickstep.SysUINavigationMode.Mode;
import com.android.quickstep.TouchInteractionService;
import com.android.quickstep.views.RecentsView;
import com.android.systemui.shared.system.WindowManagerWrapper;
import com.android.systemui.shared.recents.ISystemUiProxy;
import java.util.ArrayList;
@@ -56,8 +59,20 @@ import java.util.ArrayList;
public abstract class RecentsUiFactory {
public static final boolean GO_LOW_RAM_RECENTS_ENABLED = false;
private static final AsyncCommand SET_SHELF_HEIGHT_CMD = (visible, height) ->
WindowManagerWrapper.getInstance().setShelfHeight(visible != 0, height);
private static final String TAG = RecentsUiFactory.class.getSimpleName();
private static AsyncCommand newSetShelfHeightCmd(Context context) {
return (visible, height) -> {
ISystemUiProxy sysUiProxy = RecentsModel.INSTANCE.get(context).getSystemUiProxy();
if (sysUiProxy == null) return;
try {
sysUiProxy.setShelfHeight(visible != 0, height);
} catch (RemoteException e) {
Log.e(TAG, "Error setShelfHeight", e);
}
};
}
public static RotationMode ROTATION_LANDSCAPE = new RotationMode(-90) {
@Override
@@ -197,7 +212,7 @@ public abstract class RecentsUiFactory {
DeviceProfile profile = launcher.getDeviceProfile();
boolean visible = (state == NORMAL || state == OVERVIEW) && launcher.isUserActive()
&& !profile.isVerticalBarLayout();
UiThreadHelper.runAsyncCommand(launcher, SET_SHELF_HEIGHT_CMD,
UiThreadHelper.runAsyncCommand(launcher, newSetShelfHeightCmd(launcher),
visible ? 1 : 0, profile.hotseatBarSizePx);
if (state == NORMAL) {