@Nullable
    public static CustomTabsSessionToken getSessionTokenFromIntent(Intent intent) {
        Bundle b = intent.getExtras();
        if (b == null) return null;
        IBinder binder = BundleCompat.getBinder(b, CustomTabsIntent.EXTRA_SESSION);
        PendingIntent sessionId = intent.getParcelableExtra(CustomTabsIntent.EXTRA_SESSION_ID);
        if (binder == null && sessionId == null) return null;
        return new CustomTabsSessionToken(ICustomTabsCallback.Stub.asInterface(binder), sessionId);
    }
Obtain a {@link CustomTabsSessionToken} from an intent. See {@link CustomTabsIntent.Builder}
for ways to generate an intent for custom tabs.
@param intent The intent to generate the token from. This has to include an extra for
              {@link CustomTabsIntent#EXTRA_SESSION}.
@return The token that was generated.
customtabs/src/android/support/customtabs/CustomTabsSessionToken.java