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 com.android.bedstead.testapp; 18 19 import android.app.admin.DelegatedAdminReceiver; 20 import android.content.Context; 21 import android.content.Intent; 22 import android.net.Uri; 23 24 import com.android.eventlib.premade.EventLibDelegatedAdminReceiver; 25 26 /** 27 * Implementation of {@link DelegatedAdminReceiver} which logs events in response to callbacks and 28 * supports TestApp Features. 29 */ 30 public class BaseTestAppDelegatedAdminReceiver extends EventLibDelegatedAdminReceiver { 31 @Override onChoosePrivateKeyAlias(Context context, Intent intent, int uid, Uri uri, String alias)32 public String onChoosePrivateKeyAlias(Context context, Intent intent, int uid, Uri uri, 33 String alias) { 34 return super.onChoosePrivateKeyAlias(context, intent, uid, uri, alias); 35 } 36 37 @Override onNetworkLogsAvailable(Context context, Intent intent, long batchToken, int networkLogsCount)38 public void onNetworkLogsAvailable(Context context, Intent intent, long batchToken, 39 int networkLogsCount) { 40 super.onNetworkLogsAvailable(context, intent, batchToken, networkLogsCount); 41 } 42 43 @Override onSecurityLogsAvailable(Context context, Intent intent)44 public void onSecurityLogsAvailable(Context context, Intent intent) { 45 super.onSecurityLogsAvailable(context, intent); 46 } 47 } 48