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

Commit 644f5e1a authored by Robert Snoeberger's avatar Robert Snoeberger Committed by Automerger Merge Worker
Browse files

Merge "Add logs to help debug the transfer chip disappearing" into rvc-dev am:...

Merge "Add logs to help debug the transfer chip disappearing" into rvc-dev am: 44eb5ae0 am: 9ef54c8b am: 72c718ec am: 6154ee8a

Change-Id: Icff2bd330adeea3b51316b82e9808e3c4c61ed57
parents 3049eb56 6154ee8a
Loading
Loading
Loading
Loading
+18 −13
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ public class MediaControlPanel {
        // Try to find a browser service component for this app
        // TODO also check for a media button receiver intended for restarting (b/154127084)
        // Only check if we haven't tried yet or the session token changed
        String pkgName = mController.getPackageName();
        final String pkgName = mController.getPackageName();
        if (mServiceComponent == null && !mCheckedForResumption) {
            Log.d(TAG, "Checking for service component");
            PackageManager pm = mContext.getPackageManager();
@@ -281,7 +281,8 @@ public class MediaControlPanel {

        // Transfer chip
        mSeamless = mMediaNotifView.findViewById(R.id.media_seamless);
        if (mSeamless != null && mLocalMediaManager != null) {
        if (mSeamless != null) {
            if (mLocalMediaManager != null) {
                mSeamless.setVisibility(View.VISIBLE);
                updateDevice(mLocalMediaManager.getCurrentConnectedDevice());
                mSeamless.setOnClickListener(v -> {
@@ -293,6 +294,9 @@ public class MediaControlPanel {
                    mActivityStarter.startActivity(intent, false, true /* dismissShade */,
                            Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
                });
            } else {
                Log.d(TAG, "LocalMediaManager is null. Not binding output chip for pkg=" + pkgName);
            }
        }

        makeActive();
@@ -543,6 +547,7 @@ public class MediaControlPanel {
            deviceName.setText(device.getName());
        } else {
            // Reset to default
            Log.d(TAG, "device is null. Not binding output chip.");
            iconView.setVisibility(View.GONE);
            deviceName.setText(com.android.internal.R.string.ext_media_seamless_action);
        }