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

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

Best Java code snippets using com.lody.virtual.server.accounts.VAccountManagerService.sendAccountsChangedBroadcast (Showing top 12 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 boolean removeAccountInternal(int userId, Account account) {
  List<VAccount> accounts = accountsByUserId.get(userId);
  if (accounts != null) {
    Iterator<VAccount> iterator = accounts.iterator();
    while (iterator.hasNext()) {
      VAccount vAccount = iterator.next();
      if (userId == vAccount.userId
          && TextUtils.equals(vAccount.name, account.name)
          && TextUtils.equals(account.type, vAccount.type)) {
        iterator.remove();
        saveAllAccounts();
        sendAccountsChangedBroadcast(userId);
        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 boolean insertAccountIntoDatabase(int userId, Account account, String password, Bundle extras) {
  if (account == null) {
    return false;
  }
  synchronized (accountsByUserId) {
    VAccount vAccount = new VAccount(userId, account);
    vAccount.password = password;
    // convert the [Bundle] to [Map<String, String>]
    if (extras != null) {
      for (String key : extras.keySet()) {
        Object value = extras.get(key);
        if (value instanceof String) {
          vAccount.userDatas.put(key, (String) value);
        }
      }
    }
    List<VAccount> accounts = accountsByUserId.get(userId);
    if (accounts == null) {
      accounts = new ArrayList<>();
      accountsByUserId.put(userId, accounts);
    }
    accounts.add(vAccount);
    saveAllAccounts();
    sendAccountsChangedBroadcast(vAccount.userId);
    return true;
  }
}
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: darkskygit/VirtualApp

private boolean removeAccountInternal(int userId, Account account) {
  List<VAccount> accounts = accountsByUserId.get(userId);
  if (accounts != null) {
    Iterator<VAccount> iterator = accounts.iterator();
    while (iterator.hasNext()) {
      VAccount vAccount = iterator.next();
      if (userId == vAccount.userId
          && TextUtils.equals(vAccount.name, account.name)
          && TextUtils.equals(account.type, vAccount.type)) {
        iterator.remove();
        saveAllAccounts();
        sendAccountsChangedBroadcast(userId);
        return true;
      }
    }
  }
  return false;
}
origin: bzsome/VirtualApp-x326

private boolean removeAccountInternal(int userId, Account account) {
  List<VAccount> accounts = accountsByUserId.get(userId);
  if (accounts != null) {
    Iterator<VAccount> iterator = accounts.iterator();
    while (iterator.hasNext()) {
      VAccount vAccount = iterator.next();
      if (userId == vAccount.userId
          && TextUtils.equals(vAccount.name, account.name)
          && TextUtils.equals(account.type, vAccount.type)) {
        iterator.remove();
        saveAllAccounts();
        sendAccountsChangedBroadcast(userId);
        return true;
      }
    }
  }
  return false;
}
origin: bzsome/VirtualApp-x326

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: darkskygit/VirtualApp

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: darkskygit/VirtualApp

private boolean insertAccountIntoDatabase(int userId, Account account, String password, Bundle extras) {
  if (account == null) {
    return false;
  }
  synchronized (accountsByUserId) {
    VAccount vAccount = new VAccount(userId, account);
    vAccount.password = password;
    // convert the [Bundle] to [Map<String, String>]
    if (extras != null) {
      for (String key : extras.keySet()) {
        Object value = extras.get(key);
        if (value instanceof String) {
          vAccount.userDatas.put(key, (String) value);
        }
      }
    }
    List<VAccount> accounts = accountsByUserId.get(userId);
    if (accounts == null) {
      accounts = new ArrayList<>();
      accountsByUserId.put(userId, accounts);
    }
    accounts.add(vAccount);
    saveAllAccounts();
    sendAccountsChangedBroadcast(vAccount.userId);
    return true;
  }
}
origin: bzsome/VirtualApp-x326

private boolean insertAccountIntoDatabase(int userId, Account account, String password, Bundle extras) {
  if (account == null) {
    return false;
  }
  synchronized (accountsByUserId) {
    VAccount vAccount = new VAccount(userId, account);
    vAccount.password = password;
    // convert the [Bundle] to [Map<String, String>]
    if (extras != null) {
      for (String key : extras.keySet()) {
        Object value = extras.get(key);
        if (value instanceof String) {
          vAccount.userDatas.put(key, (String) value);
        }
      }
    }
    List<VAccount> accounts = accountsByUserId.get(userId);
    if (accounts == null) {
      accounts = new ArrayList<>();
      accountsByUserId.put(userId, accounts);
    }
    accounts.add(vAccount);
    saveAllAccounts();
    sendAccountsChangedBroadcast(vAccount.userId);
    return true;
  }
}
origin: darkskygit/VirtualApp

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: bzsome/VirtualApp-x326

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;
}
com.lody.virtual.server.accountsVAccountManagerServicesendAccountsChangedBroadcast

Popular methods of VAccountManagerService

  • <init>
  • broadcastCheckInNowIfNeed
  • generateServicesMap
  • get
  • getAccount
  • getAccountList
  • getAccounts
  • getAuthenticatorInfo
  • getCustomAuthToken
  • insertAccountIntoDatabase
  • onResult
  • parseAuthenticatorDescription
  • onResult,
  • parseAuthenticatorDescription,
  • readAllAccounts,
  • refreshAuthenticatorCache,
  • removeAccountInternal,
  • renameAccountInternal,
  • saveAllAccounts,
  • setPasswordInternal,
  • systemReady

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
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