Disables BluetoothPairingDialog if in appliance mode.

Disables the BluetoothPairingDialog if we are in appliance mode.

Bug: 6392817

TESTED = runs on Tungsten.

Change-Id: I62191496b412c6196e9a18a1dd1d3bc3dd70ba0c
This commit is contained in:
Justin Koh
2012-04-30 18:08:19 -07:00
parent ee365b411d
commit 519dda9c57

View File

@@ -19,6 +19,7 @@ package com.android.settings.bluetooth;
import android.app.QueuedWork; import android.app.QueuedWork;
import android.content.Context; import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.res.Configuration;
/** /**
* LocalBluetoothPreferences provides an interface to the preferences * LocalBluetoothPreferences provides an interface to the preferences
@@ -63,6 +64,12 @@ final class LocalBluetoothPreferences {
return false; 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 Bluetooth Settings is visible
if (manager.isForegroundActivity()) { if (manager.isForegroundActivity()) {
return true; return true;