Tabnine Logo
VUserHandle.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.lody.virtual.os.VUserHandle
constructor

Best Java code snippets using com.lody.virtual.os.VUserHandle.<init> (Showing top 20 results out of 315)

origin: android-hacker/VirtualXposed

/**
 * Read a VUserHandle from a Parcel that was previously written
 * with {@link #writeToParcel(VUserHandle, Parcel)}, returning either
 * a null or new object as appropriate.
 *
 * @param in The Parcel from which to read the VUserHandle
 * @return Returns a new VUserHandle matching the previously written
 * object, or null if a null had been written.
 *
 * @see #writeToParcel(VUserHandle, Parcel)
 */
public static VUserHandle readFromParcel(Parcel in) {
  int h = in.readInt();
  return h != USER_NULL ? new VUserHandle(h) : null;
}
origin: android-hacker/VirtualXposed

/**
 * Return the user associated with a serial number previously
 * returned by {@link #getSerialNumberForUser(VUserHandle)}.
 * @param serialNumber The serial number of the user that is being
 * retrieved.
 * @return Return the user associated with the serial number, or null
 * if there is not one.
 * @see #getSerialNumberForUser(VUserHandle)
 */
public VUserHandle getUserForSerialNumber(long serialNumber) {
  int ident = getUserHandle((int)serialNumber);
  return ident >= 0 ? new VUserHandle(ident) : null;
}
origin: android-hacker/VirtualXposed

public static VUserHandle myUserHandle() {
  return new VUserHandle(myUserId());
}

origin: android-hacker/VirtualXposed

public void register(IPackageInstallerCallback callback, int userId) {
  mCallbacks.register(callback, new VUserHandle(userId));
}
origin: android-hacker/VirtualXposed

/** @hide */
public static VUserHandle getCallingUserHandle() {
  int userId = getUserId(VBinder.getCallingUid());
  VUserHandle userHandle = userHandles.get(userId);
  // Intentionally not synchronized to save time
  if (userHandle == null) {
    userHandle = new VUserHandle(userId);
    userHandles.put(userId, userHandle);
  }
  return userHandle;
}
origin: android-hacker/VirtualXposed

private void sendUserInfoChangedBroadcast(int userId) {
  Intent changedIntent = new Intent(Constants.ACTION_USER_INFO_CHANGED);
  changedIntent.putExtra(Constants.EXTRA_USER_HANDLE, userId);
  changedIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
  VActivityManagerService.get().sendBroadcastAsUser(changedIntent, new VUserHandle(userId));
}
origin: android-hacker/VirtualXposed

private void broadcastCheckInNowIfNeed(int userId) {
  long time = System.currentTimeMillis();
  if (Math.abs(time - lastAccountChangeTime) > CHECK_IN_TIME) {
    lastAccountChangeTime = time;
    saveAllAccounts();
    Intent intent = new Intent("android.server.checkin.CHECKIN_NOW");
    VActivityManagerService.get().sendBroadcastAsUser(intent, new VUserHandle(userId));
  }
}
origin: android-hacker/VirtualXposed

  public static VUserHandle getCallingUserHandle() {
    return new VUserHandle(VUserHandle.getUserId(getCallingUid()));
  }
}
origin: android-hacker/VirtualXposed

public boolean performOptimize(String packageName, int userId) {
  VActivityManagerService.get().sendBroadcastAsUser(
      specifyApp(new Intent(Intent.ACTION_BOOT_COMPLETED), packageName, userId)
      , new VUserHandle(userId));
  return true;
}
origin: android-hacker/VirtualXposed

private void sendAccountsChangedBroadcast(int userId) {
  Intent intent = new Intent(AccountManager.LOGIN_ACCOUNTS_CHANGED_ACTION);
  VActivityManagerService.get().sendBroadcastAsUser(intent, new VUserHandle(userId));
  broadcastCheckInNowIfNeed(userId);
}
origin: darkskygit/VirtualApp

/**
 * Return the user associated with a serial number previously
 * returned by {@link #getSerialNumberForUser(VUserHandle)}.
 * @param serialNumber The serial number of the user that is being
 * retrieved.
 * @return Return the user associated with the serial number, or null
 * if there is not one.
 * @see #getSerialNumberForUser(VUserHandle)
 */
public VUserHandle getUserForSerialNumber(long serialNumber) {
  int ident = getUserHandle((int)serialNumber);
  return ident >= 0 ? new VUserHandle(ident) : null;
}
origin: bzsome/VirtualApp-x326

private void sendUserInfoChangedBroadcast(int userId) {
  Intent changedIntent = new Intent(Constants.ACTION_USER_INFO_CHANGED);
  changedIntent.putExtra(Constants.EXTRA_USER_HANDLE, userId);
  changedIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
  VActivityManagerService.get().sendBroadcastAsUser(changedIntent, new VUserHandle(userId));
}
origin: darkskygit/VirtualApp

private void sendUserInfoChangedBroadcast(int userId) {
  Intent changedIntent = new Intent(Constants.ACTION_USER_INFO_CHANGED);
  changedIntent.putExtra(Constants.EXTRA_USER_HANDLE, userId);
  changedIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
  VActivityManagerService.get().sendBroadcastAsUser(changedIntent, new VUserHandle(userId));
}
origin: bzsome/VirtualApp-x326

/** @hide */
public static VUserHandle getCallingUserHandle() {
  int userId = getUserId(VBinder.getCallingUid());
  VUserHandle userHandle = userHandles.get(userId);
  // Intentionally not synchronized to save time
  if (userHandle == null) {
    userHandle = new VUserHandle(userId);
    userHandles.put(userId, userHandle);
  }
  return userHandle;
}
origin: darkskygit/VirtualApp

/** @hide */
public static VUserHandle getCallingUserHandle() {
  int userId = getUserId(VBinder.getCallingUid());
  VUserHandle userHandle = userHandles.get(userId);
  // Intentionally not synchronized to save time
  if (userHandle == null) {
    userHandle = new VUserHandle(userId);
    userHandles.put(userId, userHandle);
  }
  return userHandle;
}
origin: bzsome/VirtualApp-x326

private void broadcastCheckInNowIfNeed(int userId) {
  long time = System.currentTimeMillis();
  if (Math.abs(time - lastAccountChangeTime) > CHECK_IN_TIME) {
    lastAccountChangeTime = time;
    saveAllAccounts();
    Intent intent = new Intent("android.server.checkin.CHECKIN_NOW");
    VActivityManagerService.get().sendBroadcastAsUser(intent, new VUserHandle(userId));
  }
}
origin: darkskygit/VirtualApp

  public static VUserHandle getCallingUserHandle() {
    return new VUserHandle(VUserHandle.getUserId(getCallingUid()));
  }
}
origin: bzsome/VirtualApp-x326

  public static VUserHandle getCallingUserHandle() {
    return new VUserHandle(VUserHandle.getUserId(getCallingUid()));
  }
}
origin: bzsome/VirtualApp-x326

private void sendAccountsChangedBroadcast(int userId) {
  Intent intent = new Intent(AccountManager.LOGIN_ACCOUNTS_CHANGED_ACTION);
  VActivityManagerService.get().sendBroadcastAsUser(intent, new VUserHandle(userId));
  broadcastCheckInNowIfNeed(userId);
}
origin: darkskygit/VirtualApp

public boolean performOptimize(String packageName, int userId) {
  VActivityManagerService.get().sendBroadcastAsUser(
      specifyApp(new Intent(Intent.ACTION_BOOT_COMPLETED), packageName, userId)
      , new VUserHandle(userId));
  return true;
}
com.lody.virtual.osVUserHandle<init>

Popular methods of VUserHandle

  • equals
  • formatUid
  • getAppId
    Returns the app id (or base vuid) for a given vuid, stripping out the user id from it.
  • getCallingUserId
  • getIdentifier
    Returns the userId stored in this VUserHandle.
  • getUid
    Returns the vuid that is composed from the userId and the appId.
  • getUserId
    Returns the user id for a given vuid.
  • myUserId
    Returns the user id of the current process
  • writeToParcel
    Write a VUserHandle to a Parcel, handling null pointers. Must be read with #readFromParcel(Parcel).
  • myAppId

Popular in Java

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • runOnUiThread (Activity)
  • startActivity (Activity)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JTable (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top plugins for WebStorm
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