diff --git a/lib_base/src/main/java/com/android/base/permission/AutoPermissionFragment.java b/lib_base/src/main/java/com/android/base/permission/AutoPermissionFragment.java index e2115ad..6be72c2 100644 --- a/lib_base/src/main/java/com/android/base/permission/AutoPermissionFragment.java +++ b/lib_base/src/main/java/com/android/base/permission/AutoPermissionFragment.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); diff --git a/lib_base/src/main/java/com/android/base/permission/AutoPermissionRequester.java b/lib_base/src/main/java/com/android/base/permission/AutoPermissionRequester.java index 4d5661f..a9a7d96 100644 --- a/lib_base/src/main/java/com/android/base/permission/AutoPermissionRequester.java +++ b/lib_base/src/main/java/com/android/base/permission/AutoPermissionRequester.java @@ -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); } };