/// <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); } }
/// <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; } }