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

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

Merge "Fixing the possibility of opening multiple WidgetsFullSheet" into sc-v2-dev

parents ce597d78 97503ab4
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import androidx.core.content.ContextCompat;

import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.R;
@@ -220,6 +221,11 @@ public class OptionsPopupView extends ArrowPopup<Launcher>
            Toast.makeText(launcher, R.string.safemode_widget_error, Toast.LENGTH_SHORT).show();
            return null;
        } else {
            AbstractFloatingView floatingView = AbstractFloatingView.getTopOpenViewWithType(
                    launcher, TYPE_WIDGETS_FULL_SHEET);
            if (floatingView != null) {
                return (WidgetsFullSheet) floatingView;
            }
            return WidgetsFullSheet.show(launcher, true /* animated */);
        }
    }