butterproject / butter-android

All the cool technical bits of what used to be Popcorn Time for Android
Other
315 stars 367 forks source link

Remove permission requests at onboarding #281

Closed carlonzo closed 6 years ago

carlonzo commented 6 years ago

Storage permission is request when selecting another storage path for the download

blazsolar commented 6 years ago

There are some checkstyle violations in PreferencesActivity. Could you fix that.

carlonzo commented 6 years ago

Yep!

On Mon, 4 Jun 2018, 15:35 Blaž Šolar, notifications@github.com wrote:

@blazsolar requested changes on this pull request.

In mobile/src/main/java/butter/droid/ui/preferences/PreferencesActivity.java https://github.com/butterproject/butter-android/pull/281#discussion_r192659157 :

@@ -218,6 +243,18 @@ public void openChangelog() { startActivity(AboutActivity.getIntent(this)); }

  • @Override
  • public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
  • super.onRequestPermissionsResult(requestCode, permissions, grantResults);
  • if (requestCode == OPEN_DIRECTORY_SELECTOR_PERMISSION){
  • if (grantResults[0] == PackageManager.PERMISSION_GRANTED){
  • openDirectorySelector(Prefs.STORAGE_LOCATION, R.string.storage_location, preferencesHandler.getStorageLocation());

you should cal into presenter frome here. Something like

presenter.storeagePermissionGranted()

and then you can call from presenter to open picker.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/butterproject/butter-android/pull/281#pullrequestreview-125473702, or mute the thread https://github.com/notifications/unsubscribe-auth/ACAUlhtVZ6uWxMgiKO4zA4aXDmckTB9gks5t5RuJgaJpZM4UXd9d .

blazsolar commented 6 years ago

Already in develop with some minor changes.