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

Commit 70cc9ffe authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove the Share button option from Overview." into sc-v2-dev

parents 6db0cf1e 283ee7d7
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -120,16 +120,6 @@
            android:layout_height="1dp"
            android:layout_weight="1"
            android:visibility="gone" />

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

</com.android.quickstep.views.GoOverviewActionsView>
 No newline at end of file
+0 −10
Original line number Diff line number Diff line
@@ -63,16 +63,6 @@
            android:layout_weight="1"
            android:visibility="gone" />

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

        <Space
            android:id="@+id/oav_three_button_space"
            android:layout_width="0dp"
+0 −7
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@ import android.graphics.Rect;
import android.os.Bundle;

import com.android.launcher3.LauncherState;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.testing.TestInformationHandler;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.touch.PagedOrientationHandler;
@@ -54,12 +53,6 @@ public class QuickstepTestInformationHandler extends TestInformationHandler {
                        Bundle::putInt, PortraitStatesTouchController::getHotseatTop);
            }

            case TestProtocol.REQUEST_OVERVIEW_SHARE_ENABLED: {
                response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD,
                        FeatureFlags.ENABLE_OVERVIEW_SHARE.get());
                return response;
            }

            case TestProtocol.REQUEST_GET_FOCUSED_TASK_WIDTH_FOR_TABLET: {
                if (!mDeviceProfile.isTablet) {
                    return null;
+0 −11
Original line number Diff line number Diff line
@@ -331,14 +331,6 @@ public class TaskOverlayFactory implements ResourceBasedOverride {
                mTask = task;
            }

            public void onShare() {
                if (mIsAllowedByPolicy) {
                    endLiveTileMode(() -> mImageApi.startShareActivity(null));
                } else {
                    showBlockedByPolicyMessage();
                }
            }

            @SuppressLint("NewApi")
            public void onScreenshot() {
                endLiveTileMode(() -> saveScreenshot(mTask));
@@ -355,9 +347,6 @@ public class TaskOverlayFactory implements ResourceBasedOverride {
     * controller.
     */
    public interface OverlayUICallbacks {
        /** User has indicated they want to share the current task. */
        void onShare();

        /** User has indicated they want to screenshot the current task. */
        void onScreenshot();

+1 −11
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

package com.android.quickstep.views;

import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_SHARE;

import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Rect;
@@ -111,15 +109,9 @@ public class OverviewActionsView<T extends OverlayUICallbacks> extends FrameLayo
    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        View share = findViewById(R.id.action_share);
        share.setOnClickListener(this);
        findViewById(R.id.action_screenshot).setOnClickListener(this);
        mSplitButton = findViewById(R.id.action_split);
        mSplitButton.setOnClickListener(this);
        if (ENABLE_OVERVIEW_SHARE.get()) {
            share.setVisibility(VISIBLE);
            findViewById(R.id.oav_three_button_space).setVisibility(VISIBLE);
        }
    }

    /**
@@ -137,9 +129,7 @@ public class OverviewActionsView<T extends OverlayUICallbacks> extends FrameLayo
            return;
        }
        int id = view.getId();
        if (id == R.id.action_share) {
            mCallbacks.onShare();
        } else if (id == R.id.action_screenshot) {
        if (id == R.id.action_screenshot) {
            mCallbacks.onScreenshot();
        } else if (id == R.id.action_split) {
            mCallbacks.onSplit();
Loading