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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user