Codota Logo
VAccountManagerService.getAccount
Code IndexAdd Codota to your IDE (free)

How to use
getAccount
method
in
com.lody.virtual.server.accounts.VAccountManagerService

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

  • Common ways to obtain VAccountManagerService
private void myMethod () {
VAccountManagerService v =
  • Codota Iconnew VAccountManagerService()
  • Codota IconAtomicReference atomicReference;atomicReference.get()
  • Smart code suggestions by Codota
}
origin: android-hacker/VirtualXposed

private VAccount getAccount(int userId, Account account) {
  return this.getAccount(userId, account.name, account.type);
}
origin: android-hacker/VirtualXposed

@Override
public final String getPreviousName(int userId, Account account) {
  if (account == null) throw new IllegalArgumentException("account is null");
  synchronized (accountsByUserId) {
    String previousName = null;
    VAccount vAccount = getAccount(userId, account);
    if (vAccount != null) {
      previousName = vAccount.previousName;
    }
    return previousName;
  }
}
origin: android-hacker/VirtualXposed

@Override
public String getPassword(int userId, Account account) {
  if (account == null) throw new IllegalArgumentException("account is null");
  synchronized (accountsByUserId) {
    VAccount vAccount = getAccount(userId, account);
    if (vAccount != null) {
      return vAccount.password;
    }
    return null;
  }
}
origin: android-hacker/VirtualXposed

@Override
public String getUserData(int userId, Account account, String key) {
  if (account == null) throw new IllegalArgumentException("account is null");
  if (key == null) throw new IllegalArgumentException("key is null");
  synchronized (accountsByUserId) {
    VAccount vAccount = getAccount(userId, account);
    if (vAccount != null) {
      return vAccount.userDatas.get(key);
    }
    return null;
  }
}
origin: android-hacker/VirtualXposed

@Override
public String peekAuthToken(int userId, Account account, String authTokenType) {
  if (account == null) throw new IllegalArgumentException("account is null");
  if (authTokenType == null) throw new IllegalArgumentException("authTokenType is null");
  synchronized (accountsByUserId) {
    VAccount vAccount = getAccount(userId, account);
    if (vAccount != null) {
      return vAccount.authTokens.get(authTokenType);
    }
    return null;
  }
}
origin: android-hacker/VirtualXposed

@Override
public void setUserData(int userId, Account account, String key, String value) {
  if (key == null) throw new IllegalArgumentException("key is null");
  if (account == null) throw new IllegalArgumentException("account is null");
  VAccount vAccount = getAccount(userId, account);
  if (vAccount != null) {
    synchronized (accountsByUserId) {
      vAccount.userDatas.put(key, value);
      saveAllAccounts();
    }
  }
}
origin: android-hacker/VirtualXposed

@Override
public void setAuthToken(int userId, Account account, String authTokenType, String authToken) {
  if (account == null) throw new IllegalArgumentException("account is null");
  if (authTokenType == null) throw new IllegalArgumentException("authTokenType is null");
  synchronized (accountsByUserId) {
    VAccount vAccount = getAccount(userId, account);
    if (vAccount != null) {
      // FIXME: cancelNotification
      vAccount.authTokens.put(authTokenType, authToken);
      this.saveAllAccounts();
    }
  }
}
origin: android-hacker/VirtualXposed

@Override
public boolean accountAuthenticated(int userId, final Account account) {
  if (account == null) {
    throw new IllegalArgumentException("account is null");
  }
  synchronized (accountsByUserId) {
    VAccount vAccount = getAccount(userId, account);
    if (vAccount != null) {
      vAccount.lastAuthenticatedTime = System.currentTimeMillis();
      saveAllAccounts();
      return true;
    }
    return false;
  }
}
origin: android-hacker/VirtualXposed

private void setPasswordInternal(int userId, Account account, String password) {
  synchronized (accountsByUserId) {
    VAccount vAccount = getAccount(userId, account);
    if (vAccount != null) {
      vAccount.password = password;
      vAccount.authTokens.clear();
      saveAllAccounts();
      synchronized (authTokenRecords) {
        Iterator<AuthTokenRecord> iterator = authTokenRecords.iterator();
        while (iterator.hasNext()) {
          AuthTokenRecord record = iterator.next();
          if (record.userId == userId && record.account.equals(account)) {
            iterator.remove();
          }
        }
      }
      sendAccountsChangedBroadcast(userId);
    }
  }
}
origin: android-hacker/VirtualXposed

private Account renameAccountInternal(int userId, Account accountToRename, String newName) {
  // TODO: Cancel Notification
  synchronized (accountsByUserId) {
    VAccount vAccount = getAccount(userId, accountToRename);
    if (vAccount != null) {
      vAccount.previousName = vAccount.name;
      vAccount.name = newName;
      saveAllAccounts();
      Account newAccount = new Account(vAccount.name, vAccount.type);
      synchronized (authTokenRecords) {
        for (AuthTokenRecord record : authTokenRecords) {
          if (record.userId == userId && record.account.equals(accountToRename)) {
            record.account = newAccount;
          }
        }
      }
      sendAccountsChangedBroadcast(userId);
      return newAccount;
    }
  }
  return accountToRename;
}
origin: android-hacker/VirtualXposed

VAccount vAccount;
synchronized (accountsByUserId) {
  vAccount = getAccount(userId, account);
origin: bzsome/VirtualApp-x326

@Override
public final String getPreviousName(int userId, Account account) {
  if (account == null) throw new IllegalArgumentException("account is null");
  synchronized (accountsByUserId) {
    String previousName = null;
    VAccount vAccount = getAccount(userId, account);
    if (vAccount != null) {
      previousName = vAccount.previousName;
    }
    return previousName;
  }
}
origin: bzsome/VirtualApp-x326

@Override
public String getPassword(int userId, Account account) {
  if (account == null) throw new IllegalArgumentException("account is null");
  synchronized (accountsByUserId) {
    VAccount vAccount = getAccount(userId, account);
    if (vAccount != null) {
      return vAccount.password;
    }
    return null;
  }
}
origin: darkskygit/VirtualApp

@Override
public String getPassword(int userId, Account account) {
  if (account == null) throw new IllegalArgumentException("account is null");
  synchronized (accountsByUserId) {
    VAccount vAccount = getAccount(userId, account);
    if (vAccount != null) {
      return vAccount.password;
    }
    return null;
  }
}
origin: darkskygit/VirtualApp

@Override
public final String getPreviousName(int userId, Account account) {
  if (account == null) throw new IllegalArgumentException("account is null");
  synchronized (accountsByUserId) {
    String previousName = null;
    VAccount vAccount = getAccount(userId, account);
    if (vAccount != null) {
      previousName = vAccount.previousName;
    }
    return previousName;
  }
}
origin: darkskygit/VirtualApp

@Override
public String getUserData(int userId, Account account, String key) {
  if (account == null) throw new IllegalArgumentException("account is null");
  if (key == null) throw new IllegalArgumentException("key is null");
  synchronized (accountsByUserId) {
    VAccount vAccount = getAccount(userId, account);
    if (vAccount != null) {
      return vAccount.userDatas.get(key);
    }
    return null;
  }
}
origin: darkskygit/VirtualApp

@Override
public String peekAuthToken(int userId, Account account, String authTokenType) {
  if (account == null) throw new IllegalArgumentException("account is null");
  if (authTokenType == null) throw new IllegalArgumentException("authTokenType is null");
  synchronized (accountsByUserId) {
    VAccount vAccount = getAccount(userId, account);
    if (vAccount != null) {
      return vAccount.authTokens.get(authTokenType);
    }
    return null;
  }
}
origin: bzsome/VirtualApp-x326

@Override
public String getUserData(int userId, Account account, String key) {
  if (account == null) throw new IllegalArgumentException("account is null");
  if (key == null) throw new IllegalArgumentException("key is null");
  synchronized (accountsByUserId) {
    VAccount vAccount = getAccount(userId, account);
    if (vAccount != null) {
      return vAccount.userDatas.get(key);
    }
    return null;
  }
}
origin: darkskygit/VirtualApp

@Override
public void setUserData(int userId, Account account, String key, String value) {
  if (key == null) throw new IllegalArgumentException("key is null");
  if (account == null) throw new IllegalArgumentException("account is null");
  VAccount vAccount = getAccount(userId, account);
  if (vAccount != null) {
    synchronized (accountsByUserId) {
      vAccount.userDatas.put(key, value);
      saveAllAccounts();
    }
  }
}
origin: bzsome/VirtualApp-x326

@Override
public void setUserData(int userId, Account account, String key, String value) {
  if (key == null) throw new IllegalArgumentException("key is null");
  if (account == null) throw new IllegalArgumentException("account is null");
  VAccount vAccount = getAccount(userId, account);
  if (vAccount != null) {
    synchronized (accountsByUserId) {
      vAccount.userDatas.put(key, value);
      saveAllAccounts();
    }
  }
}
com.lody.virtual.server.accountsVAccountManagerServicegetAccount

Popular methods of VAccountManagerService

  • <init>
  • broadcastCheckInNowIfNeed
  • generateServicesMap
  • get
  • getAccountList
  • getAccounts
  • getAuthenticatorInfo
  • getCustomAuthToken
  • insertAccountIntoDatabase
  • onResult
  • parseAuthenticatorDescription
  • readAllAccounts
    Read all accounts from file.
  • parseAuthenticatorDescription,
  • readAllAccounts,
  • refreshAuthenticatorCache,
  • removeAccountInternal,
  • renameAccountInternal,
  • saveAllAccounts,
  • sendAccountsChangedBroadcast,
  • setPasswordInternal,
  • systemReady

Popular in Java

  • Reactive rest calls using spring rest template
  • getContentResolver (Context)
  • getSharedPreferences (Context)
  • getExternalFilesDir (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now