Skip to content
Snippets Groups Projects
Commit 895152d7 authored by Bruno Martins's avatar Bruno Martins Committed by Adithya R
Browse files

RecentsView: Unconditionally hide split option for Go-enabled targets

Split option should be disabled for Go-enabled targets as seen
in go/quickstep/res/layout/overview_actions_container.xml.
Here's the snippet:

        <!-- Unused. Included only for compatibility with parent class. -->
        <Button
            android:id="@+id/action_split"
            style="@style/GoOverviewActionButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:drawableStart="@drawable/ic_split_vertical"
            android:text="@string/action_split"
            android:theme="@style/ThemeControlHighlightWorkspaceColor"
            android:visibility="gone" />

        <Space
            android:id="@+id/action_split_space"
            android:layout_width="0dp"
            android:layout_height="1dp"
            android:layout_weight="1"
            android:visibility="gone" />

Change-Id: I5b0a1c340d86430df8d0e2f2b8e800f3867024e6
parent 15f52899
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@
package com.android.quickstep.views;
import android.app.ActivityManager;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
......@@ -366,14 +367,16 @@ public class OverviewActionsView<T extends OverlayUICallbacks> extends FrameLayo
private void updateForIsTablet() {
assert mDp != null;
// Update flags to see if split button should be hidden.
updateSplitButtonHiddenFlags(FLAG_SMALL_SCREEN_HIDE_SPLIT, !mDp.isTablet);
updateSplitButtonHiddenFlags(FLAG_SMALL_SCREEN_HIDE_SPLIT, !mDp.isTablet ||
getContext().getSystemService(ActivityManager.class).isLowRamDevice());
updateActionButtonsVisibility();
}
private void updateActionButtonsVisibility() {
assert mDp != null;
boolean showSingleTaskActions = !mIsGroupedTask;
boolean showGroupActions = mIsGroupedTask && mDp.isTablet && mCanSaveAppPair;
boolean showGroupActions = mIsGroupedTask && mDp.isTablet && mCanSaveAppPair &&
!getContext().getSystemService(ActivityManager.class).isLowRamDevice();
Log.d(TAG, "updateActionButtonsVisibility() called: showSingleTaskActions = ["
+ showSingleTaskActions + "], showGroupActions = [" + showGroupActions + "]");
getActionsAlphas().get(INDEX_GROUPED_ALPHA).setValue(showSingleTaskActions ? 1 : 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment