fix permission

androidx
Ztiany 5 years ago
parent 2b583cff1c
commit c33d0bf3c7
  1. 3
      lib_base/src/main/java/com/android/base/permission/AutoPermissionFragment.java
  2. 1
      lib_base/src/main/java/com/android/base/permission/AutoPermissionRequester.java

@ -41,7 +41,6 @@ public class AutoPermissionFragment extends Fragment {
@Override
public void onPause() {
super.onPause();
mHandler.removeCallbacks(mRunnable);
mIsActivityReady = false;
}
@ -67,6 +66,7 @@ public class AutoPermissionFragment extends Fragment {
}
void startRequest() {
Timber.d("startRequest() called ");
mHandler.removeCallbacks(mRunnable);
startChecked();
}
@ -78,6 +78,7 @@ public class AutoPermissionFragment extends Fragment {
if (callback != null) {
callback.onReady();
}
mCallback = null;
mHandler.removeCallbacks(mRunnable);
} else {
mHandler.postDelayed(mRunnable, 300);

@ -140,6 +140,7 @@ public class AutoPermissionRequester {
@Override
public void onResume(@NonNull LifecycleOwner owner) {
mActivity.getLifecycle().removeObserver(this);
Timber.d("startRequest 2");
startRequestInternal(supportFragmentManager, fragment);
}
};

Loading…
Cancel
Save