File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -3832,11 +3832,16 @@ private void handleBindApplication(AppBindData data) {
38323832 * Initialize the default http proxy in this process for the reasons we set the time zone.
38333833 */
38343834 IBinder b = ServiceManager .getService (Context .CONNECTIVITY_SERVICE );
3835- IConnectivityManager service = IConnectivityManager .Stub .asInterface (b );
3836- try {
3837- ProxyProperties proxyProperties = service .getProxy ();
3838- Proxy .setHttpProxySystemProperty (proxyProperties );
3839- } catch (RemoteException e ) {}
3835+ if (b != null ) {
3836+ // In pre-boot mode (doing initial launch to collect password), not
3837+ // all system is up. This includes the connectivity service, so don't
3838+ // crash if we can't get it.
3839+ IConnectivityManager service = IConnectivityManager .Stub .asInterface (b );
3840+ try {
3841+ ProxyProperties proxyProperties = service .getProxy ();
3842+ Proxy .setHttpProxySystemProperty (proxyProperties );
3843+ } catch (RemoteException e ) {}
3844+ }
38403845
38413846 if (data .instrumentationName != null ) {
38423847 ContextImpl appContext = new ContextImpl ();
You can’t perform that action at this time.
0 commit comments