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

Commit 7940baa7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix bug where GameService#onDisconnected isn't called" into tm-dev

parents 3d31e0b9 569d8873
Loading
Loading
Loading
Loading
+5 −11
Original line number Diff line number Diff line
@@ -85,15 +85,6 @@ final class GameServiceProviderInstanceImpl implements GameServiceProviderInstan
                        Slog.w(TAG, "Failed to send connected event", ex);
                    }
                }

                @Override
                public void onDisconnected(@NonNull IGameService service) {
                    try {
                        service.disconnected();
                    } catch (RemoteException ex) {
                        Slog.w(TAG, "Failed to send disconnected event", ex);
                    }
                }
            };

    private final ServiceLifecycleCallbacks<IGameSessionService>
@@ -181,7 +172,8 @@ final class GameServiceProviderInstanceImpl implements GameServiceProviderInstan
        }

        @Override
        public void onForegroundServicesChanged(int pid, int uid, int serviceTypes) {}
        public void onForegroundServicesChanged(int pid, int uid, int serviceTypes) {
        }
    };

    private final IGameServiceController mGameServiceController =
@@ -338,7 +330,9 @@ final class GameServiceProviderInstanceImpl implements GameServiceProviderInstan

        destroyAndClearAllGameSessionsLocked();

        mGameServiceConnector.post(IGameService::disconnected).whenComplete((result, t) -> {
            mGameServiceConnector.unbind();
        });
        mGameSessionServiceConnector.unbind();

        mGameServiceConnector.setServiceLifecycleCallbacks(null);