DataRemovalRequest


public final class DataRemovalRequest
extends Object implements Parcelable

java.lang.Object
   ↳ android.view.contentcapture.DataRemovalRequest


Class used by apps to request the content capture service to remove data associated with LocusIds.

An app which has tagged data with a LocusId can therefore delete them later. This is intended to let apps propagate deletions of user data into the operating system.

Summary

Nested classes

class DataRemovalRequest.Builder

Builder for DataRemovalRequest objects. 

class DataRemovalRequest.LocusIdRequest

Representation of a request to remove data associated with a LocusId

Constants

int FLAG_IS_PREFIX

When set, service should use the LocusId#getId() as prefix for the data to be removed.

Inherited constants

Fields

public static final Creator<DataRemovalRequest> CREATOR

Public methods

int describeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

List<DataRemovalRequest.LocusIdRequest> getLocusIdRequests()

Gets the list of LousIds the apps is requesting to remove.

String getPackageName()

Gets the name of the app that's making the request.

boolean isForEverything()

Checks if app is requesting to remove content capture data associated with its package.

void writeToParcel(Parcel parcel, int flags)

Flatten this object in to a Parcel.

Inherited methods

Constants

FLAG_IS_PREFIX

Added in API level 29
public static final int FLAG_IS_PREFIX

When set, service should use the LocusId#getId() as prefix for the data to be removed.

Constant Value: 1 (0x00000001)

Fields

CREATOR

Added in API level 29
public static final Creator<DataRemovalRequest> CREATOR

Public methods

describeContents

Added in API level 29
public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or CONTENTS_FILE_DESCRIPTOR

getLocusIdRequests

Added in API level 29
public List<DataRemovalRequest.LocusIdRequest> getLocusIdRequests ()

Gets the list of LousIds the apps is requesting to remove.

Returns
List<DataRemovalRequest.LocusIdRequest> This value cannot be null.

getPackageName

Added in API level 29
public String getPackageName ()

Gets the name of the app that's making the request.

Returns
String This value cannot be null.

isForEverything

Added in API level 29
public boolean isForEverything ()

Checks if app is requesting to remove content capture data associated with its package.

Returns
boolean

writeToParcel

Added in API level 29
public void writeToParcel (Parcel parcel, 
                int flags)

Flatten this object in to a Parcel.

Parameters
parcel Parcel: The Parcel in which the object should be written. This value cannot be null.

flags int: Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES