Tabnine Logo
VAccountManager.get
Code IndexAdd Tabnine to your IDE (free)

How to use
get
method
in
com.lody.virtual.client.ipc.VAccountManager

Best Java code snippets using com.lody.virtual.client.ipc.VAccountManager.get (Showing top 18 results out of 315)

origin: android-hacker/VirtualXposed

/**
 * Return a set of account types specified by the intent as well as supported by the
 * AccountManager.
 */
private Set<String> getReleventAccountTypes(final Intent intent) {
  // An account type is relevant iff it is allowed by the caller and supported by the account
  // manager.
  Set<String> setOfRelevantAccountTypes;
  final String[] allowedAccountTypes =
      intent.getStringArrayExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY);
  AuthenticatorDescription[] descs = VAccountManager.get().getAuthenticatorTypes();
  Set<String> supportedAccountTypes = new HashSet<String>(descs.length);
  for (AuthenticatorDescription desc : descs) {
    supportedAccountTypes.add(desc.type);
  }
  if (allowedAccountTypes != null) {
    setOfRelevantAccountTypes = new HashSet<>();
    Collections.addAll(setOfRelevantAccountTypes, allowedAccountTypes);
    setOfRelevantAccountTypes.retainAll(supportedAccountTypes);
  } else {
    setOfRelevantAccountTypes = supportedAccountTypes;
  }
  return setOfRelevantAccountTypes;
}
origin: android-hacker/VirtualXposed

@Override
public void run(final AccountManagerFuture<Bundle> accountManagerFuture) {
  try {
    final Bundle accountManagerResult = accountManagerFuture.getResult();
    final Intent intent = accountManagerResult.getParcelable(
        AccountManager.KEY_INTENT);
    if (intent != null) {
      mPendingRequest = REQUEST_ADD_ACCOUNT;
      mExistingAccounts = VAccountManager.get().getAccounts(mCallingUserId, null);
      intent.setFlags(intent.getFlags() & ~Intent.FLAG_ACTIVITY_NEW_TASK);
      startActivityForResult(intent, REQUEST_ADD_ACCOUNT);
      return;
    }
  } catch (OperationCanceledException e) {
    setResult(Activity.RESULT_CANCELED);
    finish();
    return;
  } catch (IOException e) {
  } catch (AuthenticatorException e) {
  }
  Bundle bundle = new Bundle();
  bundle.putString(AccountManager.KEY_ERROR_MESSAGE, "error communicating with server");
  setResult(Activity.RESULT_OK, new Intent().putExtras(bundle));
  finish();
}
origin: android-hacker/VirtualXposed

protected void runAddAccountForAuthenticator(String type) {
  if (Log.isLoggable(TAG, Log.VERBOSE)) {
    Log.v(TAG, "runAddAccountForAuthenticator: " + type);
  }
  final Bundle options = getIntent().getBundleExtra(
      ChooseTypeAndAccountActivity.EXTRA_ADD_ACCOUNT_OPTIONS_BUNDLE);
  final String[] requiredFeatures = getIntent().getStringArrayExtra(
      ChooseTypeAndAccountActivity.EXTRA_ADD_ACCOUNT_REQUIRED_FEATURES_STRING_ARRAY);
  final String authTokenType = getIntent().getStringExtra(
      ChooseTypeAndAccountActivity.EXTRA_ADD_ACCOUNT_AUTH_TOKEN_TYPE_STRING);
  VAccountManager.get().addAccount(mCallingUserId, type, authTokenType, requiredFeatures,
      options, null /* activity */, this /* callback */, null /* Handler */);
}
origin: android-hacker/VirtualXposed

private void buildTypeToAuthDescriptionMap() {
  for(AuthenticatorDescription desc : VAccountManager.get().getAuthenticatorTypes()) {
    String name = null;
    Drawable icon = null;
    try {
      Resources res = VirtualCore.get().getResources(desc.packageName);
      icon = res.getDrawable(desc.iconId);
      final CharSequence sequence = res.getText(desc.labelId);
      name = sequence.toString();
      name = sequence.toString();
    } catch (Resources.NotFoundException e) {
      // Nothing we can do much here, just log
      VLog.w(TAG, "No icon resource for account type " + desc.type);
    }
    AuthInfo authInfo = new AuthInfo(desc, name, icon);
    mTypeToAuthenticatorInfo.put(desc.type, authInfo);
  }
}
origin: android-hacker/VirtualXposed

Account[] currentAccounts = VAccountManager.get().getAccounts(mCallingUserId, null);
Set<Account> preExistingAccounts = new HashSet<>();
for (Parcelable accountParcel : mExistingAccounts) {
origin: android-hacker/VirtualXposed

mDescriptionOverride = intent.getStringExtra(EXTRA_DESCRIPTION_TEXT_OVERRIDE);
mAccounts = getAcceptableAccountChoices(VAccountManager.get());
origin: darkskygit/VirtualApp

/**
 * Return a set of account types specified by the intent as well as supported by the
 * AccountManager.
 */
private Set<String> getReleventAccountTypes(final Intent intent) {
  // An account type is relevant iff it is allowed by the caller and supported by the account
  // manager.
  Set<String> setOfRelevantAccountTypes;
  final String[] allowedAccountTypes =
      intent.getStringArrayExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY);
  AuthenticatorDescription[] descs = VAccountManager.get().getAuthenticatorTypes();
  Set<String> supportedAccountTypes = new HashSet<String>(descs.length);
  for (AuthenticatorDescription desc : descs) {
    supportedAccountTypes.add(desc.type);
  }
  if (allowedAccountTypes != null) {
    setOfRelevantAccountTypes = new HashSet<>();
    Collections.addAll(setOfRelevantAccountTypes, allowedAccountTypes);
    setOfRelevantAccountTypes.retainAll(supportedAccountTypes);
  } else {
    setOfRelevantAccountTypes = supportedAccountTypes;
  }
  return setOfRelevantAccountTypes;
}
origin: darkskygit/VirtualApp

@Override
public void run(final AccountManagerFuture<Bundle> accountManagerFuture) {
  try {
    final Bundle accountManagerResult = accountManagerFuture.getResult();
    final Intent intent = accountManagerResult.getParcelable(
        AccountManager.KEY_INTENT);
    if (intent != null) {
      mPendingRequest = REQUEST_ADD_ACCOUNT;
      mExistingAccounts = VAccountManager.get().getAccounts(mCallingUserId, null);
      intent.setFlags(intent.getFlags() & ~Intent.FLAG_ACTIVITY_NEW_TASK);
      startActivityForResult(intent, REQUEST_ADD_ACCOUNT);
      return;
    }
  } catch (OperationCanceledException e) {
    setResult(Activity.RESULT_CANCELED);
    finish();
    return;
  } catch (IOException e) {
  } catch (AuthenticatorException e) {
  }
  Bundle bundle = new Bundle();
  bundle.putString(AccountManager.KEY_ERROR_MESSAGE, "error communicating with server");
  setResult(Activity.RESULT_OK, new Intent().putExtras(bundle));
  finish();
}
origin: darkskygit/VirtualApp

protected void runAddAccountForAuthenticator(String type) {
  if (Log.isLoggable(TAG, Log.VERBOSE)) {
    Log.v(TAG, "runAddAccountForAuthenticator: " + type);
  }
  final Bundle options = getIntent().getBundleExtra(
      ChooseTypeAndAccountActivity.EXTRA_ADD_ACCOUNT_OPTIONS_BUNDLE);
  final String[] requiredFeatures = getIntent().getStringArrayExtra(
      ChooseTypeAndAccountActivity.EXTRA_ADD_ACCOUNT_REQUIRED_FEATURES_STRING_ARRAY);
  final String authTokenType = getIntent().getStringExtra(
      ChooseTypeAndAccountActivity.EXTRA_ADD_ACCOUNT_AUTH_TOKEN_TYPE_STRING);
  VAccountManager.get().addAccount(mCallingUserId, type, authTokenType, requiredFeatures,
      options, null /* activity */, this /* callback */, null /* Handler */);
}
origin: bzsome/VirtualApp-x326

/**
 * Return a set of account types specified by the intent as well as supported by the
 * AccountManager.
 */
private Set<String> getReleventAccountTypes(final Intent intent) {
  // An account type is relevant iff it is allowed by the caller and supported by the account
  // manager.
  Set<String> setOfRelevantAccountTypes;
  final String[] allowedAccountTypes =
      intent.getStringArrayExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY);
  AuthenticatorDescription[] descs = VAccountManager.get().getAuthenticatorTypes();
  Set<String> supportedAccountTypes = new HashSet<String>(descs.length);
  for (AuthenticatorDescription desc : descs) {
    supportedAccountTypes.add(desc.type);
  }
  if (allowedAccountTypes != null) {
    setOfRelevantAccountTypes = new HashSet<>();
    Collections.addAll(setOfRelevantAccountTypes, allowedAccountTypes);
    setOfRelevantAccountTypes.retainAll(supportedAccountTypes);
  } else {
    setOfRelevantAccountTypes = supportedAccountTypes;
  }
  return setOfRelevantAccountTypes;
}
origin: bzsome/VirtualApp-x326

@Override
public void run(final AccountManagerFuture<Bundle> accountManagerFuture) {
  try {
    final Bundle accountManagerResult = accountManagerFuture.getResult();
    final Intent intent = accountManagerResult.getParcelable(
        AccountManager.KEY_INTENT);
    if (intent != null) {
      mPendingRequest = REQUEST_ADD_ACCOUNT;
      mExistingAccounts = VAccountManager.get().getAccounts(mCallingUserId, null);
      intent.setFlags(intent.getFlags() & ~Intent.FLAG_ACTIVITY_NEW_TASK);
      startActivityForResult(intent, REQUEST_ADD_ACCOUNT);
      return;
    }
  } catch (OperationCanceledException e) {
    setResult(Activity.RESULT_CANCELED);
    finish();
    return;
  } catch (IOException e) {
  } catch (AuthenticatorException e) {
  }
  Bundle bundle = new Bundle();
  bundle.putString(AccountManager.KEY_ERROR_MESSAGE, "error communicating with server");
  setResult(Activity.RESULT_OK, new Intent().putExtras(bundle));
  finish();
}
origin: bzsome/VirtualApp-x326

protected void runAddAccountForAuthenticator(String type) {
  if (Log.isLoggable(TAG, Log.VERBOSE)) {
    Log.v(TAG, "runAddAccountForAuthenticator: " + type);
  }
  final Bundle options = getIntent().getBundleExtra(
      ChooseTypeAndAccountActivity.EXTRA_ADD_ACCOUNT_OPTIONS_BUNDLE);
  final String[] requiredFeatures = getIntent().getStringArrayExtra(
      ChooseTypeAndAccountActivity.EXTRA_ADD_ACCOUNT_REQUIRED_FEATURES_STRING_ARRAY);
  final String authTokenType = getIntent().getStringExtra(
      ChooseTypeAndAccountActivity.EXTRA_ADD_ACCOUNT_AUTH_TOKEN_TYPE_STRING);
  VAccountManager.get().addAccount(mCallingUserId, type, authTokenType, requiredFeatures,
      options, null /* activity */, this /* callback */, null /* Handler */);
}
origin: darkskygit/VirtualApp

private void buildTypeToAuthDescriptionMap() {
  for(AuthenticatorDescription desc : VAccountManager.get().getAuthenticatorTypes()) {
    String name = null;
    Drawable icon = null;
    try {
      Resources res = VirtualCore.get().getResources(desc.packageName);
      icon = res.getDrawable(desc.iconId);
      final CharSequence sequence = res.getText(desc.labelId);
      name = sequence.toString();
      name = sequence.toString();
    } catch (Resources.NotFoundException e) {
      // Nothing we can do much here, just log
      VLog.w(TAG, "No icon resource for account type " + desc.type);
    }
    AuthInfo authInfo = new AuthInfo(desc, name, icon);
    mTypeToAuthenticatorInfo.put(desc.type, authInfo);
  }
}
origin: darkskygit/VirtualApp

Account[] currentAccounts = VAccountManager.get().getAccounts(mCallingUserId, null);
Set<Account> preExistingAccounts = new HashSet<>();
for (Parcelable accountParcel : mExistingAccounts) {
origin: darkskygit/VirtualApp

mDescriptionOverride = intent.getStringExtra(EXTRA_DESCRIPTION_TEXT_OVERRIDE);
mAccounts = getAcceptableAccountChoices(VAccountManager.get());
origin: bzsome/VirtualApp-x326

private void buildTypeToAuthDescriptionMap() {
  for(AuthenticatorDescription desc : VAccountManager.get().getAuthenticatorTypes()) {
    String name = null;
    Drawable icon = null;
    try {
      Resources res = VirtualCore.get().getResources(desc.packageName);
      icon = res.getDrawable(desc.iconId);
      final CharSequence sequence = res.getText(desc.labelId);
      name = sequence.toString();
      name = sequence.toString();
    } catch (Resources.NotFoundException e) {
      // Nothing we can do much here, just log
      VLog.w(TAG, "No icon resource for account type " + desc.type);
    }
    AuthInfo authInfo = new AuthInfo(desc, name, icon);
    mTypeToAuthenticatorInfo.put(desc.type, authInfo);
  }
}
origin: bzsome/VirtualApp-x326

Account[] currentAccounts = VAccountManager.get().getAccounts(mCallingUserId, null);
Set<Account> preExistingAccounts = new HashSet<>();
for (Parcelable accountParcel : mExistingAccounts) {
origin: bzsome/VirtualApp-x326

mDescriptionOverride = intent.getStringExtra(EXTRA_DESCRIPTION_TEXT_OVERRIDE);
mAccounts = getAcceptableAccountChoices(VAccountManager.get());
com.lody.virtual.client.ipcVAccountManagerget

Popular methods of VAccountManager

  • accountAuthenticated
  • addAccount
  • addAccountExplicitly
  • clearPassword
  • confirmCredentials
  • editProperties
  • getAccounts
  • getAccountsByFeatures
  • getAuthToken
  • getAuthTokenLabel
  • getAuthenticatorTypes
  • getPassword
  • getAuthenticatorTypes,
  • getPassword,
  • getPreviousName,
  • getUserData,
  • hasFeatures,
  • invalidateAuthToken,
  • peekAuthToken,
  • removeAccount,
  • removeAccountExplicitly

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • getSystemService (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Path (java.nio.file)
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Github Copilot alternatives
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