congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SparseArray.valueAt
Code IndexAdd Tabnine to your IDE (free)

How to use
valueAt
method
in
com.lody.virtual.helper.collection.SparseArray

Best Java code snippets using com.lody.virtual.helper.collection.SparseArray.valueAt (Showing top 20 results out of 315)

origin: android-hacker/VirtualXposed

@Override
public void killAllApps() {
  synchronized (mPidsSelfLocked) {
    for (int i = 0; i < mPidsSelfLocked.size(); i++) {
      ProcessRecord r = mPidsSelfLocked.valueAt(i);
      killProcess(r.pid);
    }
  }
}
origin: android-hacker/VirtualXposed

@Override
public boolean isAppRunning(String packageName, int userId) {
  boolean running = false;
  synchronized (mPidsSelfLocked) {
    int N = mPidsSelfLocked.size();
    while (N-- > 0) {
      ProcessRecord r = mPidsSelfLocked.valueAt(N);
      if (r.userId == userId && r.info.packageName.equals(packageName)) {
        running = true;
        break;
      }
    }
    return running;
  }
}
origin: android-hacker/VirtualXposed

private int queryFreeStubProcessLocked() {
  for (int vpid = 0; vpid < VASettings.STUB_COUNT; vpid++) {
    int N = mPidsSelfLocked.size();
    boolean using = false;
    while (N-- > 0) {
      ProcessRecord r = mPidsSelfLocked.valueAt(N);
      if (r.vpid == vpid) {
        using = true;
        break;
      }
    }
    if (using) {
      continue;
    }
    return vpid;
  }
  return -1;
}
origin: android-hacker/VirtualXposed

buffer.append(key);
buffer.append('=');
Object value = valueAt(i);
if (value != this) {
  buffer.append(value);
origin: android-hacker/VirtualXposed

@Override
public void writePersistenceData(Parcel p) {
  SparseArray<VDeviceInfo> infos = mService.getDeviceInfos();
  int size = infos.size();
  p.writeInt(size);
  for (int i = 0; i < size; i++) {
    int userId = infos.keyAt(i);
    VDeviceInfo info = infos.valueAt(i);
    p.writeInt(userId);
    info.writeToParcel(p, 0);
  }
}
origin: android-hacker/VirtualXposed

public int stopUser(int userHandle, IStopUserCallback.Stub stub) {
  synchronized (mPidsSelfLocked) {
    int N = mPidsSelfLocked.size();
    while (N-- > 0) {
      ProcessRecord r = mPidsSelfLocked.valueAt(N);
      if (r.userId == userHandle) {
        killProcess(r.pid);
      }
    }
  }
  try {
    stub.userStopped(userHandle);
  } catch (RemoteException e) {
    e.printStackTrace();
  }
  return 0;
}
origin: android-hacker/VirtualXposed

@Override
public void writePersistenceData(Parcel p) {
  mGlobalConfig.writeToParcel(p, 0);
  p.writeInt(mLocConfigs.size());
  for (int i = 0; i < mLocConfigs.size(); i++) {
    int userId = mLocConfigs.keyAt(i);
    Map<String, VLocConfig> pkgs = mLocConfigs.valueAt(i);
    p.writeInt(userId);
    p.writeMap(pkgs);
  }
}
origin: android-hacker/VirtualXposed

public VDeviceManagerService() {
  mPersistenceLayer.read();
  for (int i = 0; i < mDeviceInfos.size(); i++) {
    VDeviceInfo info = mDeviceInfos.valueAt(i);
    addDeviceInfoToPool(info);
  }
}
origin: android-hacker/VirtualXposed

@Override
public void killAppByPkg(final String pkg, int userId) {
  synchronized (mProcessNames) {
    ArrayMap<String, SparseArray<ProcessRecord>> map = mProcessNames.getMap();
    int N = map.size();
    while (N-- > 0) {
      SparseArray<ProcessRecord> uids = map.valueAt(N);
      for (int i = 0; i < uids.size(); i++) {
        ProcessRecord r = uids.valueAt(i);
        if (userId != VUserHandle.USER_ALL) {
          if (r.userId != userId) {
            continue;
          }
        }
        if (r.pkgList.contains(pkg)) {
          killProcess(r.pid);
        }
      }
    }
  }
}
origin: darkskygit/VirtualApp

@Override
public void killAllApps() {
  synchronized (mPidsSelfLocked) {
    for (int i = 0; i < mPidsSelfLocked.size(); i++) {
      ProcessRecord r = mPidsSelfLocked.valueAt(i);
      killProcess(r.pid);
    }
  }
}
origin: bzsome/VirtualApp-x326

@Override
public void killAllApps() {
  synchronized (mPidsSelfLocked) {
    for (int i = 0; i < mPidsSelfLocked.size(); i++) {
      ProcessRecord r = mPidsSelfLocked.valueAt(i);
      killProcess(r.pid);
    }
  }
}
origin: bzsome/VirtualApp-x326

@Override
public boolean isAppRunning(String packageName, int userId) {
  boolean running = false;
  synchronized (mPidsSelfLocked) {
    int N = mPidsSelfLocked.size();
    while (N-- > 0) {
      ProcessRecord r = mPidsSelfLocked.valueAt(N);
      if (r.userId == userId && r.info.packageName.equals(packageName)) {
        running = true;
        break;
      }
    }
    return running;
  }
}
origin: darkskygit/VirtualApp

@Override
public boolean isAppRunning(String packageName, int userId) {
  boolean running = false;
  synchronized (mPidsSelfLocked) {
    int N = mPidsSelfLocked.size();
    while (N-- > 0) {
      ProcessRecord r = mPidsSelfLocked.valueAt(N);
      if (r.userId == userId && r.info.packageName.equals(packageName)) {
        running = true;
        break;
      }
    }
    return running;
  }
}
origin: bzsome/VirtualApp-x326

@Override
public void writePersistenceData(Parcel p) {
  SparseArray<VDeviceInfo> infos = mService.getDeviceInfos();
  int size = infos.size();
  p.writeInt(size);
  for (int i = 0; i < size; i++) {
    int userId = infos.keyAt(i);
    VDeviceInfo info = infos.valueAt(i);
    p.writeInt(userId);
    info.writeToParcel(p, 0);
  }
}
origin: darkskygit/VirtualApp

@Override
public void writePersistenceData(Parcel p) {
  SparseArray<VDeviceInfo> infos = mService.getDeviceInfos();
  int size = infos.size();
  p.writeInt(size);
  for (int i = 0; i < size; i++) {
    int userId = infos.keyAt(i);
    VDeviceInfo info = infos.valueAt(i);
    p.writeInt(userId);
    info.writeToParcel(p, 0);
  }
}
origin: darkskygit/VirtualApp

@Override
public void writePersistenceData(Parcel p) {
  mGlobalConfig.writeToParcel(p, 0);
  p.writeInt(mLocConfigs.size());
  for (int i = 0; i < mLocConfigs.size(); i++) {
    int userId = mLocConfigs.keyAt(i);
    Map<String, VLocConfig> pkgs = mLocConfigs.valueAt(i);
    p.writeInt(userId);
    p.writeMap(pkgs);
  }
}
origin: bzsome/VirtualApp-x326

public VDeviceManagerService() {
  mPersistenceLayer.read();
  for (int i = 0; i < mDeviceInfos.size(); i++) {
    VDeviceInfo info = mDeviceInfos.valueAt(i);
    addDeviceInfoToPool(info);
  }
}
origin: darkskygit/VirtualApp

public int stopUser(int userHandle, IStopUserCallback.Stub stub) {
  synchronized (mPidsSelfLocked) {
    int N = mPidsSelfLocked.size();
    while (N-- > 0) {
      ProcessRecord r = mPidsSelfLocked.valueAt(N);
      if (r.userId == userHandle) {
        killProcess(r.pid);
      }
    }
  }
  try {
    stub.userStopped(userHandle);
  } catch (RemoteException e) {
    e.printStackTrace();
  }
  return 0;
}
origin: darkskygit/VirtualApp

public VDeviceManagerService() {
  mPersistenceLayer.read();
  for (int i = 0; i < mDeviceInfos.size(); i++) {
    VDeviceInfo info = mDeviceInfos.valueAt(i);
    addDeviceInfoToPool(info);
  }
}
origin: bzsome/VirtualApp-x326

@Override
public void writePersistenceData(Parcel p) {
  mGlobalConfig.writeToParcel(p, 0);
  p.writeInt(mLocConfigs.size());
  for (int i = 0; i < mLocConfigs.size(); i++) {
    int userId = mLocConfigs.keyAt(i);
    Map<String, VLocConfig> pkgs = mLocConfigs.valueAt(i);
    p.writeInt(userId);
    p.writeMap(pkgs);
  }
}
com.lody.virtual.helper.collectionSparseArrayvalueAt

Javadoc

Given an index in the range 0...size()-1, returns the value from the indexth key-value mapping that this SparseArray stores.

Popular methods of SparseArray

  • <init>
    Creates a new SparseArray containing no mappings that will not require any additional memory allocat
  • clear
    Removes all key-value mappings from this SparseArray.
  • delete
    Removes the mapping from the specified key, if there was any.
  • gc
  • get
    Gets the Object mapped from the specified key, or the specified Object if no such mapping has been m
  • keyAt
    Given an index in the range 0...size()-1, returns the key from the indexth key-value mapping that th
  • put
    Adds a mapping from the specified key to the specified value, replacing the previous mapping from th
  • remove
    Alias for #delete(int).
  • removeAt
    Removes the mapping at the specified index.
  • removeReturnOld
  • size
    Returns the number of key-value mappings that this SparseArray currently stores.
  • size

Popular in Java

  • Making http requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • runOnUiThread (Activity)
  • addToBackStack (FragmentTransaction)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Reference (javax.naming)
  • JCheckBox (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top Sublime Text 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