mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 12:22:08 +01:00
Get title for image sharing dialog from resources instead of using hardcoded string. Also do not show multiple permission dialogs stacked
This commit is contained in:
parent
036457117c
commit
7ee5e0f39b
1 changed files with 4 additions and 3 deletions
|
@ -141,9 +141,10 @@ public class ContextMenuWebView extends NestedWebView {
|
||||||
})
|
})
|
||||||
.setNegativeButton(context.getText(android.R.string.no), null)
|
.setNegativeButton(context.getText(android.R.string.no), null)
|
||||||
.show();
|
.show();
|
||||||
|
} else {
|
||||||
|
parentActivity.requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
|
||||||
|
MainActivity.REQUEST_CODE__ACCESS_EXTERNAL_STORAGE);
|
||||||
}
|
}
|
||||||
parentActivity.requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
|
|
||||||
MainActivity.REQUEST_CODE__ACCESS_EXTERNAL_STORAGE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (writeToStoragePermitted) {
|
if (writeToStoragePermitted) {
|
||||||
|
@ -157,7 +158,7 @@ public class ContextMenuWebView extends NestedWebView {
|
||||||
sharingIntent.putExtra(Intent.EXTRA_STREAM, myUri);
|
sharingIntent.putExtra(Intent.EXTRA_STREAM, myUri);
|
||||||
sharingIntent.setType("image/png");
|
sharingIntent.setType("image/png");
|
||||||
sharingIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
sharingIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||||
context.startActivity(Intent.createChooser(sharingIntent, "Share image using"));
|
context.startActivity(Intent.createChooser(sharingIntent, getResources().getString(R.string.action_share_dotdotdot)));
|
||||||
}
|
}
|
||||||
}.execute(url);
|
}.execute(url);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue