Loading services/core/java/com/android/server/servicewatcher/ServiceWatcherImpl.java +13 −8 Original line number Diff line number Diff line Loading @@ -206,16 +206,21 @@ class ServiceWatcherImpl<TBoundServiceInfo extends BoundServiceInfo> implements Log.d(TAG, "[" + mTag + "] binding to " + mBoundServiceInfo); } mRebinder = null; Intent bindIntent = new Intent(mBoundServiceInfo.getAction()).setComponent( mBoundServiceInfo.getComponentName()); try { if (!mContext.bindServiceAsUser(bindIntent, this, BIND_AUTO_CREATE | BIND_NOT_FOREGROUND | BIND_NOT_VISIBLE, mHandler, UserHandle.of(mBoundServiceInfo.getUserId()))) { Log.e(TAG, "[" + mTag + "] unexpected bind failure - retrying later"); mRebinder = this::bind; mHandler.postDelayed(mRebinder, RETRY_DELAY_MS); } else { mRebinder = null; } } catch (SecurityException e) { // if anything goes wrong it shouldn't crash the system server Log.e(TAG, "[" + mTag + "] " + mBoundServiceInfo + " bind failed", e); } } Loading Loading
services/core/java/com/android/server/servicewatcher/ServiceWatcherImpl.java +13 −8 Original line number Diff line number Diff line Loading @@ -206,16 +206,21 @@ class ServiceWatcherImpl<TBoundServiceInfo extends BoundServiceInfo> implements Log.d(TAG, "[" + mTag + "] binding to " + mBoundServiceInfo); } mRebinder = null; Intent bindIntent = new Intent(mBoundServiceInfo.getAction()).setComponent( mBoundServiceInfo.getComponentName()); try { if (!mContext.bindServiceAsUser(bindIntent, this, BIND_AUTO_CREATE | BIND_NOT_FOREGROUND | BIND_NOT_VISIBLE, mHandler, UserHandle.of(mBoundServiceInfo.getUserId()))) { Log.e(TAG, "[" + mTag + "] unexpected bind failure - retrying later"); mRebinder = this::bind; mHandler.postDelayed(mRebinder, RETRY_DELAY_MS); } else { mRebinder = null; } } catch (SecurityException e) { // if anything goes wrong it shouldn't crash the system server Log.e(TAG, "[" + mTag + "] " + mBoundServiceInfo + " bind failed", e); } } Loading