Skip to content

Commit 34e4078

Browse files
jscott1989pfmaggi
authored andcommitted
No public description
PiperOrigin-RevId: 607332747
1 parent ac368b2 commit 34e4078

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/main/java/com/afwsamples/testdpc/policy/UserRestriction.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
import static android.os.UserManager.DISALLOW_WIFI_DIRECT;
6262
import static android.os.UserManager.DISALLOW_WIFI_TETHERING;
6363
import static android.os.UserManager.ENSURE_VERIFY_APPS;
64+
import static android.os.UserManager.DISALLOW_CONFIG_DEFAULT_APPS;
6465

6566
// TODO(b/258509336): uncomment and remove the placeholder static string once
6667
// an SDK drops in google3 that contains the new user restriction.
@@ -152,6 +153,7 @@ public UserRestriction(String key, int titleResId) {
152153
new UserRestriction(DISALLOW_WIFI_DIRECT, R.string.disallow_wifi_direct),
153154
new UserRestriction(DISALLOW_ADD_WIFI_CONFIG, R.string.disallow_add_wifi_config),
154155
new UserRestriction(DISALLOW_CELLULAR_2G, R.string.disallow_cellular_2g),
156+
new UserRestriction(DISALLOW_CONFIG_DEFAULT_APPS, R.string.disallow_config_default_apps),
155157
};
156158

157159
/**
@@ -186,6 +188,7 @@ public UserRestriction(String key, int titleResId) {
186188
new UserRestriction(DISALLOW_WIFI_DIRECT, R.string.disallow_wifi_direct),
187189
new UserRestriction(DISALLOW_ADD_WIFI_CONFIG, R.string.disallow_add_wifi_config),
188190
new UserRestriction(DISALLOW_CELLULAR_2G, R.string.disallow_cellular_2g),
191+
new UserRestriction(DISALLOW_CONFIG_DEFAULT_APPS, R.string.disallow_config_default_apps),
189192
};
190193

191194
/** Setting these user restrictions only have effect on primary users. */
@@ -292,6 +295,6 @@ public UserRestriction(String key, int titleResId) {
292295
};
293296

294297
public static String[] UDC_PLUS_RESTRICTIONS = {
295-
DISALLOW_CELLULAR_2G,
298+
DISALLOW_CELLULAR_2G, DISALLOW_CONFIG_DEFAULT_APPS,
296299
};
297300
}

src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@
528528
<string name="disallow_content_capture">Disallow content capture</string>
529529
<string name="disallow_content_suggestions">Disallow content suggestions</string>
530530
<string name="disallow_cellular_2g">Disallow Cellular 2G</string>
531+
<string name="disallow_config_default_apps">Disallow config default apps</string>
531532
<string name="user_restriction_error_msg">Operation not allowed</string>
532533

533534
<!-- Strings for select app -->

0 commit comments

Comments
 (0)