Move BT settings appliance check after foreground check.
Move the BT settings appliance check after the foreground activity check. This allows us to pair bt devices if we have a UI hooked up instead of never allowing it. TESTED = runs on Nexus Q. Change-Id: I3c1ea4abb8d05236d91d2525934bec757cc5ca88
This commit is contained in:
@@ -64,17 +64,17 @@ final class LocalBluetoothPreferences {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If Bluetooth Settings is visible
|
||||||
|
if (manager.isForegroundActivity()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// If in appliance mode, do not show dialog in foreground.
|
// If in appliance mode, do not show dialog in foreground.
|
||||||
if ((context.getResources().getConfiguration().uiMode &
|
if ((context.getResources().getConfiguration().uiMode &
|
||||||
Configuration.UI_MODE_TYPE_APPLIANCE) == Configuration.UI_MODE_TYPE_APPLIANCE) {
|
Configuration.UI_MODE_TYPE_APPLIANCE) == Configuration.UI_MODE_TYPE_APPLIANCE) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If Bluetooth Settings is visible
|
|
||||||
if (manager.isForegroundActivity()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
long currentTimeMillis = System.currentTimeMillis();
|
long currentTimeMillis = System.currentTimeMillis();
|
||||||
SharedPreferences sharedPreferences = getSharedPreferences(context);
|
SharedPreferences sharedPreferences = getSharedPreferences(context);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user