Merge "Update SmartspaceDataPlugin to allow sending SmartspaceTargetEvents." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3e8e6b9f28
@@ -19,6 +19,7 @@ package com.android.systemui.plugins;
|
|||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
import android.app.smartspace.SmartspaceAction;
|
import android.app.smartspace.SmartspaceAction;
|
||||||
import android.app.smartspace.SmartspaceTarget;
|
import android.app.smartspace.SmartspaceTarget;
|
||||||
|
import android.app.smartspace.SmartspaceTargetEvent;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
@@ -45,6 +46,18 @@ public interface BcSmartspaceDataPlugin extends Plugin {
|
|||||||
/** Unregister a listener. */
|
/** Unregister a listener. */
|
||||||
void unregisterListener(SmartspaceTargetListener listener);
|
void unregisterListener(SmartspaceTargetListener listener);
|
||||||
|
|
||||||
|
/** Register a SmartspaceEventNotifier. */
|
||||||
|
default void registerSmartspaceEventNotifier(SmartspaceEventNotifier notifier) {}
|
||||||
|
|
||||||
|
/** Push a SmartspaceTargetEvent to the SmartspaceEventNotifier. */
|
||||||
|
default void notifySmartspaceEvent(SmartspaceTargetEvent event) {}
|
||||||
|
|
||||||
|
/** Allows for notifying the SmartspaceSession of SmartspaceTargetEvents. */
|
||||||
|
interface SmartspaceEventNotifier {
|
||||||
|
/** Pushes a given SmartspaceTargetEvent to the SmartspaceSession. */
|
||||||
|
void notifySmartspaceEvent(SmartspaceTargetEvent event);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a view to be shown within the parent. Do not add the view, as the parent
|
* Create a view to be shown within the parent. Do not add the view, as the parent
|
||||||
* will be responsible for correctly setting the LayoutParams
|
* will be responsible for correctly setting the LayoutParams
|
||||||
|
|||||||
Reference in New Issue
Block a user