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

Commit 9d0942a8 authored by Diego Perez's avatar Diego Perez
Browse files

Implement missing getAssignedPackageIdentifiers delegate

Just leaving the implementation empty as that should avoid the crash
when calling it. The default stub was returning null and all the uses
were expecting an instance of SpareArray

Bug: http://b.android.com/211529
Change-Id: I497f823a6bfb7a6a946ba20c4f31b1020d2a0cef
(cherry picked from commit 98b704a284870b52cec37bf19370432c194e0608)
parent e774db7a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ package android.content.res;

import com.android.tools.layoutlib.annotations.LayoutlibDelegate;

import android.util.SparseArray;

/**
 * Delegate used to provide implementation of a select few native methods of {@link AssetManager}
 * <p/>
@@ -38,4 +40,8 @@ public class AssetManager_Delegate {
        Resources_Theme_Delegate.getDelegateManager().removeJavaReferenceFor(theme);
    }

    @LayoutlibDelegate
    /*package*/ static SparseArray<String> getAssignedPackageIdentifiers(AssetManager manager) {
        return new SparseArray<>();
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -186,6 +186,7 @@ public final class CreateInfo implements ICreateInfo {
        "android.content.res.Resources$Theme#resolveAttributes",
        "android.content.res.AssetManager#newTheme",
        "android.content.res.AssetManager#deleteTheme",
        "android.content.res.AssetManager#getAssignedPackageIdentifiers",
        "android.content.res.TypedArray#getValueAt",
        "android.content.res.TypedArray#obtain",
        "android.graphics.BitmapFactory#finishDecode",