OSDN Git Service

Not update TransferActivity button during activity creating.
authorLixin Yue <L.X.YUE@motorola.com>
Tue, 9 Mar 2010 04:48:23 +0000 (12:48 +0800)
committerJaikumar Ganesh <jaikumar@google.com>
Wed, 10 Mar 2010 01:28:47 +0000 (17:28 -0800)
commit0e927e914b80baf2d37439f8b99134cfe274a1d5
tree6db03c094027003935501d7c57723707e8ca4803
parentac82c8cca9fa6728fe309852cfc0b223f1986dc8
Not update TransferActivity button during activity creating.

This is to fix below issue: when an ongoing transfer is almost to complete,
click the ongoing notification to launch TransferActivity, there will be
possible crash due to NullPointerException.
Root casue is: when TransferActivity onCreate() is called, the transfer is
still ongoing, so mIsComplete is false; but when onCreate() call to
updateProgressbar(), the transfer may change to complete, and then  updateButton()
will be called; In updateButton(),  mAlert (which will be initialized in father
class AlertActivity) still not intialized, which caused NullPointerException.

Change-Id: Ibfe363f3822386a38b9b108e29f60ad6673f70f6
src/com/android/bluetooth/opp/BluetoothOppTransferActivity.java