SuW: Disable BluetoothSetupActivity component with prop
* Checks if config.disable_bluetooth=true is set * Some leanback devices do not have bluetooth chips Change-Id: Id4d3445e24d9888e186b69a959dbaf54fc9bf31e
This commit is contained in:
@@ -227,6 +227,10 @@ public class SetupWizardUtils {
|
||||
disableComponentSets(context, GET_RECEIVERS | GET_SERVICES);
|
||||
}
|
||||
|
||||
public static boolean isBluetoothDisabled() {
|
||||
return SystemProperties.getBoolean("config.disable_bluetooth", false);
|
||||
}
|
||||
|
||||
public static boolean isEthernetConnected(Context context) {
|
||||
ConnectivityManager cm = (ConnectivityManager) context.
|
||||
getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
@@ -279,7 +283,7 @@ public class SetupWizardUtils {
|
||||
}
|
||||
|
||||
public static void disableComponentsForMissingFeatures(Context context) {
|
||||
if (!hasLeanback(context)) {
|
||||
if (!hasLeanback(context) || isBluetoothDisabled()) {
|
||||
disableComponent(context, BluetoothSetupActivity.class);
|
||||
}
|
||||
if (!hasBiometric(context)) {
|
||||
|
Reference in New Issue
Block a user