Remove the Share button option from Overview.

It has never been enabled, and is not plan of record.

Bug: 201446691
Test: local and updated unit tests

Change-Id: I5ac6d40ba1dbcf28de4355cc51fff74cfb37ebc6
This commit is contained in:
Zak Cohen 2021-09-28 13:17:38 -07:00
parent a4c1d0cfa4
commit 283ee7d74b
10 changed files with 1 additions and 88 deletions

View File

@ -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>

View File

@ -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"

View File

@ -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;

View File

@ -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();

View File

@ -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();

View File

@ -170,7 +170,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
OverviewActions actionsView =
mLauncher.pressHome().switchToOverview().getOverviewActions();
actionsView.clickAndDismissScreenshot();
actionsView.clickAndDismissShare();
}
private int getCurrentOverviewPage(Launcher launcher) {

View File

@ -159,9 +159,6 @@ public final class FeatureFlags {
public static final BooleanFlag ENABLE_WIDGETS_PICKER_AIAI_SEARCH = new DeviceFlag(
"ENABLE_WIDGETS_PICKER_AIAI_SEARCH", false, "Enable AiAi search in the widgets picker");
public static final BooleanFlag ENABLE_OVERVIEW_SHARE = getDebugFlag(
"ENABLE_OVERVIEW_SHARE", false, "Show Share button in Overview Actions");
public static final BooleanFlag ENABLE_OVERVIEW_SHARING_TO_PEOPLE = getDebugFlag(
"ENABLE_OVERVIEW_SHARING_TO_PEOPLE", true,
"Show indicators for content on Overview to share with top people. ");

View File

@ -112,7 +112,6 @@ public final class TestProtocol {
public static final String REQUEST_ENABLE_DEBUG_TRACING = "enable-debug-tracing";
public static final String REQUEST_DISABLE_DEBUG_TRACING = "disable-debug-tracing";
public static final String REQUEST_OVERVIEW_SHARE_ENABLED = "overview-share-enabled";
public static boolean sDisableSensorRotation;
public static final String REQUEST_MOCK_SENSOR_ROTATION = "mock-sensor-rotation";

View File

@ -1464,11 +1464,6 @@ public final class LauncherInstrumentation {
getTestInfo(TestProtocol.REQUEST_ENABLE_DEBUG_TRACING);
}
boolean overviewShareEnabled() {
return getTestInfo(TestProtocol.REQUEST_OVERVIEW_SHARE_ENABLED).getBoolean(
TestProtocol.TEST_INFO_RESPONSE_FIELD);
}
private void disableSensorRotation() {
getTestInfo(TestProtocol.REQUEST_MOCK_SENSOR_ROTATION);
}

View File

@ -65,35 +65,6 @@ public class OverviewActions {
}
}
/**
* Click share button, then drags sharesheet down to remove it.
*
* Share is currently hidden behind flag, test is kept in case share becomes a default feature.
* If share is completely removed then remove this test as well.
*/
@NonNull
public Overview clickAndDismissShare() {
if (mLauncher.overviewShareEnabled()) {
try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck();
LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
"want to click share button and dismiss sharesheet")) {
UiObject2 share = mLauncher.waitForObjectInContainer(mOverviewActions,
"action_share");
mLauncher.clickLauncherObject(share);
try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer(
"clicked share button")) {
mLauncher.waitForAndroidObject("contentPanel");
mLauncher.getDevice().pressBack();
try (LauncherInstrumentation.Closable c2 = mLauncher.addContextLayer(
"dismissed sharesheet")) {
return new Overview(mLauncher);
}
}
}
}
return new Overview(mLauncher);
}
/**
* Click select button
*