Loading core/api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -58179,12 +58179,16 @@ package android.webkit { method public abstract String[] getAcceptTypes(); method @Nullable public abstract String getFilenameHint(); method public abstract int getMode(); method @FlaggedApi("android.webkit.file_system_access") public int getPermissionMode(); method @Nullable public abstract CharSequence getTitle(); method public abstract boolean isCaptureEnabled(); method @Nullable public static android.net.Uri[] parseResult(int, android.content.Intent); field public static final int MODE_OPEN = 0; // 0x0 field @FlaggedApi("android.webkit.file_system_access") public static final int MODE_OPEN_FOLDER = 2; // 0x2 field public static final int MODE_OPEN_MULTIPLE = 1; // 0x1 field public static final int MODE_SAVE = 3; // 0x3 field @FlaggedApi("android.webkit.file_system_access") public static final int PERMISSION_MODE_READ = 0; // 0x0 field @FlaggedApi("android.webkit.file_system_access") public static final int PERMISSION_MODE_READ_WRITE = 1; // 0x1 } public abstract class WebHistoryItem implements java.lang.Cloneable { core/java/android/webkit/WebChromeClient.java +37 −4 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.webkit; import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.Nullable; import android.annotation.SystemApi; import android.content.Intent; Loading @@ -25,6 +27,9 @@ import android.net.Uri; import android.os.Message; import android.view.View; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; public class WebChromeClient { /** Loading Loading @@ -551,14 +556,27 @@ public class WebChromeClient { public static final int MODE_OPEN = 0; /** Like Open but allows multiple files to be selected. */ public static final int MODE_OPEN_MULTIPLE = 1; /** Like Open but allows a folder to be selected. The implementation should enumerate all files selected by this operation. This feature is not supported at the moment. @hide */ /** Like Open but allows a folder to be selected. */ @FlaggedApi(android.webkit.Flags.FLAG_FILE_SYSTEM_ACCESS) public static final int MODE_OPEN_FOLDER = 2; /** Allows picking a nonexistent file and saving it. */ public static final int MODE_SAVE = 3; /** @hide */ @IntDef(prefix = { "PERMISSION_MODE_" }, value = { PERMISSION_MODE_READ, PERMISSION_MODE_READ_WRITE, }) @Retention(RetentionPolicy.SOURCE) public @interface PermissionMode {} /** File or directory should be opened for reading only. */ @FlaggedApi(android.webkit.Flags.FLAG_FILE_SYSTEM_ACCESS) public static final int PERMISSION_MODE_READ = 0; /** File or directory should be opened for read and write. */ @FlaggedApi(android.webkit.Flags.FLAG_FILE_SYSTEM_ACCESS) public static final int PERMISSION_MODE_READ_WRITE = 1; /** * Parse the result returned by the file picker activity. This method should be used with * {@link #createIntent}. Refer to {@link #createIntent} for how to use it. Loading Loading @@ -615,6 +633,21 @@ public class WebChromeClient { @Nullable public abstract String getFilenameHint(); /** * Returns permission mode {@link #PERMISSION_MODE_READ} or * {@link #PERMISSION_MODE_READ_WRITE} which indicates the intended mode for opening a file * or directory. * * This can be used to determine whether an Intent such as * {@link android.content.Intent#ACTION_OPEN_DOCUMENT} should be used rather than * {@link android.content.Intent#ACTION_GET_CONTENT} to choose files. */ @FlaggedApi(Flags.FLAG_FILE_SYSTEM_ACCESS) @PermissionMode public int getPermissionMode() { return PERMISSION_MODE_READ; } /** * Creates an intent that would start a file picker for file selection. * The Intent supports choosing files from simple file sources available Loading core/java/android/webkit/flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -26,3 +26,11 @@ flag { description: "New feature reduce user-agent for webview" bug: "371034303" } flag { name: "file_system_access" is_exported: true namespace: "webview" description: "New APIs required by File System Access" bug: "40101963" } Loading
core/api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -58179,12 +58179,16 @@ package android.webkit { method public abstract String[] getAcceptTypes(); method @Nullable public abstract String getFilenameHint(); method public abstract int getMode(); method @FlaggedApi("android.webkit.file_system_access") public int getPermissionMode(); method @Nullable public abstract CharSequence getTitle(); method public abstract boolean isCaptureEnabled(); method @Nullable public static android.net.Uri[] parseResult(int, android.content.Intent); field public static final int MODE_OPEN = 0; // 0x0 field @FlaggedApi("android.webkit.file_system_access") public static final int MODE_OPEN_FOLDER = 2; // 0x2 field public static final int MODE_OPEN_MULTIPLE = 1; // 0x1 field public static final int MODE_SAVE = 3; // 0x3 field @FlaggedApi("android.webkit.file_system_access") public static final int PERMISSION_MODE_READ = 0; // 0x0 field @FlaggedApi("android.webkit.file_system_access") public static final int PERMISSION_MODE_READ_WRITE = 1; // 0x1 } public abstract class WebHistoryItem implements java.lang.Cloneable {
core/java/android/webkit/WebChromeClient.java +37 −4 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.webkit; import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.Nullable; import android.annotation.SystemApi; import android.content.Intent; Loading @@ -25,6 +27,9 @@ import android.net.Uri; import android.os.Message; import android.view.View; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; public class WebChromeClient { /** Loading Loading @@ -551,14 +556,27 @@ public class WebChromeClient { public static final int MODE_OPEN = 0; /** Like Open but allows multiple files to be selected. */ public static final int MODE_OPEN_MULTIPLE = 1; /** Like Open but allows a folder to be selected. The implementation should enumerate all files selected by this operation. This feature is not supported at the moment. @hide */ /** Like Open but allows a folder to be selected. */ @FlaggedApi(android.webkit.Flags.FLAG_FILE_SYSTEM_ACCESS) public static final int MODE_OPEN_FOLDER = 2; /** Allows picking a nonexistent file and saving it. */ public static final int MODE_SAVE = 3; /** @hide */ @IntDef(prefix = { "PERMISSION_MODE_" }, value = { PERMISSION_MODE_READ, PERMISSION_MODE_READ_WRITE, }) @Retention(RetentionPolicy.SOURCE) public @interface PermissionMode {} /** File or directory should be opened for reading only. */ @FlaggedApi(android.webkit.Flags.FLAG_FILE_SYSTEM_ACCESS) public static final int PERMISSION_MODE_READ = 0; /** File or directory should be opened for read and write. */ @FlaggedApi(android.webkit.Flags.FLAG_FILE_SYSTEM_ACCESS) public static final int PERMISSION_MODE_READ_WRITE = 1; /** * Parse the result returned by the file picker activity. This method should be used with * {@link #createIntent}. Refer to {@link #createIntent} for how to use it. Loading Loading @@ -615,6 +633,21 @@ public class WebChromeClient { @Nullable public abstract String getFilenameHint(); /** * Returns permission mode {@link #PERMISSION_MODE_READ} or * {@link #PERMISSION_MODE_READ_WRITE} which indicates the intended mode for opening a file * or directory. * * This can be used to determine whether an Intent such as * {@link android.content.Intent#ACTION_OPEN_DOCUMENT} should be used rather than * {@link android.content.Intent#ACTION_GET_CONTENT} to choose files. */ @FlaggedApi(Flags.FLAG_FILE_SYSTEM_ACCESS) @PermissionMode public int getPermissionMode() { return PERMISSION_MODE_READ; } /** * Creates an intent that would start a file picker for file selection. * The Intent supports choosing files from simple file sources available Loading
core/java/android/webkit/flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -26,3 +26,11 @@ flag { description: "New feature reduce user-agent for webview" bug: "371034303" } flag { name: "file_system_access" is_exported: true namespace: "webview" description: "New APIs required by File System Access" bug: "40101963" }