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

Commit ba987ca9 authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Override isRestricted for preventing unexpected resource loading

Bug: 179461812
Test: atest FontResourceTest
Change-Id: Ifb731310d31b80522bc82052625716083cac9e6f
(cherry picked from commit 0de34e9d)
parent 64ab91ef
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -593,6 +593,14 @@ public class RemoteViews implements Parcelable, Filter {
        public String getPackageName() {
        public String getPackageName() {
            return mContextForResources.getPackageName();
            return mContextForResources.getPackageName();
        }
        }

        @Override
        public boolean isRestricted() {
            // Override isRestricted and direct to resource's implementation. The isRestricted is
            // used for determining the risky resources loading, e.g. fonts, thus direct to context
            // for resource.
            return mContextForResources.isRestricted();
        }
    }
    }


    private class SetEmptyView extends Action {
    private class SetEmptyView extends Action {