Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save talosdev/02da39eb902404ed8038fce5f32c4053 to your computer and use it in GitHub Desktop.

Select an option

Save talosdev/02da39eb902404ed8038fce5f32c4053 to your computer and use it in GitHub Desktop.
/**
* Dispatches the result of the permission request from the Activity to the
* {@link RuntimePermissionRequestHandler}
*/
public class PermissionsRequestResultDispatcher {
private RuntimePermissionRequestHandler permissionRequestHandler;
@Inject
public PermissionsRequestResultDispatcher(RuntimePermissionRequestHandler handler) {
permissionRequestHandler = handler;
}
/**
* To be called from {@link Activity#onRequestPermissionsResult(int, String[], int[])}
*/
public void dispatchResult(boolean granted) {
permissionRequestHandler.onPermissionRequestResult(granted);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment