summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dianne Hackborn <hackbod@google.com> 2011-11-09 14:36:44 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2011-11-09 14:36:44 +0000
commit0141b7275e4597e5944752d4f4ea3707c2b4f465 (patch)
tree82cdeb55b09c60b4f28a139a7436764ee8d4a2c4
parentcc03abe1fc51a62e65f22944c3a4cba5dd3c34d3 (diff)
parentcd489c4ce59c134c384238cbb613ede34f28189c (diff)
am cd489c4c: Merge "Don\'t crash if there is no connectivity service." into ics-mr1
* commit 'cd489c4ce59c134c384238cbb613ede34f28189c': Don't crash if there is no connectivity service.
-rw-r--r--core/java/android/app/ActivityThread.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 00fe953f70e3..a4714cab3542 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -3832,11 +3832,16 @@ public final class ActivityThread {
* Initialize the default http proxy in this process for the reasons we set the time zone.
*/
IBinder b = ServiceManager.getService(Context.CONNECTIVITY_SERVICE);
- IConnectivityManager service = IConnectivityManager.Stub.asInterface(b);
- try {
- ProxyProperties proxyProperties = service.getProxy();
- Proxy.setHttpProxySystemProperty(proxyProperties);
- } catch (RemoteException e) {}
+ if (b != null) {
+ // In pre-boot mode (doing initial launch to collect password), not
+ // all system is up. This includes the connectivity service, so don't
+ // crash if we can't get it.
+ IConnectivityManager service = IConnectivityManager.Stub.asInterface(b);
+ try {
+ ProxyProperties proxyProperties = service.getProxy();
+ Proxy.setHttpProxySystemProperty(proxyProperties);
+ } catch (RemoteException e) {}
+ }
if (data.instrumentationName != null) {
ContextImpl appContext = new ContextImpl();