MAP 1.1 Review fixes
- Fixes to the issues found during review. - added support for BluetoothProfile ProfileService Classes - Added new MapProfile.java to comply with new structure - changed ORDINAL to use BluetoothProfile.MAP directly - Moved construction of MapProfile to LocalBluetoothProfileManager constructor - Added support for multiple concurent permission activities and/or multiple notifications (i.e. pbap and map permission request right after each other) - cleanup - changed settings to use Notification.Builder - made the notifications for map/pbab more informative - added handling of back button + "clear all notifications" Bug:10692365 Change-Id: I9803c9658a96b1a9c1d4734d2fdd22f1421d2827
This commit is contained in:
@@ -20,14 +20,15 @@ import android.app.QueuedWork;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* LocalBluetoothPreferences provides an interface to the preferences
|
||||
* related to Bluetooth.
|
||||
*/
|
||||
final class LocalBluetoothPreferences {
|
||||
// private static final String TAG = "LocalBluetoothPreferences";
|
||||
|
||||
private static final String TAG = "LocalBluetoothPreferences";
|
||||
private static final boolean DEBUG = Utils.D;
|
||||
private static final String SHARED_PREFERENCES_NAME = "bluetooth_settings";
|
||||
|
||||
// If a device was picked from the device picker or was in discoverable mode
|
||||
@@ -61,6 +62,7 @@ final class LocalBluetoothPreferences {
|
||||
String deviceAddress) {
|
||||
LocalBluetoothManager manager = LocalBluetoothManager.getInstance(context);
|
||||
if (manager == null) {
|
||||
if(DEBUG) Log.v(TAG, "manager == null - do not show dialog.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -72,6 +74,7 @@ final class LocalBluetoothPreferences {
|
||||
// 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) {
|
||||
if (DEBUG) Log.v(TAG, "in appliance mode - do not show dialog.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -109,6 +112,7 @@ final class LocalBluetoothPreferences {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (DEBUG) Log.v(TAG, "Found no reason to show the dialog - do not show dialog.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user