Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5958091d authored by Patrick Dubroy's avatar Patrick Dubroy Committed by Android (Google) Code Review
Browse files

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

parents f27c6c10 5d140919
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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);