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

Commit 1c442aca authored by Diego Perez's avatar Diego Perez Committed by Android (Google) Code Review
Browse files

Merge "Remove auto-boxing during the inflate" into mnc-ub-dev

parents 7dda46e7 91fa3ba4
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -409,7 +409,7 @@ public final class BridgeContext extends Context {
                    pushParser(blockParser);
                    pushParser(blockParser);
                    return Pair.of(
                    return Pair.of(
                            mBridgeInflater.inflate(blockParser, parent, attachToRoot),
                            mBridgeInflater.inflate(blockParser, parent, attachToRoot),
                            true);
                            Boolean.TRUE);
                } finally {
                } finally {
                    popParser();
                    popParser();
                }
                }
@@ -447,7 +447,7 @@ public final class BridgeContext extends Context {
                        pushParser(blockParser);
                        pushParser(blockParser);
                        return Pair.of(
                        return Pair.of(
                                mBridgeInflater.inflate(blockParser, parent, attachToRoot),
                                mBridgeInflater.inflate(blockParser, parent, attachToRoot),
                                false);
                                Boolean.FALSE);
                    } finally {
                    } finally {
                        popParser();
                        popParser();
                    }
                    }
@@ -470,7 +470,7 @@ public final class BridgeContext extends Context {
                            resource.getName()), null);
                            resource.getName()), null);
        }
        }


        return Pair.of(null, false);
        return Pair.of(null, Boolean.FALSE);
    }
    }


    @SuppressWarnings("deprecation")
    @SuppressWarnings("deprecation")
+2 −2
Original line number Original line Diff line number Diff line
@@ -117,11 +117,11 @@ abstract class CustomBar extends LinearLayout {
                density = iconLoader.getDensity();
                density = iconLoader.getDensity();
                String path = iconLoader.getPath();
                String path = iconLoader.getPath();
                // look for a cached bitmap
                // look for a cached bitmap
                Bitmap bitmap = Bridge.getCachedBitmap(path, true /*isFramework*/);
                Bitmap bitmap = Bridge.getCachedBitmap(path, Boolean.TRUE /*isFramework*/);
                if (bitmap == null) {
                if (bitmap == null) {
                    try {
                    try {
                        bitmap = Bitmap_Delegate.createBitmap(stream, false /*isMutable*/, density);
                        bitmap = Bitmap_Delegate.createBitmap(stream, false /*isMutable*/, density);
                        Bridge.setCachedBitmap(path, bitmap, true /*isFramework*/);
                        Bridge.setCachedBitmap(path, bitmap, Boolean.TRUE /*isFramework*/);
                    } catch (IOException e) {
                    } catch (IOException e) {
                        return;
                        return;
                    }
                    }