Tabnine Logo
VAccountManagerService.getAccount
Code IndexAdd Tabnine 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)

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 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 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 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

  • Parsing JSON documents to java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • onCreateOptionsMenu (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top PhpStorm 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