Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -44923,6 +44923,7 @@ package android.view.inputmethod { method public android.content.ClipDescription getDescription(); method public android.net.Uri getLinkUri(); method public void releasePermission(); method public void requestPermission(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.view.inputmethod.InputContentInfo> CREATOR; } api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -48091,6 +48091,7 @@ package android.view.inputmethod { method public android.content.ClipDescription getDescription(); method public android.net.Uri getLinkUri(); method public void releasePermission(); method public void requestPermission(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.view.inputmethod.InputContentInfo> CREATOR; } api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -45003,6 +45003,7 @@ package android.view.inputmethod { method public android.content.ClipDescription getDescription(); method public android.net.Uri getLinkUri(); method public void releasePermission(); method public void requestPermission(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.view.inputmethod.InputContentInfo> CREATOR; } core/java/android/view/inputmethod/InputConnection.java +4 −5 Original line number Diff line number Diff line Loading @@ -840,16 +840,15 @@ public interface InputConnection { public void closeConnection(); /** * When this flag is used in {@link #commitContent(InputContentInfo, int, Bundle)}, the editor * will be able to request read access to the content URI contained in the * {@link InputContentInfo} object. * When this flag is used, the editor will be able to request read access to the content URI * contained in the {@link InputContentInfo} object. * * <p>Make sure that the content provider owning the Uri sets the * {@link android.R.styleable#AndroidManifestProvider_grantUriPermissions * grantUriPermissions} attribute in its manifest or included the * {@link android.R.styleable#AndroidManifestGrantUriPermission * <grant-uri-permissions>} tag. Otherwise * {@link #commitContent(InputContentInfo, int, Bundle)} can fail.</p> * <grant-uri-permissions>} tag. Otherwise {@link InputContentInfo#requestPermission()} * can fail.</p> * * <p>Although calling this API is allowed only for the IME that is currently selected, the * client is able to request a temporary read-only access even after the current IME is switched Loading core/java/android/view/inputmethod/InputContentInfo.java +16 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,22 @@ public final class InputContentInfo implements Parcelable { mUriToken = token; } /** * Requests a temporary read-only access permission for content URI associated with this object. * * <p>Does nothing if the temporary permission is already granted.</p> */ public void requestPermission() { if (mUriToken == null) { return; } try { mUriToken.take(); } catch (RemoteException e) { e.rethrowFromSystemServer(); } } /** * Releases a temporary read-only access permission for content URI associated with this object. * Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -44923,6 +44923,7 @@ package android.view.inputmethod { method public android.content.ClipDescription getDescription(); method public android.net.Uri getLinkUri(); method public void releasePermission(); method public void requestPermission(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.view.inputmethod.InputContentInfo> CREATOR; }
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -48091,6 +48091,7 @@ package android.view.inputmethod { method public android.content.ClipDescription getDescription(); method public android.net.Uri getLinkUri(); method public void releasePermission(); method public void requestPermission(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.view.inputmethod.InputContentInfo> CREATOR; }
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -45003,6 +45003,7 @@ package android.view.inputmethod { method public android.content.ClipDescription getDescription(); method public android.net.Uri getLinkUri(); method public void releasePermission(); method public void requestPermission(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.view.inputmethod.InputContentInfo> CREATOR; }
core/java/android/view/inputmethod/InputConnection.java +4 −5 Original line number Diff line number Diff line Loading @@ -840,16 +840,15 @@ public interface InputConnection { public void closeConnection(); /** * When this flag is used in {@link #commitContent(InputContentInfo, int, Bundle)}, the editor * will be able to request read access to the content URI contained in the * {@link InputContentInfo} object. * When this flag is used, the editor will be able to request read access to the content URI * contained in the {@link InputContentInfo} object. * * <p>Make sure that the content provider owning the Uri sets the * {@link android.R.styleable#AndroidManifestProvider_grantUriPermissions * grantUriPermissions} attribute in its manifest or included the * {@link android.R.styleable#AndroidManifestGrantUriPermission * <grant-uri-permissions>} tag. Otherwise * {@link #commitContent(InputContentInfo, int, Bundle)} can fail.</p> * <grant-uri-permissions>} tag. Otherwise {@link InputContentInfo#requestPermission()} * can fail.</p> * * <p>Although calling this API is allowed only for the IME that is currently selected, the * client is able to request a temporary read-only access even after the current IME is switched Loading
core/java/android/view/inputmethod/InputContentInfo.java +16 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,22 @@ public final class InputContentInfo implements Parcelable { mUriToken = token; } /** * Requests a temporary read-only access permission for content URI associated with this object. * * <p>Does nothing if the temporary permission is already granted.</p> */ public void requestPermission() { if (mUriToken == null) { return; } try { mUriToken.take(); } catch (RemoteException e) { e.rethrowFromSystemServer(); } } /** * Releases a temporary read-only access permission for content URI associated with this object. * Loading