diff options
author | Patrick Dubroy <dubroy@google.com> | 2010-07-12 10:25:27 -0700 |
---|---|---|
committer | Patrick Dubroy <dubroy@google.com> | 2010-07-12 10:29:30 -0700 |
commit | 5d1409191ea8d76268ddc4cd14759ad0d6a3c180 (patch) | |
tree | 110f776747e72955b7c6c5c1b16b5790200c6ad4 /core/java/android/appwidget/AppWidgetManager.java | |
parent | b48fdbe79260b1603cfef5e304e068c29d4bc257 (diff) | |
download | frameworks_base-5d1409191ea8d76268ddc4cd14759ad0d6a3c180.zip frameworks_base-5d1409191ea8d76268ddc4cd14759ad0d6a3c180.tar.gz frameworks_base-5d1409191ea8d76268ddc4cd14759ad0d6a3c180.tar.bz2 |
Convert the minWidth and minHeight to device units when calling getInstalledProviders
Diffstat (limited to 'core/java/android/appwidget/AppWidgetManager.java')
-rw-r--r-- | core/java/android/appwidget/AppWidgetManager.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/java/android/appwidget/AppWidgetManager.java b/core/java/android/appwidget/AppWidgetManager.java index d4ce6a1..3029cce 100644 --- a/core/java/android/appwidget/AppWidgetManager.java +++ b/core/java/android/appwidget/AppWidgetManager.java @@ -292,7 +292,15 @@ public class AppWidgetManager { */ public List<AppWidgetProviderInfo> getInstalledProviders() { try { - return sService.getInstalledProviders(); + List<AppWidgetProviderInfo> providers = sService.getInstalledProviders(); + for (AppWidgetProviderInfo info : providers) { + // Converting complex to dp. + info.minWidth = + TypedValue.complexToDimensionPixelSize(info.minWidth, mDisplayMetrics); + info.minHeight = + TypedValue.complexToDimensionPixelSize(info.minHeight, mDisplayMetrics); + } + return providers; } catch (RemoteException e) { throw new RuntimeException("system server dead?", e); |