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

Commit b6ee41aa authored by Pierre Barbier de Reuille's avatar Pierre Barbier de Reuille
Browse files

Make RemoteViewsContextWrapper take the user id of the application info.

This is important to ensure sub-contexts know the user id used to create
the current context, or when using a work profile, a new context will be
created each time.

Fix: 197761162
Test: Manually with hand-made app widget
Change-Id: Ifb4a6dad152acbd2b2853ba8bf5cf1e131d55394
parent 1bc5c4fe
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -739,6 +739,16 @@ public class RemoteViews implements Parcelable, Filter {
            return mContextForResources.getPackageName();
        }

        @Override
        public UserHandle getUser() {
            return mContextForResources.getUser();
        }

        @Override
        public int getUserId() {
            return mContextForResources.getUserId();
        }

        @Override
        public boolean isRestricted() {
            // Override isRestricted and direct to resource's implementation. The isRestricted is