1 /* 2 * Copyright (C) 2021 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.content; 18 19 /** 20 * Payload for the {@link AttributionSource} class needed to interoperate 21 * with different languages. 22 * 23 * {@hide} 24 */ 25 parcelable AttributionSourceState { 26 /** The PID that is accessing the permission protected data. */ 27 int pid = -1; 28 /** The UID that is accessing the permission protected data. */ 29 int uid = -1; 30 /** The package that is accessing the permission protected data. */ 31 @nullable @utf8InCpp String packageName; 32 /** The attribution tag of the app accessing the permission protected data. */ 33 @nullable @utf8InCpp String attributionTag; 34 /** Unique token for that source. */ 35 @nullable IBinder token; 36 /** Permissions that should be considered revoked regardless if granted. */ 37 @nullable @utf8InCpp String[] renouncedPermissions; 38 /** The next app to receive the permission protected data. */ 39 // TODO: We use an array as a workaround - the C++ backend doesn't 40 // support referring to the parcelable as it expects ctor/dtor 41 AttributionSourceState[] next; 42 } 43