commit
ec4f57b5b6
|
@ -7,8 +7,8 @@ import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import timber.log.Timber;
|
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.core.content.PermissionChecker;
|
import androidx.core.content.PermissionChecker;
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ import org.moire.ultrasonic.R;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import timber.log.Timber;
|
||||||
|
|
||||||
import static androidx.core.content.PermissionChecker.PERMISSION_DENIED;
|
import static androidx.core.content.PermissionChecker.PERMISSION_DENIED;
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,7 +61,7 @@ public class PermissionUtil {
|
||||||
*
|
*
|
||||||
* @param callback callback function to execute after the permission request is finished
|
* @param callback callback function to execute after the permission request is finished
|
||||||
*/
|
*/
|
||||||
public void handlePermissionFailed(final PermissionRequestFinishedCallback callback) {
|
public void handlePermissionFailed(@Nullable final PermissionRequestFinishedCallback callback) {
|
||||||
String currentCachePath = Settings.getPreferences().getString(Constants.PREFERENCES_KEY_CACHE_LOCATION, FileUtil.getDefaultMusicDirectory().getPath());
|
String currentCachePath = Settings.getPreferences().getString(Constants.PREFERENCES_KEY_CACHE_LOCATION, FileUtil.getDefaultMusicDirectory().getPath());
|
||||||
String defaultCachePath = FileUtil.getDefaultMusicDirectory().getPath();
|
String defaultCachePath = FileUtil.getDefaultMusicDirectory().getPath();
|
||||||
|
|
||||||
|
@ -84,7 +86,9 @@ public class PermissionUtil {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
callback.onPermissionRequestFinished(false);
|
if (callback != null) {
|
||||||
|
callback.onPermissionRequestFinished(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue