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

Unverified Commit 51fc8a7a authored by Michael Bestas's avatar Michael Bestas Committed by LuK1337
Browse files

fixup! Trebuchet: allow disabling workspace edit

Change-Id: Icec866f5401f6e3ca562309fb15c639b4412ccaf
parent 28bc60e5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ public abstract class SystemShortcut<T extends ActivityContext> extends ItemInfo

        @Override
        public void onClick(View view) {
            if (!Utilities.isWorkspaceEditAllowed(mTarget.getApplicationContext())) return;
            if (!Utilities.isWorkspaceEditAllowed((Context) mTarget)) return;
            AbstractFloatingView.closeAllOpenViews(mTarget);
            WidgetsBottomSheet widgetsBottomSheet =
                    (WidgetsBottomSheet) mTarget.getLayoutInflater().inflate(
+2 −1
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ import androidx.annotation.Nullable;
import com.android.launcher3.CheckLongPressHelper;
import com.android.launcher3.Flags;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
import com.android.launcher3.util.Themes;
@@ -119,7 +120,7 @@ public class LauncherAppWidgetHostView extends BaseLauncherAppWidgetHostView

    @Override
    public boolean onLongClick(View view) {
        if (!Utilities.isWorkspaceEditAllowed(mLauncher.getApplicationContext())) return true;
        if (!Utilities.isWorkspaceEditAllowed((Context) mActivityContext)) return true;
        if (mIsScrollable) {
            mActivityContext.getDragLayer().requestDisallowInterceptTouchEvent(false);
        }