Skip to content

Commit 10c543d

Browse files
committed
Reduced Warnings by adding Type Arguments and removing unused imports
Change-Id: I42f8f9f9a6a6b271eaeb1a02f6d6567a630936ea
1 parent dd1880e commit 10c543d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

core/java/android/appwidget/AppWidgetManager.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import android.os.RemoteException;
2323
import android.os.ServiceManager;
2424
import android.util.DisplayMetrics;
25-
import android.util.Log;
2625
import android.util.TypedValue;
2726
import 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

Comments
 (0)