public override void resized(int w, int h, android.graphics.Rect coveredInsets, android.graphics.Rect visibleInsets, bool reportDraw, android.content.res.Configuration newConfig) { android.view.SurfaceView surfaceView = mSurfaceView.get(); if (surfaceView != null) { surfaceView.mSurfaceLock.@lock(); try { if (reportDraw) { surfaceView.mUpdateWindowNeeded = true; surfaceView.mReportDrawNeeded = true; surfaceView.mHandler.sendEmptyMessage(UPDATE_WINDOW_MSG); } else { if (surfaceView.mWinFrame.width() != w || surfaceView.mWinFrame.height() != h) { surfaceView.mUpdateWindowNeeded = true; surfaceView.mHandler.sendEmptyMessage(UPDATE_WINDOW_MSG); } } } finally { surfaceView.mSurfaceLock.unlock(); } } }
/// <summary> /// Get the AppWidgetManager instance to use for the supplied /// <see cref="android.content.Context">Context</see> /// object. /// </summary> public static android.appwidget.AppWidgetManager getInstance(android.content.Context context) { lock (sManagerCache) { if (sService == null) { android.os.IBinder b = android.os.ServiceManager.getService(android.content.Context .APPWIDGET_SERVICE); sService = android.appwidget.@internal.IAppWidgetServiceClass.Stub.asInterface(b); } [email protected] <android.appwidget.AppWidgetManager> @ref = sManagerCache .get(context); android.appwidget.AppWidgetManager result = null; if (@ref != null) { result = @ref.get(); } if (result == null) { result = new android.appwidget.AppWidgetManager(context); sManagerCache.put(context, new [email protected] <android.appwidget.AppWidgetManager >(result)); } return(result); } }
public override void connected(android.content.ComponentName name, android.os.IBinder service) { android.app.LoadedApk.ServiceDispatcher sd = mDispatcher.get(); if (sd != null) { sd.connected(name, service); } }
/// <summary>Creates or retrieves a ColorStateList that always returns a single color. /// </summary> /// <remarks>Creates or retrieves a ColorStateList that always returns a single color. /// </remarks> public static android.content.res.ColorStateList valueOf(int color) { // TODO: should we collect these eventually? lock (sCache) { [email protected] <android.content.res.ColorStateList> @ref = sCache.get (color); android.content.res.ColorStateList csl = @ref != null? @ref.get() : null; if (csl != null) { return(csl); } csl = new android.content.res.ColorStateList(EMPTY, new int[] { color }); sCache.put(color, new [email protected] <android.content.res.ColorStateList >(csl)); return(csl); } }
public override void handleMessage(android.os.Message msg) { switch (msg.what) { case android.content.DialogInterfaceClass.BUTTON_POSITIVE: case android.content.DialogInterfaceClass.BUTTON_NEGATIVE: case android.content.DialogInterfaceClass.BUTTON_NEUTRAL: { ((android.content.DialogInterfaceClass.OnClickListener)msg.obj).onClick(mDialog.get (), msg.what); break; } case MSG_DISMISS_DIALOG: { ((android.content.DialogInterface)msg.obj).dismiss(); break; } } }