public final class DragAndDropPermissions
extends Object implements Parcelable
| java.lang.Object | |
| android.view.DragAndDropPermissions | |
DragAndDropPermissions控制与 DragEvent关联的内容URI的访问权限。
当此对象由Activity.requestDragAndDropPermissions创建时,将授予权限。 授予的权限由启动拖动操作的应用程序传递给View.startDragAndDrop的一组标志定义。
权限的生命周期与用于调用requestDragAndDropPermissions的活动绑定。 当这个活动被销毁时,或者当release()时,这些权限被撤销,以先发生者为准。
如果您预计您的应用程序将收到大量丢弃(例如文档编辑器),则应release()在获取的权限不再需要时立即致电release() 。 可以将权限添加到您的活动的onSaveInstanceState(Bundle)软件包中,并在稍后检索,以便在不再需要它们时手动释放权限。
Inherited constants |
|---|
android.os.Parcelable
|
Fields |
|
|---|---|
public static final Creator<DragAndDropPermissions> |
CREATOR |
公共方法(Public methods) |
|
|---|---|
int |
describeContents() 描述此Parcelable实例的封送表示中包含的特殊对象的种类。 |
void |
release() 显式撤消权限。 |
void |
writeToParcel(Parcel destination, int flags) 将此对象平铺到一个包裹中。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
android.os.Parcelable
|
|
int describeContents ()
描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象将在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。
| 返回(Returns) | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
void writeToParcel (Parcel destination, int flags)
将此对象平铺到一个包裹中。
| 参数(Parameters) | |
|---|---|
destination |
Parcel: The Parcel in which the object should be written. |
flags |
int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. |