FileDocCategorySizeDatePackage
RecentsAppWidgetHost.javaAPI DocAndroid 5.1 API2579Thu Mar 12 22:22:42 GMT 2015com.android.systemui.recents

RecentsAppWidgetHost

public class RecentsAppWidgetHost extends android.appwidget.AppWidgetHost
Our special app widget host for the Search widget

Fields Summary
android.content.Context
mContext
RecentsAppWidgetHostCallbacks
mCb
RecentsConfiguration
mConfig
boolean
mIsListening
Constructors Summary
public RecentsAppWidgetHost(android.content.Context context, int hostId)

        super(context, hostId);
        mContext = context;
        mConfig = RecentsConfiguration.getInstance();
    
Methods Summary
protected voidonProviderChanged(int appWidgetId, android.appwidget.AppWidgetProviderInfo appWidgetInfo)

        if (mCb == null) return;

        SystemServicesProxy ssp = RecentsTaskLoader.getInstance().getSystemServicesProxy();
        if (appWidgetId > -1 && appWidgetId == mConfig.searchBarAppWidgetId) {
            // The search provider may have changed, so just delete the old widget and bind it again
            ssp.unbindSearchAppWidget(this, appWidgetId);
            // Update the search widget
            mConfig.updateSearchBarAppWidgetId(mContext, -1);
            mCb.refreshSearchWidget();
        }
    
public voidstartListening(com.android.systemui.recents.RecentsAppWidgetHost$RecentsAppWidgetHostCallbacks cb)

        mCb = cb;
        if (!mIsListening) {
            mIsListening = true;
            super.startListening();
        }
    
public voidstopListening()

        if (mIsListening) {
            super.stopListening();
        }
        // Ensure that we release any references to the callbacks
        mCb = null;
        mContext = null;
        mIsListening = false;