Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dbedb91a authored by Sreyas's avatar Sreyas
Browse files

Putting Overview Share button behind flag

parent 69d77263
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.quickstep.views;
package com.android.quickstep.views;


import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS;
import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS;
import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_SHARE;
import static com.android.quickstep.SysUINavigationMode.removeShelfFromOverview;
import static com.android.quickstep.SysUINavigationMode.removeShelfFromOverview;


import android.content.Context;
import android.content.Context;
@@ -91,8 +92,13 @@ public class OverviewActionsView<T extends OverlayUICallbacks> extends FrameLayo
    @Override
    @Override
    protected void onFinishInflate() {
    protected void onFinishInflate() {
        super.onFinishInflate();
        super.onFinishInflate();
        findViewById(R.id.action_share).setOnClickListener(this);
        View share = findViewById(R.id.action_share);
        share.setOnClickListener(this);
        findViewById(R.id.action_screenshot).setOnClickListener(this);
        findViewById(R.id.action_screenshot).setOnClickListener(this);
        if (ENABLE_OVERVIEW_SHARE.get()) {
            share.setVisibility(VISIBLE);
            findViewById(R.id.share_space).setVisibility(VISIBLE);
        }
    }
    }


    /**
    /**
+16 −13
Original line number Original line Diff line number Diff line
@@ -14,8 +14,7 @@
     See the License for the specific language governing permissions and
     See the License for the specific language governing permissions and
     limitations under the License.
     limitations under the License.
-->
-->
<com.android.quickstep.views.OverviewActionsView
<com.android.quickstep.views.OverviewActionsView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_width="match_parent"
    android:layout_height="@dimen/overview_actions_height"
    android:layout_height="@dimen/overview_actions_height"
    android:layout_gravity="center_horizontal|bottom"
    android:layout_gravity="center_horizontal|bottom"
@@ -28,38 +27,42 @@
        android:layout_height="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_gravity="center"
        android:orientation="horizontal">
        android:orientation="horizontal">

        <Space
        <Space
            android:layout_width="0dp"
            android:layout_width="0dp"
            android:layout_height="1dp"
            android:layout_height="1dp"
            android:layout_weight="1" >
            android:layout_weight="1" />
        </Space>

        <Button
        <Button
            android:id="@+id/action_screenshot"
            android:id="@+id/action_screenshot"
            android:theme="@style/ThemeControlHighlightWorkspaceColor"
            style="@style/OverviewActionButton"
            style="@style/OverviewActionButton"
            android:layout_width="wrap_content"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_height="wrap_content"
            android:drawableTop="@drawable/ic_screenshot"
            android:drawableTop="@drawable/ic_screenshot"
            android:text="@string/action_screenshot" />
            android:text="@string/action_screenshot"
            android:theme="@style/ThemeControlHighlightWorkspaceColor" />

        <Space
        <Space
            android:layout_width="0dp"
            android:layout_width="0dp"
            android:layout_height="1dp"
            android:layout_height="1dp"
            android:layout_weight="1" >
            android:layout_weight="1" />
        </Space>


        <Button
        <Button
            android:id="@+id/action_share"
            android:id="@+id/action_share"
            android:theme="@style/ThemeControlHighlightWorkspaceColor"
            style="@style/OverviewActionButton"
            style="@style/OverviewActionButton"
            android:layout_width="wrap_content"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_height="wrap_content"
            android:drawableTop="@drawable/ic_share"
            android:drawableTop="@drawable/ic_share"
            android:text="@string/action_share" />
            android:text="@string/action_share"
            android:theme="@style/ThemeControlHighlightWorkspaceColor"
            android:visibility="gone" />

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


</com.android.quickstep.views.OverviewActionsView>
</com.android.quickstep.views.OverviewActionsView>
 No newline at end of file
+3 −0
Original line number Original line Diff line number Diff line
@@ -147,6 +147,9 @@ public final class FeatureFlags {
    public static final BooleanFlag ENABLE_OVERVIEW_SELECTIONS = new DeviceFlag(
    public static final BooleanFlag ENABLE_OVERVIEW_SELECTIONS = new DeviceFlag(
            "ENABLE_OVERVIEW_SELECTIONS", true, "Show Select Mode button in Overview Actions");
            "ENABLE_OVERVIEW_SELECTIONS", true, "Show Select Mode button in Overview Actions");


    public static final BooleanFlag ENABLE_OVERVIEW_SHARE = getDebugFlag(
            "ENABLE_OVERVIEW_SHARE", false, "Show Share button in Overview Actions");

    public static final BooleanFlag ENABLE_DATABASE_RESTORE = getDebugFlag(
    public static final BooleanFlag ENABLE_DATABASE_RESTORE = getDebugFlag(
            "ENABLE_DATABASE_RESTORE", true,
            "ENABLE_DATABASE_RESTORE", true,
            "Enable database restore when new restore session is created");
            "Enable database restore when new restore session is created");