summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorJohn Wang <johnwang@google.com>2009-06-30 12:01:35 -0700
committerJohn Wang <johnwang@google.com>2009-06-30 12:01:35 -0700
commit107821369b7af3b739a0b5617fb34ff19f7ca9b5 (patch)
tree81b1fe0b686248b0815d0ce2e77ebcf735e9c2e6 /telephony
parentc44989d6c7bcc761fb37f54fd37aac2070ba8e5e (diff)
downloadframeworks_base-107821369b7af3b739a0b5617fb34ff19f7ca9b5.zip
frameworks_base-107821369b7af3b739a0b5617fb34ff19f7ca9b5.tar.gz
frameworks_base-107821369b7af3b739a0b5617fb34ff19f7ca9b5.tar.bz2
Fix bug 1930055 of NullPointerException.
The NullPointerException in getCallState is caused by the restarting of phone process. getITelephony() was not ready to be used at that moment. modified: java/android/telephony/TelephonyManager.java
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index bf5df88..c9dcd8b 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -667,7 +667,10 @@ public class TelephonyManager {
} catch (RemoteException ex) {
// the phone process is restarting.
return CALL_STATE_IDLE;
- }
+ } catch (NullPointerException ex) {
+ // the phone process is restarting.
+ return CALL_STATE_IDLE;
+ }
}
/** Data connection activity: No traffic. */
@@ -701,7 +704,10 @@ public class TelephonyManager {
} catch (RemoteException ex) {
// the phone process is restarting.
return DATA_ACTIVITY_NONE;
- }
+ } catch (NullPointerException ex) {
+ // the phone process is restarting.
+ return DATA_ACTIVITY_NONE;
+ }
}
/** Data connection state: Disconnected. IP traffic not available. */