Loading core/java/android/app/prediction/AppPredictor.java +9 −4 Original line number Diff line number Diff line Loading @@ -74,7 +74,6 @@ public final class AppPredictor { private static final String TAG = AppPredictor.class.getSimpleName(); private final IPredictionManager mPredictionManager; private final CloseGuard mCloseGuard = CloseGuard.get(); private final AtomicBoolean mIsClosed = new AtomicBoolean(false); Loading @@ -82,8 +81,6 @@ public final class AppPredictor { private final AppPredictionSessionId mSessionId; private final ArrayMap<Callback, CallbackWrapper> mRegisteredCallbacks = new ArrayMap<>(); private final IBinder mToken = new Binder(); /** * Creates a new Prediction client. * <p> Loading @@ -99,7 +96,7 @@ public final class AppPredictor { mSessionId = new AppPredictionSessionId( context.getPackageName() + ":" + UUID.randomUUID().toString(), context.getUserId()); try { mPredictionManager.createPredictionSession(predictionContext, mSessionId, mToken); mPredictionManager.createPredictionSession(predictionContext, mSessionId, getToken()); } catch (RemoteException e) { Log.e(TAG, "Failed to create predictor", e); e.rethrowAsRuntimeException(); Loading Loading @@ -324,4 +321,12 @@ public final class AppPredictor { } } } private static class Token { static final IBinder sBinder = new Binder(TAG); } private static IBinder getToken() { return Token.sBinder; } } core/java/android/app/smartspace/SmartspaceSession.java +9 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,6 @@ public final class SmartspaceSession implements AutoCloseable { private final SmartspaceSessionId mSessionId; private final ArrayMap<OnTargetsAvailableListener, CallbackWrapper> mRegisteredCallbacks = new ArrayMap<>(); private final IBinder mToken = new Binder(); /** * Creates a new Smartspace ui client. Loading @@ -101,7 +100,7 @@ public final class SmartspaceSession implements AutoCloseable { mSessionId = new SmartspaceSessionId( context.getPackageName() + ":" + UUID.randomUUID().toString(), context.getUser()); try { mInterface.createSmartspaceSession(smartspaceConfig, mSessionId, mToken); mInterface.createSmartspaceSession(smartspaceConfig, mSessionId, getToken()); } catch (RemoteException e) { Log.e(TAG, "Failed to create Smartspace session", e); e.rethrowFromSystemServer(); Loading Loading @@ -283,4 +282,12 @@ public final class SmartspaceSession implements AutoCloseable { } } } private static class Token { static final IBinder sBinder = new Binder(TAG); } private static IBinder getToken() { return Token.sBinder; } } Loading
core/java/android/app/prediction/AppPredictor.java +9 −4 Original line number Diff line number Diff line Loading @@ -74,7 +74,6 @@ public final class AppPredictor { private static final String TAG = AppPredictor.class.getSimpleName(); private final IPredictionManager mPredictionManager; private final CloseGuard mCloseGuard = CloseGuard.get(); private final AtomicBoolean mIsClosed = new AtomicBoolean(false); Loading @@ -82,8 +81,6 @@ public final class AppPredictor { private final AppPredictionSessionId mSessionId; private final ArrayMap<Callback, CallbackWrapper> mRegisteredCallbacks = new ArrayMap<>(); private final IBinder mToken = new Binder(); /** * Creates a new Prediction client. * <p> Loading @@ -99,7 +96,7 @@ public final class AppPredictor { mSessionId = new AppPredictionSessionId( context.getPackageName() + ":" + UUID.randomUUID().toString(), context.getUserId()); try { mPredictionManager.createPredictionSession(predictionContext, mSessionId, mToken); mPredictionManager.createPredictionSession(predictionContext, mSessionId, getToken()); } catch (RemoteException e) { Log.e(TAG, "Failed to create predictor", e); e.rethrowAsRuntimeException(); Loading Loading @@ -324,4 +321,12 @@ public final class AppPredictor { } } } private static class Token { static final IBinder sBinder = new Binder(TAG); } private static IBinder getToken() { return Token.sBinder; } }
core/java/android/app/smartspace/SmartspaceSession.java +9 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,6 @@ public final class SmartspaceSession implements AutoCloseable { private final SmartspaceSessionId mSessionId; private final ArrayMap<OnTargetsAvailableListener, CallbackWrapper> mRegisteredCallbacks = new ArrayMap<>(); private final IBinder mToken = new Binder(); /** * Creates a new Smartspace ui client. Loading @@ -101,7 +100,7 @@ public final class SmartspaceSession implements AutoCloseable { mSessionId = new SmartspaceSessionId( context.getPackageName() + ":" + UUID.randomUUID().toString(), context.getUser()); try { mInterface.createSmartspaceSession(smartspaceConfig, mSessionId, mToken); mInterface.createSmartspaceSession(smartspaceConfig, mSessionId, getToken()); } catch (RemoteException e) { Log.e(TAG, "Failed to create Smartspace session", e); e.rethrowFromSystemServer(); Loading Loading @@ -283,4 +282,12 @@ public final class SmartspaceSession implements AutoCloseable { } } } private static class Token { static final IBinder sBinder = new Binder(TAG); } private static IBinder getToken() { return Token.sBinder; } }