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

Commit 933108ed authored by Eugene Susla's avatar Eugene Susla Committed by Android (Google) Code Review
Browse files

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

parents c233f44a a25d17ff
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);
                    }
                    }
                });
            }
        }