From 7b065464c996b792c1ecdd9d8c93db1bf0538b8d Mon Sep 17 00:00:00 2001 From: Justin Koh Date: Tue, 31 Jul 2012 18:32:39 -0700 Subject: [PATCH] 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 --- .../settings/bluetooth/LocalBluetoothPreferences.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/com/android/settings/bluetooth/LocalBluetoothPreferences.java b/src/com/android/settings/bluetooth/LocalBluetoothPreferences.java index 36bc7c8bd76..6f4a76584fc 100644 --- a/src/com/android/settings/bluetooth/LocalBluetoothPreferences.java +++ b/src/com/android/settings/bluetooth/LocalBluetoothPreferences.java @@ -64,17 +64,17 @@ final class LocalBluetoothPreferences { return false; } + // If Bluetooth Settings is visible + if (manager.isForegroundActivity()) { + return true; + } + // If in appliance mode, do not show dialog in foreground. if ((context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_TYPE_APPLIANCE) == Configuration.UI_MODE_TYPE_APPLIANCE) { return false; } - // If Bluetooth Settings is visible - if (manager.isForegroundActivity()) { - return true; - } - long currentTimeMillis = System.currentTimeMillis(); SharedPreferences sharedPreferences = getSharedPreferences(context);