mAppWidgetManager = AppWidgetManagerCompat.getInstance(this);
mAppWidgetHost = new LauncherAppWidgetHost(this, APPWIDGET_HOST_ID);
- mAppWidgetHost.startListening();
if (sRemoteFolderManager == null) {
sRemoteFolderManager = new RemoteFolderManager(this);
if (mLauncherCallbacks != null) {
mLauncherCallbacks.onStart();
}
+ // If AppwidgetService failed to bind in onCreate, this will attempt binding again.
+ onAppWidgetHostReset();
}
@Override
import android.appwidget.AppWidgetProviderInfo;
import android.content.Context;
import android.os.TransactionTooLargeException;
+import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
try {
super.startListening();
} catch (Exception e) {
+ /*
if (e.getCause() instanceof TransactionTooLargeException) {
// We're willing to let this slide. The exception is being caused by the list of
// RemoteViews which is being passed back. The startListening relationship will
// widgets upon bind anyway. See issue 14255011 for more context.
} else {
throw new RuntimeException(e);
- }
+ }*/
+ // If we can't bind to the app widget service, move on. We will retry at the next
+ // onStart().
+ Log.e("LauncherAppWidgetHost", "Error binding to IAppWidgetService", e);
}
}