• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.networkstack.apishim.api33;
18 
19 import androidx.annotation.VisibleForTesting;
20 
21 /**
22  * Utility class for defining and importing constants from the Android platform.
23  */
24 public class ConstantsShim extends com.android.networkstack.apishim.api31.ConstantsShim {
25     /**
26      * Constant that callers can use to determine what version of the shim they are using.
27      * Must be the same as the version of the shims.
28      * This should only be used by test code. Production code that uses the shims should be using
29      * the shimmed objects and methods themselves.
30      */
31     @VisibleForTesting
32     public static final int VERSION = 33;
33 
34     // Constant defined in android.app.BroadcastOptions.
35     public static final int DELIVERY_GROUP_POLICY_ALL = 0;
36     // Constant defined in android.app.BroadcastOptions.
37     public static final int DELIVERY_GROUP_POLICY_MOST_RECENT = 1;
38 
39     // Constant defined in android.app.BroadcastOptions.
40     public static final int DEFERRAL_POLICY_DEFAULT = 0;
41     // Constant defined in android.app.BroadcastOptions.
42     public static final int DEFERRAL_POLICY_NONE = 1;
43     // Constant defined in android.app.BroadcastOptions.
44     public static final int DEFERRAL_POLICY_UNTIL_ACTIVE = 2;
45     // Const defined in  android.Manifest.permission
46     public static final String REGISTER_NSD_OFFLOAD_ENGINE =
47             "android.permission.REGISTER_NSD_OFFLOAD_ENGINE";
48 }
49