зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1538270 - Show toast for default file picker when permissions denied.;r=VladBaicu
Differential Revision: https://phabricator.services.mozilla.com/D32073 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
68fc536019
Коммит
aa3dd59877
|
@ -22,6 +22,7 @@ import android.os.Parcelable;
|
|||
import android.support.annotation.NonNull;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
@ -90,6 +91,7 @@ public class FilePicker implements BundleEventListener {
|
|||
// TODO: Figure out which permissions have been denied and use that
|
||||
// knowledge for availPermissions. For now we assume we don't have any
|
||||
// permissions at all (bug 1411014).
|
||||
Toast.makeText(context, context.getString(R.string.filepicker_permission_denied), Toast.LENGTH_LONG).show();
|
||||
showFilePickerAsync(title, "*/*", new String[0], isModeOpenMultiple, new ResultHandler() {
|
||||
@Override
|
||||
public void gotFile(final String filename) {
|
||||
|
|
|
@ -671,6 +671,7 @@ shown from Android O while a tab is being queued.-->
|
|||
<!ENTITY filepicker_audio_title "Choose or record a sound">
|
||||
<!ENTITY filepicker_image_title "Choose or take a picture">
|
||||
<!ENTITY filepicker_video_title "Choose or record a video">
|
||||
<!ENTITY filepicker_permission_denied "Required permissions not granted, reverting to the system file picker. ">
|
||||
|
||||
<!-- Site identity popup -->
|
||||
<!ENTITY identity_connected_to "You are connected to">
|
||||
|
|
|
@ -481,6 +481,8 @@
|
|||
<string name="filepicker_audio_title">&filepicker_audio_title;</string>
|
||||
<string name="filepicker_image_title">&filepicker_image_title;</string>
|
||||
<string name="filepicker_video_title">&filepicker_video_title;</string>
|
||||
<!-- Toast for default file picker when authority is denied. -->
|
||||
<string name="filepicker_permission_denied">&filepicker_permission_denied;</string>
|
||||
|
||||
<!-- Default bookmarks. We used to use bookmark titles shared with XUL from mobile's
|
||||
profile/bookmarks.inc (see bug 964946). Don't expose the URLs to L10N. -->
|
||||
|
|
Загрузка…
Ссылка в новой задаче