1 /* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.companion.datatransfer; 18 19 import android.annotation.NonNull; 20 import android.os.Parcel; 21 import android.os.Parcelable; 22 23 /** 24 * The permission sync request class. 25 * 26 * @hide 27 */ 28 public class PermissionSyncRequest extends SystemDataTransferRequest implements Parcelable { 29 30 /** @hide */ PermissionSyncRequest(int associationId)31 public PermissionSyncRequest(int associationId) { 32 super(associationId, DATA_TYPE_PERMISSION_SYNC); 33 } 34 35 /** @hide */ 36 @Override toString()37 public String toString() { 38 return "SystemDataTransferRequest(" 39 + "associationId=" + mAssociationId 40 + ", userId=" + mUserId 41 + ", isUserConsented=" + mUserConsented 42 + ")"; 43 } 44 45 /** @hide */ PermissionSyncRequest(Parcel in)46 PermissionSyncRequest(Parcel in) { 47 super(in); 48 } 49 50 /** @hide */ 51 @NonNull 52 public static final Creator<PermissionSyncRequest> CREATOR = 53 new Creator<PermissionSyncRequest>() { 54 @Override 55 public PermissionSyncRequest createFromParcel(Parcel in) { 56 return new PermissionSyncRequest(in); 57 } 58 59 @Override 60 public PermissionSyncRequest[] newArray(int size) { 61 return new PermissionSyncRequest[size]; 62 } 63 }; 64 } 65