summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorJuffin Alex Varghese <jalex@codeaurora.org>2014-10-17 12:29:35 +0530
committerLinux Build Service Account <lnxbuild@localhost>2014-11-04 08:26:24 -0700
commit0a1f920279f748502fe33fc75f882a6f4d28a7f4 (patch)
tree9d126c3026c444899c1f70597957625f3faac311 /src/com/android
parent0424f48f91bf7fe5554d7065355b641f265bb760 (diff)
downloadandroid_packages_apps_Bluetooth-0a1f920279f748502fe33fc75f882a6f4d28a7f4.tar.gz
android_packages_apps_Bluetooth-0a1f920279f748502fe33fc75f882a6f4d28a7f4.tar.bz2
android_packages_apps_Bluetooth-0a1f920279f748502fe33fc75f882a6f4d28a7f4.zip
Bluetooth-OPP: Handle nullpointer exception in IncomingfileActivity
When IncomingFileActivity is timed out, timeout is called which tries to dereference mContentView object. But in L-release this object is not created and while trying to dereference this object cause NullPointerException and that leads to BT application crash. CRs-Fixed: 740959 Change-Id: Iada201f8f8c96af93e4f5179c4106fd164de4599
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/bluetooth/opp/BluetoothOppIncomingFileConfirmActivity.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/bluetooth/opp/BluetoothOppIncomingFileConfirmActivity.java b/src/com/android/bluetooth/opp/BluetoothOppIncomingFileConfirmActivity.java
index 312aff084..727b0366a 100644
--- a/src/com/android/bluetooth/opp/BluetoothOppIncomingFileConfirmActivity.java
+++ b/src/com/android/bluetooth/opp/BluetoothOppIncomingFileConfirmActivity.java
@@ -75,8 +75,6 @@ public class BluetoothOppIncomingFileConfirmActivity extends AlertActivity imple
private ContentValues mUpdateValues;
- private TextView mContentView;
-
private boolean mTimeout = false;
private BroadcastReceiver mReceiver = new BroadcastReceiver() {
@@ -200,8 +198,10 @@ public class BluetoothOppIncomingFileConfirmActivity extends AlertActivity imple
private void onTimeout() {
mTimeout = true;
- mContentView.setText(getString(R.string.incoming_file_confirm_timeout_content,
- mTransInfo.mDeviceName));
+ View view = getLayoutInflater().inflate(R.layout.incoming_dialog, null);
+
+ ((TextView)view.findViewById(R.id.from_content)).setText(
+ getString(R.string.incoming_file_confirm_timeout_content, mTransInfo.mDeviceName));
mAlert.getButton(DialogInterface.BUTTON_NEGATIVE).setVisibility(View.GONE);
mAlert.getButton(DialogInterface.BUTTON_POSITIVE).setText(
getString(R.string.incoming_file_confirm_timeout_ok));