Example usage for android.os Binder getCallingUserHandle

List of usage examples for android.os Binder getCallingUserHandle

Introduction

In this page you can find the example usage for android.os Binder getCallingUserHandle.

Prototype

public static final @NonNull UserHandle getCallingUserHandle() 

Source Link

Document

Return the UserHandle assigned to the process that sent you the current transaction that is being processed.

Usage

From source file:com.android.server.MountService.java

private boolean hasUserRestriction(String restriction) {
    UserManager um = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
    return um.hasUserRestriction(restriction, Binder.getCallingUserHandle());
}