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

Commit b318ff54 authored by Deepanshu Gupta's avatar Deepanshu Gupta
Browse files

Make DatePicker rendering not fail (style search fix). [DO NOT MERGE]

Only cherry picked for the style not found fix.

Change-Id: Ied2b71de5b32bcb640bf4ec445e8a39509f800e9
(cherry picked from commit d5b82845)
parent cc5e69e4
Loading
Loading
Loading
Loading
+32 −26
Original line number Diff line number Diff line
@@ -66,7 +66,9 @@ import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcel;
import android.os.PowerManager;
import android.os.RemoteException;
import android.os.UserHandle;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
@@ -679,6 +681,10 @@ public final class BridgeContext extends Context {
                }
            }
        } else if (defStyleRes != 0) {
            StyleResourceValue item = mDynamicIdToStyleMap.get(defStyleRes);
            if (item != null) {
                defStyleValues = item;
            } else {
                boolean isFrameworkRes = true;
                Pair<ResourceType, String> value = Bridge.resolveResourceId(defStyleRes);
                if (value == null) {
@@ -689,8 +695,7 @@ public final class BridgeContext extends Context {
                if (value != null) {
                    if ((value.getFirst() == ResourceType.STYLE)) {
                        // look for the style in all resources:
                    StyleResourceValue item = mRenderResources.getStyle(value.getSecond(),
                            isFrameworkRes);
                        item = mRenderResources.getStyle(value.getSecond(), isFrameworkRes);
                        if (item != null) {
                            if (defaultPropMap != null) {
                                defaultPropMap.put("style", item.getName());
@@ -719,6 +724,7 @@ public final class BridgeContext extends Context {
                            null);
                }
            }
        }

        String appNamespace = mLayoutlibCallback.getNamespace();