private @Nullable CustomTabsSession newSessionInternal(final CustomTabsCallback callback,
                @Nullable PendingIntent sessionId) {
        ICustomTabsCallback.Stub wrapper = createCallbackWrapper(callback);

        try {
            boolean success;

            if (sessionId != null) {
                Bundle extras = new Bundle();
                extras.putParcelable(CustomTabsIntent.EXTRA_SESSION_ID, sessionId);
                success = mService.newSessionWithExtras(wrapper, extras);
            } else {
                success = mService.newSession(wrapper);
            }

            if (!success) return null;
        } catch (RemoteException e) {
            return null;
        }
        return new CustomTabsSession(mService, wrapper, mServiceComponentName, sessionId);
    }
Creates a new pending session with an optional callback. This session can be converted to
a standard session using {@link #attachSession} after connection.

{@see PendingSession}
customtabs/src/android/support/customtabs/CustomTabsClient.java