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

Commit 4d3914ac authored by Eugene Susla's avatar Eugene Susla Committed by android-build-merger
Browse files

Merge "Avoid running hasCompanionDevices on main thread" into oc-mr1-dev

am: 933108ed

Change-Id: I244acf8ad34e1e2098c996b7e5c5549fdac4abfd
parents a97e0833 933108ed
Loading
Loading
Loading
Loading
+9 −14
Original line number Diff line number Diff line
@@ -158,6 +158,7 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.os.BackgroundThread;
import com.android.internal.statusbar.NotificationVisibility;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.DumpUtils;
@@ -5576,14 +5577,11 @@ public class NotificationManagerService extends SystemService {
                    continue;
                }

                mHandler.post(new Runnable() {
                    @Override
                    public void run() {
                BackgroundThread.getHandler().post(() -> {
                    if (hasCompanionDevice(serviceInfo)) {
                        notifyNotificationChannelChanged(
                                serviceInfo, pkg, user, channel, modificationType);
                    }
                    }
                });
            }
        }
@@ -5599,14 +5597,11 @@ public class NotificationManagerService extends SystemService {
                    continue;
                }

                mHandler.post(new Runnable() {
                    @Override
                    public void run() {
                BackgroundThread.getHandler().post(() -> {
                    if (hasCompanionDevice(serviceInfo)) {
                        notifyNotificationChannelGroupChanged(
                                serviceInfo, pkg, user, group, modificationType);
                    }
                    }
                });
            }
        }