2222import android .os .RemoteException ;
2323import android .os .ServiceManager ;
2424import android .util .DisplayMetrics ;
25- import android .util .Log ;
2625import android .util .TypedValue ;
2726import android .widget .RemoteViews ;
2827
@@ -149,7 +148,7 @@ public class AppWidgetManager {
149148 * instances as possible.</td>
150149 * </tr>
151150 * </table>
152- *
151+ *
153152 * @see AppWidgetProvider#onUpdate AppWidgetProvider.onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds)
154153 */
155154 public static final String ACTION_APPWIDGET_UPDATE = "android.appwidget.action.APPWIDGET_UPDATE" ;
@@ -163,7 +162,7 @@ public class AppWidgetManager {
163162
164163 /**
165164 * Sent when an instance of an AppWidget is removed from the last host.
166- *
165+ *
167166 * @see AppWidgetProvider#onEnabled AppWidgetProvider.onEnabled(Context context)
168167 */
169168 public static final String ACTION_APPWIDGET_DISABLED = "android.appwidget.action.APPWIDGET_DISABLED" ;
@@ -172,7 +171,7 @@ public class AppWidgetManager {
172171 * Sent when an instance of an AppWidget is added to a host for the first time.
173172 * This broadcast is sent at boot time if there is a AppWidgetHost installed with
174173 * an instance for this provider.
175- *
174+ *
176175 * @see AppWidgetProvider#onEnabled AppWidgetProvider.onEnabled(Context context)
177176 */
178177 public static final String ACTION_APPWIDGET_ENABLED = "android.appwidget.action.APPWIDGET_ENABLED" ;
@@ -183,20 +182,21 @@ public class AppWidgetManager {
183182 * @see AppWidgetProviderInfo
184183 */
185184 public static final String META_DATA_APPWIDGET_PROVIDER = "android.appwidget.provider" ;
186-
185+
187186 /**
188187 * Field for the manifest meta-data tag used to indicate any previous name for the
189188 * app widget receiver.
190189 *
191190 * @see AppWidgetProviderInfo
192- *
191+ *
193192 * @hide Pending API approval
194193 */
195194 public static final String META_DATA_APPWIDGET_OLD_NAME = "android.appwidget.oldName" ;
196195
197- static WeakHashMap <Context , WeakReference <AppWidgetManager >> sManagerCache = new WeakHashMap ();
196+ static WeakHashMap <Context , WeakReference <AppWidgetManager >> sManagerCache =
197+ new WeakHashMap <Context , WeakReference <AppWidgetManager >>();
198198 static IAppWidgetService sService ;
199-
199+
200200 Context mContext ;
201201
202202 private DisplayMetrics mDisplayMetrics ;
@@ -219,7 +219,7 @@ public static AppWidgetManager getInstance(Context context) {
219219 }
220220 if (result == null ) {
221221 result = new AppWidgetManager (context );
222- sManagerCache .put (context , new WeakReference (result ));
222+ sManagerCache .put (context , new WeakReference < AppWidgetManager > (result ));
223223 }
224224 return result ;
225225 }
@@ -310,7 +310,7 @@ public AppWidgetProviderInfo getAppWidgetInfo(int appWidgetId) {
310310 AppWidgetProviderInfo info = sService .getAppWidgetInfo (appWidgetId );
311311 if (info != null ) {
312312 // Converting complex to dp.
313- info .minWidth =
313+ info .minWidth =
314314 TypedValue .complexToDimensionPixelSize (info .minWidth , mDisplayMetrics );
315315 info .minHeight =
316316 TypedValue .complexToDimensionPixelSize (info .minHeight , mDisplayMetrics );
@@ -344,7 +344,7 @@ public void bindAppWidgetId(int appWidgetId, ComponentName provider) {
344344 /**
345345 * Get the list of appWidgetIds that have been bound to the given AppWidget
346346 * provider.
347- *
347+ *
348348 * @param provider The {@link android.content.BroadcastReceiver} that is the
349349 * AppWidget provider to find appWidgetIds for.
350350 */
0 commit comments