|
|
@ -119,18 +119,15 @@ public class AutoPermissionRequester { |
|
|
|
if (fragment == null) { |
|
|
|
if (fragment == null) { |
|
|
|
fragment = AutoPermissionFragment.newInstance(); |
|
|
|
fragment = AutoPermissionFragment.newInstance(); |
|
|
|
|
|
|
|
|
|
|
|
mPermissionRequester = new PermissionRequester(ActFragWrapper.create(fragment), mPermissionCallback, mAskAgain, mShowTips, mPermissionUIProvider); |
|
|
|
|
|
|
|
fragment.setRequester(getCallback()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
supportFragmentManager.beginTransaction() |
|
|
|
supportFragmentManager.beginTransaction() |
|
|
|
.add(fragment, AutoPermissionFragment.class.getName()) |
|
|
|
.add(fragment, AutoPermissionFragment.class.getName()) |
|
|
|
.commitNowAllowingStateLoss(); |
|
|
|
.commitNowAllowingStateLoss(); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
fragment.setRequester(getCallback()); |
|
|
|
|
|
|
|
mPermissionRequester = new PermissionRequester(ActFragWrapper.create(fragment), mPermissionCallback, mAskAgain, mShowTips, mPermissionUIProvider); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fragment.setRequester(getCallback()); |
|
|
|
|
|
|
|
mPermissionRequester = new PermissionRequester(ActFragWrapper.create(fragment), mPermissionCallback, mAskAgain, mShowTips, mPermissionUIProvider); |
|
|
|
|
|
|
|
|
|
|
|
fragment.startRequest(); |
|
|
|
fragment.startRequest(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|