1 /* 2 * Copyright (C) 2020 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.net; 18 19 import static android.annotation.SystemApi.Client.MODULE_LIBRARIES; 20 21 import android.annotation.SystemApi; 22 import android.os.ResultReceiver; 23 24 /** 25 * Collections of constants for internal tethering usage. 26 * 27 * <p>These hidden constants are not in TetheringManager as they are not part of the API stubs 28 * generated for TetheringManager, which prevents the tethering module from linking them at 29 * build time. 30 * TODO: investigate changing the tethering build rules so that Tethering can reference hidden 31 * symbols from framework-tethering even when they are in a non-hidden class. 32 * @hide 33 */ 34 @SystemApi(client = MODULE_LIBRARIES) 35 public final class TetheringConstants { 36 /** An explicit private class to avoid exposing constructor.*/ TetheringConstants()37 private TetheringConstants() { } 38 39 /** 40 * Extra used for communicating with the TetherService and TetherProvisioningActivity. 41 * Includes the type of tethering to enable if any. 42 */ 43 public static final String EXTRA_ADD_TETHER_TYPE = "extraAddTetherType"; 44 /** 45 * Extra used for communicating with the TetherService. Includes the type of tethering for 46 * which to cancel provisioning. 47 */ 48 public static final String EXTRA_REM_TETHER_TYPE = "extraRemTetherType"; 49 /** 50 * Extra used for communicating with the TetherService. True to schedule a recheck of tether 51 * provisioning. 52 */ 53 public static final String EXTRA_SET_ALARM = "extraSetAlarm"; 54 /** 55 * Tells the TetherService to run a provision check now. 56 */ 57 public static final String EXTRA_RUN_PROVISION = "extraRunProvision"; 58 /** 59 * Extra used for communicating with the TetherService and TetherProvisioningActivity. 60 * Contains the {@link ResultReceiver} which will receive provisioning results. 61 * Can not be empty. 62 */ 63 public static final String EXTRA_PROVISION_CALLBACK = "extraProvisionCallback"; 64 65 /** 66 * Extra used for communicating with the TetherService and TetherProvisioningActivity. 67 * Contains the subId of current active cellular upstream. 68 * @hide 69 */ 70 public static final String EXTRA_TETHER_SUBID = "android.net.extra.TETHER_SUBID"; 71 72 /** 73 * Extra used for telling TetherProvisioningActivity the entitlement package name and class 74 * name to start UI entitlement check. 75 * @hide 76 */ 77 public static final String EXTRA_TETHER_UI_PROVISIONING_APP_NAME = 78 "android.net.extra.TETHER_UI_PROVISIONING_APP_NAME"; 79 80 /** 81 * Extra used for telling TetherService the intent action to start silent entitlement check. 82 * @hide 83 */ 84 public static final String EXTRA_TETHER_SILENT_PROVISIONING_ACTION = 85 "android.net.extra.TETHER_SILENT_PROVISIONING_ACTION"; 86 87 /** 88 * Extra used for TetherService to receive the response of provisioning check. 89 * @hide 90 */ 91 public static final String EXTRA_TETHER_PROVISIONING_RESPONSE = 92 "android.net.extra.TETHER_PROVISIONING_RESPONSE"; 93 } 94