1 /* 2 * Copyright 2025 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 package androidx.privacysandbox.ondevicepersonalization.client 17 18 import android.content.ComponentName 19 import android.os.PersistableBundle 20 21 /** 22 * The request of [OnDevicePersonalizationManager.executeInIsolatedService]. 23 * 24 * @param service The component name of the service. 25 * @param appParams Passed from the calling app to the Isolated Service. The expected contents of 26 * this parameter are defined by the service. The platform does not interpret this parameter. 27 */ 28 class ExecuteInIsolatedServiceRequest( 29 val service: ComponentName, 30 val appParams: PersistableBundle = PersistableBundle.EMPTY, 31 ) { equalsnull32 override fun equals(other: Any?): Boolean { 33 if (this === other) return true 34 if (other == null || javaClass != other.javaClass) return false 35 36 val that = other as ExecuteInIsolatedServiceRequest 37 return this.service == that.service && this.appParams == that.appParams 38 } 39 hashCodenull40 override fun hashCode(): Int { 41 var hash = 1 42 hash = 31 * hash + service.hashCode() 43 hash = 31 * hash + appParams.hashCode() 44 return hash 45 } 46 } 47