mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-14 08:08:21 +00:00
Add smartspace custom widget
Flag: SMARTSPACE_AS_A_WIDGET Test: no test Bug: 200721106 Change-Id: I4ae4ff72ff7267bab0b5a928f3f78b47f7cfbc1f
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
package com.android.systemui.plugins;
|
||||
|
||||
import android.appwidget.AppWidgetHostView;
|
||||
import android.appwidget.AppWidgetProviderInfo;
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.systemui.plugins.annotations.ProvidesInterface;
|
||||
|
||||
@@ -29,43 +31,21 @@ public interface CustomWidgetPlugin extends Plugin {
|
||||
String ACTION = "com.android.systemui.action.PLUGIN_CUSTOM_WIDGET";
|
||||
int VERSION = 1;
|
||||
|
||||
/**
|
||||
* The label to display to the user in the AppWidget picker.
|
||||
*/
|
||||
String getLabel();
|
||||
|
||||
/**
|
||||
* The default width of the widget when added to a host, in dp. The widget will get
|
||||
* at least this width, and will often be given more, depending on the host.
|
||||
*/
|
||||
int getSpanX();
|
||||
|
||||
/**
|
||||
* The default height of the widget when added to a host, in dp. The widget will get
|
||||
* at least this height, and will often be given more, depending on the host.
|
||||
*/
|
||||
int getSpanY();
|
||||
|
||||
/**
|
||||
* Minimum width (in dp) which the widget can be resized to. This field has no effect if it
|
||||
* is greater than minWidth or if horizontal resizing isn't enabled.
|
||||
*/
|
||||
int getMinSpanX();
|
||||
|
||||
/**
|
||||
* Minimum height (in dp) which the widget can be resized to. This field has no effect if it
|
||||
* is greater than minHeight or if vertical resizing isn't enabled.
|
||||
*/
|
||||
int getMinSpanY();
|
||||
|
||||
/**
|
||||
* The rules by which a widget can be resized.
|
||||
*/
|
||||
int getResizeMode();
|
||||
|
||||
/**
|
||||
* Notify the plugin that container of the widget has been rendered, where the custom widget
|
||||
* can be attached to.
|
||||
*/
|
||||
void onViewCreated(AppWidgetHostView parent);
|
||||
|
||||
/**
|
||||
* Get the UUID for the custom widget.
|
||||
*/
|
||||
String getId();
|
||||
|
||||
/**
|
||||
* Used to modify a widgets' info.
|
||||
*/
|
||||
default void updateWidgetInfo(AppWidgetProviderInfo info, Context context) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user