optimize code

androidx
Zhanty 5 years ago
parent 5a9941fd13
commit 16c172345d
  1. 7
      lib_base/src/main/java/com/android/base/permission/AutoPermissionRequester.java

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

Loading…
Cancel
Save