Settings app: Run Bluetooth Event receiver when not in fg.

Also fix connection indication issues.
Fixes bugs 3510336 and 3513352

Change-Id: Iaa47c9d7fd04fa5dd2700f55993ba2fd1a78fd70
This commit is contained in:
Jaikumar Ganesh
2011-03-04 13:49:37 -08:00
parent e0db177334
commit 6eb84ac6de
3 changed files with 18 additions and 28 deletions

View File

@@ -66,7 +66,7 @@ public final class LocalBluetoothManager {
mCachedDeviceManager = new CachedBluetoothDeviceManager();
mEventManager = new BluetoothEventManager(mLocalAdapter,
mCachedDeviceManager);
mCachedDeviceManager, context);
mProfileManager = new LocalBluetoothProfileManager(context,
mLocalAdapter, mCachedDeviceManager, mEventManager);
}
@@ -87,11 +87,9 @@ public final class LocalBluetoothManager {
if (context != null) {
Log.d(TAG, "setting foreground activity to non-null context");
mForegroundActivity = context;
mEventManager.resume(context);
} else {
if (mForegroundActivity != null) {
Log.d(TAG, "setting foreground activity to null");
mEventManager.pause(mForegroundActivity);
mForegroundActivity = null;
}
}