am 2321e1dc
: am 052ad242
: b/2323277 Fixed race condition where the user clicks on the dialog before dismiss() is processed.
Merge commit '2321e1dca0abfdfca421cbd490b3c4f257d96114' into eclair-mr2-plus-aosp * commit '2321e1dca0abfdfca421cbd490b3c4f257d96114': b/2323277 Fixed race condition where the user clicks on the dialog before dismiss() is processed.
This commit is contained in:
@@ -331,7 +331,9 @@ public class DockService extends Service implements AlertDialog.OnMultiChoiceCli
|
||||
// Called when the "Remember" Checkbox is clicked
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (DEBUG) Log.d(TAG, "onCheckedChanged: Remember Settings = " + isChecked);
|
||||
mBtManager.saveDockAutoConnectSetting(mDevice.getAddress(), isChecked);
|
||||
if (mDevice != null) {
|
||||
mBtManager.saveDockAutoConnectSetting(mDevice.getAddress(), isChecked);
|
||||
}
|
||||
}
|
||||
|
||||
// Called when the dialog is dismissed
|
||||
@@ -346,7 +348,7 @@ public class DockService extends Service implements AlertDialog.OnMultiChoiceCli
|
||||
|
||||
// Called when clicked on the OK button
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (which == DialogInterface.BUTTON_POSITIVE) {
|
||||
if (which == DialogInterface.BUTTON_POSITIVE && mDevice != null) {
|
||||
if (!mBtManager.hasDockAutoConnectSetting(mDevice.getAddress())) {
|
||||
mBtManager.saveDockAutoConnectSetting(mDevice.getAddress(), true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user