Commit 092d0fa8 authored by Aaron Kling's avatar Aaron Kling Committed by Dan Pasanen

Disable SetupWraith, the ATV SUW.

SetupWraith currently crashes after the finshed screen, causing
devices to remain unprovisioned.

Change-Id: I9f494158ea11210014eaec9faa48fddcedd968d4
parent 33b44912
......@@ -75,6 +75,7 @@ public class SetupWizardUtils {
private static final String GMS_PACKAGE = "com.google.android.gms";
private static final String GMS_SUW_PACKAGE = "com.google.android.setupwizard";
private static final String GMS_TV_SUW_PACKAGE = "com.google.android.tungsten.setupwraith";
private SetupWizardUtils(){}
......@@ -251,6 +252,13 @@ public class SetupWizardUtils {
if (!SetupWizardUtils.hasWifi(context)) {
disableComponent(context, WifiSetupActivity.class);
}
// Googles ATV SUW crashes before finishing, leaving devices
// unprovisioned. Disable it for now.
if (hasLeanback(context) &&
PackageManagerUtils.isAppInstalled(context, GMS_TV_SUW_PACKAGE)) {
disableApplication(context, GMS_TV_SUW_PACKAGE);
}
}
public static void disableComponentsForGMS(Context context) {
......@@ -278,6 +286,11 @@ public class SetupWizardUtils {
return comp;
}
public static void disableApplication(Context context, String appname) {
context.getPackageManager().setApplicationEnabledSetting(appname,
COMPONENT_ENABLED_STATE_DISABLED, 0);
}
public static void disableComponentSets(Context context, int flags) {
setComponentListEnabledState(context, getComponentSets(context, flags),
COMPONENT_ENABLED_STATE_DISABLED);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment