From 519dda9c572309182cb29e247adafe2cd475a594 Mon Sep 17 00:00:00 2001 From: Justin Koh Date: Mon, 30 Apr 2012 18:08:19 -0700 Subject: [PATCH] Disables BluetoothPairingDialog if in appliance mode. Disables the BluetoothPairingDialog if we are in appliance mode. Bug: 6392817 TESTED = runs on Tungsten. Change-Id: I62191496b412c6196e9a18a1dd1d3bc3dd70ba0c --- .../settings/bluetooth/LocalBluetoothPreferences.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/com/android/settings/bluetooth/LocalBluetoothPreferences.java b/src/com/android/settings/bluetooth/LocalBluetoothPreferences.java index 7e62b0e1a34..36bc7c8bd76 100644 --- a/src/com/android/settings/bluetooth/LocalBluetoothPreferences.java +++ b/src/com/android/settings/bluetooth/LocalBluetoothPreferences.java @@ -19,6 +19,7 @@ package com.android.settings.bluetooth; import android.app.QueuedWork; import android.content.Context; import android.content.SharedPreferences; +import android.content.res.Configuration; /** * LocalBluetoothPreferences provides an interface to the preferences @@ -63,6 +64,12 @@ final class LocalBluetoothPreferences { return false; } + // 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;