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

Commit fcee9fb5 authored by Felipe Leme's avatar Felipe Leme Committed by android-build-merger
Browse files

Fixed SystemServiceRegistry to return a null AppPredictionManager when the service is not defined.

am: 87c5855e

Change-Id: I207ddf77599d9a12609c7b297a58c8ce1b6eab17
parents 7c39b1a8 87c5855e
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1162,7 +1162,8 @@ final class SystemServiceRegistry {
            @Override
            @Override
            public AppPredictionManager createService(ContextImpl ctx)
            public AppPredictionManager createService(ContextImpl ctx)
                    throws ServiceNotFoundException {
                    throws ServiceNotFoundException {
                return new AppPredictionManager(ctx);
                IBinder b = ServiceManager.getService(Context.APP_PREDICTION_SERVICE);
                return b == null ? null : new AppPredictionManager(ctx);
            }
            }
        });
        });


+3 −0
Original line number Original line Diff line number Diff line
@@ -4109,6 +4109,9 @@ public abstract class Context {
    /**
    /**
     * Official published name of the app prediction service.
     * Official published name of the app prediction service.
     *
     *
     * <p><b>NOTE: </b> this service is optional; callers of
     * {@code Context.getSystemServiceName(APP_PREDICTION_SERVICE)} should check for {@code null}.
     *
     * @hide
     * @hide
     * @see #getSystemService(String)
     * @see #getSystemService(String)
     */
     */