Merge "Convert the minWidth and minHeight to device units when calling getInstalledProviders"

This commit is contained in:
Patrick Dubroy
2010-07-12 11:40:58 -07:00
committed by Android (Google) Code Review

View File

@@ -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);