本文整理了Java中android.appwidget.AppWidgetHost.startListening()
方法的一些代码示例,展示了AppWidgetHost.startListening()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppWidgetHost.startListening()
方法的具体详情如下:
包路径:android.appwidget.AppWidgetHost
类名称:AppWidgetHost
方法名:startListening
暂无
代码示例来源:origin: Neamar/KISS
void onStart() {
// Start listening for widget update
mAppWidgetHost.startListening();
}
代码示例来源:origin: WeAreFairphone/FP2-Launcher
@Override
public void startListening() {
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
// have been established by this point, and we will end up populating the
// widgets upon bind anyway. See issue 14255011 for more context.
throw new RuntimeException(e);
}
}
}
代码示例来源:origin: fookwood/Launcher3
@Override
public void startListening() {
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
// have been established by this point, and we will end up populating the
// widgets upon bind anyway. See issue 14255011 for more context.
} else {
throw new RuntimeException(e);
}
}
}
代码示例来源:origin: klinker24/Android-Blur-Launcher
@Override
public void startListening() {
try {
super.startListening();
} catch (Exception e) {
if (e.getCause() instanceof TransactionTooLargeException ||
e.getCause() instanceof DeadObjectException) {
// 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
// have been established by this point, and we will end up populating the
// widgets upon bind anyway. See issue 14255011 for more context.
} else {
throw new RuntimeException(e);
}
}
}
代码示例来源:origin: klinker24/launcher3
@Override
public void startListening() {
try {
super.startListening();
} catch (Exception e) {
if (e.getCause() instanceof TransactionTooLargeException ||
e.getCause() instanceof DeadObjectException) {
// 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
// have been established by this point, and we will end up populating the
// widgets upon bind anyway. See issue 14255011 for more context.
} else {
throw new RuntimeException(e);
}
}
}
代码示例来源:origin: enricocid/LaunchEnr
@Override
public void startListening() {
try {
super.startListening();
} catch (Exception e) {
if (!Utilities.isBinderSizeError(e)) {
throw new RuntimeException(e);
}
// 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
// have been established by this point, and we will end up populating the
// widgets upon bind anyway. See issue 14255011 for more context.
}
}
代码示例来源:origin: MoMoWait/LeanbackLauncher
protected void onStart() {
super.onStart();
Log.i(TAG, "onStart");
this.mResetAfterIdleEnabled = false;
if (this.mAppWidgetHost != null) {
this.mAppWidgetHost.startListening();
}
//setShyMode(!isBackgroundVisibleBehind(), true);
this.mWallpaper.resetBackground();
/*if (this.mHomeAdapter != null) {
this.mHomeAdapter.refreshAdapterData();
}*/
if (this.mKeepUiReset) {
resetLauncherState(false);
}
if (!this.mStartingEditMode) {
if (!this.mLaunchAnimation.isInitialized()) {
this.mLaunchAnimation.init(new LauncherReturnAnimator(this.mList, this.mLaunchAnimation.lastKnownEpicenter, this.mHomeAdapter.getRowHeaders(), this.mHomeScreenView), this.mRefreshHomeAdapter, (byte) 32);
}
this.mLaunchAnimation.schedule();
}
this.mStartingEditMode = false;
/* if (this.mGoogleApiClient != null) {
this.mGoogleApiClient.connect();
}*/
}
代码示例来源:origin: rockon999/LeanbackLauncher
protected void onStart() {
boolean z = true;
AppTrace.beginSection("onStart");
try {
super.onStart();
this.mResetAfterIdleEnabled = false;
if (this.mAppWidgetHost != null) {
this.mAppWidgetHost.startListening();
}
//if (isBackgroundVisibleBehind()) {
// z = false;
//}
setShyMode(z, true);
this.mWallpaper.resetBackground();
this.mHomeAdapter.refreshAdapterData();
if (this.mKeepUiReset) {
resetLauncherState(false);
}
if (!this.mStartingEditMode) {
if (!this.mLaunchAnimation.isInitialized()) {
this.mLaunchAnimation.init(new LauncherReturnAnimator(this.mList, this.mLaunchAnimation.lastKnownEpicenter, this.mHomeAdapter.getRowHeaders(), this.mHomeScreenView), this.mRefreshHomeAdapter, (byte) 32);
}
this.mLaunchAnimation.schedule();
}
this.mStartingEditMode = false;
AppTrace.endSection();
} catch (Throwable th) {
AppTrace.endSection();
}
}
代码示例来源:origin: clemensbartz/essential-launcher
appWidgetManager = AppWidgetManager.getInstance(this);
appWidgetHost = new AppWidgetHost(this, R.id.frWidget);
appWidgetHost.startListening();
内容来源于网络,如有侵权,请联系作者删除!