Created
May 29, 2018 08:40
-
-
Save talosdev/02da39eb902404ed8038fce5f32c4053 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 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