Tabnine Logo
VAccountManagerService$Session
Code IndexAdd Tabnine to your IDE (free)

How to use
VAccountManagerService$Session
in
com.lody.virtual.server.accounts

Best Java code snippets using com.lody.virtual.server.accounts.VAccountManagerService$Session (Showing top 20 results out of 315)

origin: android-hacker/VirtualXposed

Session(IAccountManagerResponse response, int userId, AuthenticatorInfo info, boolean expectActivityLaunch, boolean stripAuthTokenFromResult, String accountName, boolean authDetailsRequired, boolean updateLastAuthenticatedTime) {
  if (info == null) throw new IllegalArgumentException("accountType is null");
  this.mStripAuthTokenFromResult = stripAuthTokenFromResult;
  this.mResponse = response;
  this.mUserId = userId;
  this.mAuthenticatorInfo = info;
  this.mExpectActivityLaunch = expectActivityLaunch;
  this.mCreationTime = SystemClock.elapsedRealtime();
  this.mAccountName = accountName;
  this.mAuthDetailsRequired = authDetailsRequired;
  this.mUpdateLastAuthenticatedTime = updateLastAuthenticatedTime;
  synchronized (mSessions) {
    mSessions.put(toString(), this);
  }
  if (response != null) {
    try {
      response.asBinder().linkToDeath(this, 0 /* flags */);
    } catch (RemoteException e) {
      mResponse = null;
      binderDied();
    }
  }
}
origin: android-hacker/VirtualXposed

  response = mResponse;
} else {
  response = getResponseAndClose();
origin: android-hacker/VirtualXposed

void bind() {
  Log.v(TAG, "initiating bind to authenticator type " + mAuthenticatorInfo.desc.type);
  Intent intent = new Intent();
  intent.setAction(AccountManager.ACTION_AUTHENTICATOR_INTENT);
  intent.setClassName(mAuthenticatorInfo.serviceInfo.packageName, mAuthenticatorInfo.serviceInfo.name);
  intent.putExtra("_VA_|_user_id_", mUserId);
  if (!mContext.bindService(intent, this, Context.BIND_AUTO_CREATE)) {
    Log.d(TAG, "bind attempt failed for " + toDebugString());
    onError(AccountManager.ERROR_CODE_REMOTE_EXCEPTION, "bind failure");
  }
}
origin: darkskygit/VirtualApp

  response = mResponse;
} else {
  response = getResponseAndClose();
origin: bzsome/VirtualApp-x326

  response = mResponse;
} else {
  response = getResponseAndClose();
origin: bzsome/VirtualApp-x326

super.onResult(result);
origin: darkskygit/VirtualApp

super.onResult(result);
origin: bzsome/VirtualApp-x326

@Override
public void onResult(Bundle result) throws RemoteException {
  if (result != null && result.containsKey(AccountManager.KEY_BOOLEAN_RESULT)
      && !result.containsKey(AccountManager.KEY_INTENT)) {
    final boolean removalAllowed = result.getBoolean(AccountManager.KEY_BOOLEAN_RESULT);
    if (removalAllowed) {
      removeAccountInternal(userId, account);
    }
    IAccountManagerResponse response = getResponseAndClose();
    if (response != null) {
      Log.v(TAG, getClass().getSimpleName() + " calling onResult() on response "
          + response);
      Bundle result2 = new Bundle();
      result2.putBoolean(AccountManager.KEY_BOOLEAN_RESULT, removalAllowed);
      try {
        response.onResult(result2);
      } catch (RemoteException e) {
        e.printStackTrace();
      }
    }
  }
  super.onResult(result);
}
origin: bzsome/VirtualApp-x326

Session(IAccountManagerResponse response, int userId, AuthenticatorInfo info, boolean expectActivityLaunch, boolean stripAuthTokenFromResult, String accountName, boolean authDetailsRequired, boolean updateLastAuthenticatedTime) {
  if (info == null) throw new IllegalArgumentException("accountType is null");
  this.mStripAuthTokenFromResult = stripAuthTokenFromResult;
  this.mResponse = response;
  this.mUserId = userId;
  this.mAuthenticatorInfo = info;
  this.mExpectActivityLaunch = expectActivityLaunch;
  this.mCreationTime = SystemClock.elapsedRealtime();
  this.mAccountName = accountName;
  this.mAuthDetailsRequired = authDetailsRequired;
  this.mUpdateLastAuthenticatedTime = updateLastAuthenticatedTime;
  synchronized (mSessions) {
    mSessions.put(toString(), this);
  }
  if (response != null) {
    try {
      response.asBinder().linkToDeath(this, 0 /* flags */);
    } catch (RemoteException e) {
      mResponse = null;
      binderDied();
    }
  }
}
origin: darkskygit/VirtualApp

Session(IAccountManagerResponse response, int userId, AuthenticatorInfo info, boolean expectActivityLaunch, boolean stripAuthTokenFromResult, String accountName, boolean authDetailsRequired, boolean updateLastAuthenticatedTime) {
  if (info == null) throw new IllegalArgumentException("accountType is null");
  this.mStripAuthTokenFromResult = stripAuthTokenFromResult;
  this.mResponse = response;
  this.mUserId = userId;
  this.mAuthenticatorInfo = info;
  this.mExpectActivityLaunch = expectActivityLaunch;
  this.mCreationTime = SystemClock.elapsedRealtime();
  this.mAccountName = accountName;
  this.mAuthDetailsRequired = authDetailsRequired;
  this.mUpdateLastAuthenticatedTime = updateLastAuthenticatedTime;
  synchronized (mSessions) {
    mSessions.put(toString(), this);
  }
  if (response != null) {
    try {
      response.asBinder().linkToDeath(this, 0 /* flags */);
    } catch (RemoteException e) {
      mResponse = null;
      binderDied();
    }
  }
}
origin: darkskygit/VirtualApp

@Override
public void onResult(Bundle result) throws RemoteException {
  if (result != null && result.containsKey(AccountManager.KEY_BOOLEAN_RESULT)
      && !result.containsKey(AccountManager.KEY_INTENT)) {
    final boolean removalAllowed = result.getBoolean(AccountManager.KEY_BOOLEAN_RESULT);
    if (removalAllowed) {
      removeAccountInternal(userId, account);
    }
    IAccountManagerResponse response = getResponseAndClose();
    if (response != null) {
      Log.v(TAG, getClass().getSimpleName() + " calling onResult() on response "
          + response);
      Bundle result2 = new Bundle();
      result2.putBoolean(AccountManager.KEY_BOOLEAN_RESULT, removalAllowed);
      try {
        response.onResult(result2);
      } catch (RemoteException e) {
        e.printStackTrace();
      }
    }
  }
  super.onResult(result);
}
origin: bzsome/VirtualApp-x326

@Override
public void onError(int errorCode, String errorMessage) {
  mNumErrors++;
  IAccountManagerResponse response = getResponseAndClose();
  if (response != null) {
    Log.v(TAG, getClass().getSimpleName()
        + " calling onError() on response " + response);
    try {
      response.onError(errorCode, errorMessage);
    } catch (RemoteException e) {
      Log.v(TAG, "Session.onError: caught RemoteException while responding", e);
    }
  } else {
    Log.v(TAG, "Session.onError: already closed");
  }
}
origin: darkskygit/VirtualApp

@Override
public void onError(int errorCode, String errorMessage) {
  mNumErrors++;
  IAccountManagerResponse response = getResponseAndClose();
  if (response != null) {
    Log.v(TAG, getClass().getSimpleName()
        + " calling onError() on response " + response);
    try {
      response.onError(errorCode, errorMessage);
    } catch (RemoteException e) {
      Log.v(TAG, "Session.onError: caught RemoteException while responding", e);
    }
  } else {
    Log.v(TAG, "Session.onError: already closed");
  }
}
origin: bzsome/VirtualApp-x326

private void close() {
  synchronized (mSessions) {
    if (mSessions.remove(toString()) == null) {
      // the session was already closed, so bail out now
      return;
    }
  }
  if (mResponse != null) {
    // stop listening for response deaths
    mResponse.asBinder().unlinkToDeath(this, 0 /* flags */);
    // clear this so that we don't accidentally send any further results
    mResponse = null;
  }
  unbind();
}
origin: bzsome/VirtualApp-x326

protected String toDebugString() {
  return toDebugString(SystemClock.elapsedRealtime());
}
origin: bzsome/VirtualApp-x326

@Override
public void onServiceDisconnected(ComponentName name) {
  mAuthenticator = null;
  IAccountManagerResponse response = getResponseAndClose();
  if (response != null) {
    try {
      response.onError(AccountManager.ERROR_CODE_REMOTE_EXCEPTION,
          "disconnected");
    } catch (RemoteException e) {
      Log.v(TAG, "Session.onServiceDisconnected: "
          + "caught RemoteException while responding", e);
    }
  }
}
origin: darkskygit/VirtualApp

private void close() {
  synchronized (mSessions) {
    if (mSessions.remove(toString()) == null) {
      // the session was already closed, so bail out now
      return;
    }
  }
  if (mResponse != null) {
    // stop listening for response deaths
    mResponse.asBinder().unlinkToDeath(this, 0 /* flags */);
    // clear this so that we don't accidentally send any further results
    mResponse = null;
  }
  unbind();
}
origin: darkskygit/VirtualApp

protected String toDebugString() {
  return toDebugString(SystemClock.elapsedRealtime());
}
origin: darkskygit/VirtualApp

@Override
public void onServiceDisconnected(ComponentName name) {
  mAuthenticator = null;
  IAccountManagerResponse response = getResponseAndClose();
  if (response != null) {
    try {
      response.onError(AccountManager.ERROR_CODE_REMOTE_EXCEPTION,
          "disconnected");
    } catch (RemoteException e) {
      Log.v(TAG, "Session.onServiceDisconnected: "
          + "caught RemoteException while responding", e);
    }
  }
}
origin: bzsome/VirtualApp-x326

  @Override
  protected String toDebugString(long now) {
    return super.toDebugString(now) + ", getAccountsByTypeAndFeatures"
        + ", " + (mFeatures != null ? TextUtils.join(",", mFeatures) : null);
  }
}
com.lody.virtual.server.accountsVAccountManagerService$Session

Most used methods

  • binderDied
  • close
  • getResponseAndClose
  • onError
  • onResult
  • run
  • toDebugString
  • unbind

Popular in Java

  • Reading from database using SQL prepared statement
  • runOnUiThread (Activity)
  • getExternalFilesDir (Context)
  • addToBackStack (FragmentTransaction)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JLabel (javax.swing)
  • JPanel (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now