Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f03d585 authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Automerger Merge Worker
Browse files

Merge "Toast: Fix JE caused by service not bind" am: ddf2f52d

parents 755b013a ddf2f52d
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -369,9 +369,6 @@ public class DisplayHashController {
            if (mServiceConnection == null) {
                if (DEBUG) Slog.v(TAG, "creating connection");

                // Create the connection
                mServiceConnection = new DisplayHashingServiceConnection();

                final ComponentName component = getServiceComponentName();
                if (DEBUG) Slog.v(TAG, "binding to: " + component);
                if (component != null) {
@@ -379,6 +376,8 @@ public class DisplayHashController {
                    intent.setComponent(component);
                    final long token = Binder.clearCallingIdentity();
                    try {
                        // Create the connection
                        mServiceConnection = new DisplayHashingServiceConnection();
                        mContext.bindService(intent, mServiceConnection, Context.BIND_AUTO_CREATE);
                        if (DEBUG) Slog.v(TAG, "bound");
                    } finally {
@@ -387,9 +386,11 @@ public class DisplayHashController {
                }
            }

            if (mServiceConnection != null) {
                mServiceConnection.runCommandLocked(command);
            }
        }
    }

    @Nullable
    private ServiceInfo getServiceInfo() {