1 /*
2  * Copyright (C) 2017 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.os;
18 
19 import android.annotation.SdkConstant;
20 import android.annotation.SdkConstant.SdkConstantType;
21 import android.annotation.SystemApi;
22 
23 /**
24  * Intents used to provide unbundled updates of system data.
25  * All require the UPDATE_CONFIG permission.
26  *
27  * @see com.android.server.updates
28  * @hide
29  */
30 @SystemApi
31 public final class ConfigUpdate {
32 
33     /**
34      * Update system wide certificate pins for TLS connections.
35      * @hide
36      */
37     @SystemApi
38     public static final String ACTION_UPDATE_PINS = "android.intent.action.UPDATE_PINS";
39 
40     /**
41      * Update system wide Intent firewall.
42      * @hide
43      */
44     @SystemApi
45     public static final String ACTION_UPDATE_INTENT_FIREWALL
46             = "android.intent.action.UPDATE_INTENT_FIREWALL";
47 
48     /**
49      * Update list of permium SMS short codes.
50      * @hide
51      */
52     @SystemApi
53     public static final String ACTION_UPDATE_SMS_SHORT_CODES
54             = "android.intent.action.UPDATE_SMS_SHORT_CODES";
55 
56     /**
57      * Update list of carrier provisioning URLs.
58      * @hide
59      */
60     @SystemApi
61     public static final String ACTION_UPDATE_CARRIER_PROVISIONING_URLS
62             = "android.intent.action.UPDATE_CARRIER_PROVISIONING_URLS";
63 
64     /**
65      * Update set of trusted logs used for Certificate Transparency support for TLS connections.
66      * @hide
67      */
68     @SystemApi
69     public static final String ACTION_UPDATE_CT_LOGS
70             = "android.intent.action.UPDATE_CT_LOGS";
71 
72     /**
73      * Update language detection model file.
74      * @hide
75      */
76     @SystemApi
77     public static final String ACTION_UPDATE_LANG_ID = "android.intent.action.UPDATE_LANG_ID";
78 
79     /**
80      * Update smart selection model file.
81      * @hide
82      */
83     @SystemApi
84     public static final String ACTION_UPDATE_SMART_SELECTION
85             = "android.intent.action.UPDATE_SMART_SELECTION";
86 
87     /**
88      * Update conversation actions model file.
89      * @hide
90      */
91     @SystemApi
92     public static final String ACTION_UPDATE_CONVERSATION_ACTIONS
93             = "android.intent.action.UPDATE_CONVERSATION_ACTIONS";
94 
95     /**
96      * Update network watchlist config file.
97      * @hide
98      */
99     @SystemApi
100     public static final String ACTION_UPDATE_NETWORK_WATCHLIST
101             = "android.intent.action.UPDATE_NETWORK_WATCHLIST";
102 
103     /**
104      * Broadcast intent action indicating that the updated carrier id config is available.
105      * <p>Extra: "VERSION" the numeric version of the new data. Devices should only install if the
106      * update version is newer than the current one.
107      * <p>Extra: "REQUIRED_HASH" the hash of the current update data.
108      * <p>Input: {@link android.content.Intent#getData} is URI of downloaded carrier id file.
109      * Devices should pick up the downloaded file and persist to the database
110      * {@link com.android.providers.telephony.CarrierIdProvider}.
111      *
112      * @hide
113      */
114     @SystemApi
115     public static final String ACTION_UPDATE_CARRIER_ID_DB
116             = "android.os.action.UPDATE_CARRIER_ID_DB";
117 
118     /**
119     * Update the emergency number database into the devices.
120     * <p>Extra: {@link #EXTRA_VERSION} the numeric version of the database.
121     * <p>Extra: {@link #EXTRA_REQUIRED_HASH} hash of the database, which is encoded by base-16
122      * SHA512.
123     * <p>Input: {@link android.content.Intent#getData} the URI to download emergency number
124     * database.
125     *
126     * @hide
127     */
128     @SystemApi
129     @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
130     public static final String ACTION_UPDATE_EMERGENCY_NUMBER_DB =
131             "android.os.action.UPDATE_EMERGENCY_NUMBER_DB";
132 
133     /**
134      * An integer to indicate the numeric version of the new data. Devices should only install
135      * if the update version is newer than the current one.
136      *
137      * @hide
138      */
139     @SystemApi
140     public static final String EXTRA_VERSION = "android.os.extra.VERSION";
141 
142     /**
143      * Hash of the database, which is encoded by base-16 SHA512.
144      *
145      * @hide
146      */
147     @SystemApi
148     public static final String EXTRA_REQUIRED_HASH = "android.os.extra.REQUIRED_HASH";
149 
ConfigUpdate()150     private ConfigUpdate() {
151     }
152 }
153