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

Commit 25e75058 authored by Steve Elliott's avatar Steve Elliott Committed by android-build-merger
Browse files

Merge "Update GlobalActionPanelPlugin API with lockscreen state notifications"...

Merge "Update GlobalActionPanelPlugin API with lockscreen state notifications" into qt-dev am: 2f1382ea
am: 1a888091

Change-Id: I665b7cda49e79f98cb42a3c00d9f21657622af8e
parents 11393ce1 1a888091
Loading
Loading
Loading
Loading
+9 −3
Original line number Original line Diff line number Diff line
@@ -26,8 +26,8 @@ import com.android.systemui.plugins.annotations.ProvidesInterface;
 * Plugin which provides a "Panel" {@link View} to be rendered inside of the GlobalActions menu.
 * Plugin which provides a "Panel" {@link View} to be rendered inside of the GlobalActions menu.
 *
 *
 * Implementations should construct a new {@link PanelViewController} with the given
 * Implementations should construct a new {@link PanelViewController} with the given
 * {@link Callbacks} instance inside of {@link #onPanelShown(Callbacks)}, and should not hold onto
 * {@link Callbacks} instance inside of {@link #onPanelShown(Callbacks, boolean)}, and should not
 * a reference, instead allowing Global Actions to manage the lifetime of the object.
 * hold onto a reference, instead allowing Global Actions to manage the lifetime of the object.
 *
 *
 * Under this assumption, {@link PanelViewController} represents the lifetime of a single invocation
 * Under this assumption, {@link PanelViewController} represents the lifetime of a single invocation
 * of the Global Actions menu. The {@link View} for the Panel is generated when the
 * of the Global Actions menu. The {@link View} for the Panel is generated when the
@@ -50,9 +50,10 @@ public interface GlobalActionsPanelPlugin extends Plugin {
     *
     *
     * @param callbacks {@link Callbacks} instance that can be used by the Panel to interact with
     * @param callbacks {@link Callbacks} instance that can be used by the Panel to interact with
     *                  the Global Actions menu.
     *                  the Global Actions menu.
     * @param deviceLocked Indicates whether or not the device is currently locked.
     * @return A {@link PanelViewController} instance used to receive Global Actions events.
     * @return A {@link PanelViewController} instance used to receive Global Actions events.
     */
     */
    PanelViewController onPanelShown(Callbacks callbacks);
    PanelViewController onPanelShown(Callbacks callbacks, boolean deviceLocked);


    /**
    /**
     * Provides methods to interact with the Global Actions menu.
     * Provides methods to interact with the Global Actions menu.
@@ -92,5 +93,10 @@ public interface GlobalActionsPanelPlugin extends Plugin {
         * {@link #getPanelContent()}) is dismissed.
         * {@link #getPanelContent()}) is dismissed.
         */
         */
        void onDismissed();
        void onDismissed();

        /**
         * Invoked when the device is either locked or unlocked.
         */
        void onDeviceLockStateChanged(boolean locked);
    }
    }
}
}
+2 −1
Original line number Original line Diff line number Diff line
@@ -410,7 +410,8 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
                                        mActivityStarter
                                        mActivityStarter
                                                .startPendingIntentDismissingKeyguard(intent);
                                                .startPendingIntentDismissingKeyguard(intent);
                                    }
                                    }
                                })
                                },
                                mKeyguardManager.isDeviceLocked())
                        : null;
                        : null;
        ActionsDialog dialog = new ActionsDialog(mContext, mAdapter, panelViewController);
        ActionsDialog dialog = new ActionsDialog(mContext, mAdapter, panelViewController);
        dialog.setCanceledOnTouchOutside(false); // Handled by the custom class.
        dialog.setCanceledOnTouchOutside(false); // Handled by the custom class.