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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user