• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.android.onboarding.contracts.provisioning
2 
3 import android.app.admin.DevicePolicyManager
4 import android.nfc.NfcAdapter
5 import android.os.Build
6 import androidx.annotation.RequiresApi
7 
8 object ACTIONS {
9   inline val ACTION_MANAGED_PROFILE_PROVISIONED: String
10     get() = DevicePolicyManager.ACTION_MANAGED_PROFILE_PROVISIONED
11 
12   inline val ACTION_PROVISIONING_SUCCESSFUL: String
13     get() = DevicePolicyManager.ACTION_PROVISIONING_SUCCESSFUL
14 
15   inline val ACTION_ADD_DEVICE_ADMIN: String
16     get() = DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN
17 
18   @get:Suppress("UNRESOLVED_REFERENCE")
19   inline val ACTION_SET_PROFILE_OWNER: String
20     get() = DevicePolicyManager.ACTION_SET_PROFILE_OWNER
21 
22   inline val ACTION_DEVICE_OWNER_CHANGED: String
23     get() = DevicePolicyManager.ACTION_DEVICE_OWNER_CHANGED
24 
25   @get:RequiresApi(Build.VERSION_CODES.Q)
26   inline val ACTION_GET_PROVISIONING_MODE: String
27     get() = DevicePolicyManager.ACTION_GET_PROVISIONING_MODE
28 
29   @get:RequiresApi(Build.VERSION_CODES.Q)
30   inline val ACTION_ADMIN_POLICY_COMPLIANCE: String
31     get() = DevicePolicyManager.ACTION_ADMIN_POLICY_COMPLIANCE
32 
33   @get:Suppress("UNRESOLVED_REFERENCE")
34   inline val ACTION_UPDATE_DEVICE_POLICY_MANAGEMENT_ROLE_HOLDER: String
35     get() = DevicePolicyManager.ACTION_UPDATE_DEVICE_POLICY_MANAGEMENT_ROLE_HOLDER
36 
37   @get:Suppress("UNRESOLVED_REFERENCE")
38   inline val ACTION_ESTABLISH_NETWORK_CONNECTION: String
39     get() = DevicePolicyManager.ACTION_ESTABLISH_NETWORK_CONNECTION
40 
41   @get:RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
42   inline val ACTION_DEVICE_FINANCING_STATE_CHANGED: String
43     get() = DevicePolicyManager.ACTION_DEVICE_FINANCING_STATE_CHANGED
44 
45   /**
46    * Cannot link against it directly because it's marked as `@hidden` without `@SystemApi`
47    *
48    * @see DevicePolicyManager.ACTION_PROVISIONING_COMPLETED
49    */
50   inline val ACTION_PROVISIONING_COMPLETED: String
51     get() = "android.app.action.PROVISIONING_COMPLETED"
52 
53   @get:Suppress("UNRESOLVED_REFERENCE")
54   inline val ACTION_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE: String
55     get() = DevicePolicyManager.ACTION_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE
56 
57   @get:Suppress("UNRESOLVED_REFERENCE")
58   inline val ACTION_ROLE_HOLDER_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE: String
59     get() = DevicePolicyManager.ACTION_ROLE_HOLDER_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE
60 
61   @get:Suppress("UNRESOLVED_REFERENCE")
62   inline val ACTION_PROVISION_FINANCED_DEVICE: String
63     get() = DevicePolicyManager.ACTION_PROVISION_FINANCED_DEVICE
64 
65   @get:Suppress("UNRESOLVED_REFERENCE")
66   inline val ACTION_PROVISION_FINALIZATION: String
67     get() = DevicePolicyManager.ACTION_PROVISION_FINALIZATION
68 
69   @Deprecated("Deprecated in DevicePolicyManager")
70   inline val ACTION_PROVISION_MANAGED_DEVICE: String
71     get() = DevicePolicyManager.ACTION_PROVISION_MANAGED_DEVICE
72 
73   /**
74    * Cannot link against it directly because it's marked as `@hidden` without `@SystemApi`
75    *
76    * @see DevicePolicyManager.ACTION_PROVISION_MANAGED_USER
77    */
78   inline val ACTION_PROVISION_MANAGED_USER: String
79     get() = "android.app.action.PROVISION_MANAGED_USER"
80 
81   inline val ACTION_PROVISION_MANAGED_PROFILE: String
82     get() = DevicePolicyManager.ACTION_PROVISION_MANAGED_PROFILE
83 
84   @get:Suppress("UNRESOLVED_REFERENCE")
85   inline val ACTION_ROLE_HOLDER_PROVISION_MANAGED_PROFILE: String
86     get() = DevicePolicyManager.ACTION_ROLE_HOLDER_PROVISION_MANAGED_PROFILE
87 
88   @get:Suppress("UNRESOLVED_REFERENCE")
89   inline val ACTION_ROLE_HOLDER_PROVISION_FINALIZATION: String
90     get() = DevicePolicyManager.ACTION_ROLE_HOLDER_PROVISION_FINALIZATION
91 
92   /** @see com.android.managedprovisioning.common.Globals.ACTION_RESUME_PROVISIONING */
93   inline val ACTION_RESUME_PROVISIONING: String
94     get() = "com.android.managedprovisioning.action.RESUME_PROVISIONING"
95 
96   /**
97    * @see com.android.managedprovisioning.common.Globals.ACTION_PROVISION_MANAGED_DEVICE_SILENTLY
98    */
99   inline val ACTION_PROVISION_MANAGED_DEVICE_SILENTLY: String
100     get() = "com.android.managedprovisioning.action.PROVISION_MANAGED_DEVICE_SILENTLY"
101 
102   inline val ACTION_NDEF_DISCOVERED: String
103     get() = NfcAdapter.ACTION_NDEF_DISCOVERED
104 }
105