Codota Logo
VUserHandle.getIdentifier
Code IndexAdd Codota to your IDE (free)

How to use
getIdentifier
method
in
com.lody.virtual.os.VUserHandle

Best Java code snippets using com.lody.virtual.os.VUserHandle.getIdentifier (Showing top 18 results out of 315)

  • Common ways to obtain VUserHandle
private void myMethod () {
VUserHandle v =
  • Codota Iconnew VUserHandle(h)
  • Codota IconSparseArray sparseArray;sparseArray.get(key)
  • Codota IconRemoteCallbackList remoteCallbackList;(VUserHandle) remoteCallbackList.getBroadcastCookie(index)
  • Smart code suggestions by Codota
}
origin: android-hacker/VirtualXposed

/**
 * Return the serial number for a user.  This is a device-unique
 * number assigned to that user; if the user is deleted and then a new
 * user created, the new users will not be given the same serial number.
 * @param user The user whose serial number is to be retrieved.
 * @return The serial number of the given user; returns -1 if the
 * given VUserHandle does not exist.
 * @see #getUserForSerialNumber(long)
 */
public long getSerialNumberForUser(VUserHandle user) {
  return getUserSerialNumber(user.getIdentifier());
}
origin: android-hacker/VirtualXposed

public void sendBroadcastAsUser(Intent intent, VUserHandle user, String permission) {
  SpecialComponentList.protectIntent(intent);
  Context context = VirtualCore.get().getContext();
  if (user != null) {
    intent.putExtra("_VA_|_user_id_", user.getIdentifier());
  }
  // TODO: checkPermission
  context.sendBroadcast(intent);
}
origin: android-hacker/VirtualXposed

public void sendBroadcastAsUser(Intent intent, VUserHandle user) {
  SpecialComponentList.protectIntent(intent);
  Context context = VirtualCore.get().getContext();
  if (user != null) {
    intent.putExtra("_VA_|_user_id_", user.getIdentifier());
  }
  context.sendBroadcast(intent);
}
origin: android-hacker/VirtualXposed

public boolean bindServiceAsUser(Intent service, ServiceConnection connection, int flags, VUserHandle user) {
  service = new Intent(service);
  if (user != null) {
    service.putExtra("_VA_|_user_id_", user.getIdentifier());
  }
  return VirtualCore.get().getContext().bindService(service, connection, flags);
}
origin: android-hacker/VirtualXposed

public void sendOrderedBroadcastAsUser(Intent intent, VUserHandle user, String receiverPermission,
                    BroadcastReceiver resultReceiver, Handler scheduler, int initialCode,
                    String initialData, Bundle initialExtras) {
  Context context = VirtualCore.get().getContext();
  if (user != null) {
    intent.putExtra("_VA_|_user_id_", user.getIdentifier());
  }
  // TODO: checkPermission
  context.sendOrderedBroadcast(intent, null/* permission */, resultReceiver, scheduler, initialCode, initialData,
      initialExtras);
}
origin: android-hacker/VirtualXposed

@Override
public void handleMessage(Message msg) {
  final int userId = msg.arg2;
  final int n = mCallbacks.beginBroadcast();
  for (int i = 0; i < n; i++) {
    final IPackageInstallerCallback callback = mCallbacks.getBroadcastItem(i);
    final VUserHandle user = (VUserHandle) mCallbacks.getBroadcastCookie(i);
    // TODO: dispatch notifications for slave profiles
    if (userId == user.getIdentifier()) {
      try {
        invokeCallback(callback, msg);
      } catch (RemoteException ignored) {
      }
    }
  }
  mCallbacks.finishBroadcast();
}
origin: darkskygit/VirtualApp

/**
 * Return the serial number for a user.  This is a device-unique
 * number assigned to that user; if the user is deleted and then a new
 * user created, the new users will not be given the same serial number.
 * @param user The user whose serial number is to be retrieved.
 * @return The serial number of the given user; returns -1 if the
 * given VUserHandle does not exist.
 * @see #getUserForSerialNumber(long)
 */
public long getSerialNumberForUser(VUserHandle user) {
  return getUserSerialNumber(user.getIdentifier());
}
origin: bzsome/VirtualApp-x326

/**
 * Return the serial number for a user.  This is a device-unique
 * number assigned to that user; if the user is deleted and then a new
 * user created, the new users will not be given the same serial number.
 * @param user The user whose serial number is to be retrieved.
 * @return The serial number of the given user; returns -1 if the
 * given VUserHandle does not exist.
 * @see #getUserForSerialNumber(long)
 */
public long getSerialNumberForUser(VUserHandle user) {
  return getUserSerialNumber(user.getIdentifier());
}
origin: darkskygit/VirtualApp

public void sendBroadcastAsUser(Intent intent, VUserHandle user) {
  SpecialComponentList.protectIntent(intent);
  Context context = VirtualCore.get().getContext();
  if (user != null) {
    intent.putExtra("_VA_|_user_id_", user.getIdentifier());
  }
  context.sendBroadcast(intent);
}
origin: darkskygit/VirtualApp

public void sendBroadcastAsUser(Intent intent, VUserHandle user, String permission) {
  SpecialComponentList.protectIntent(intent);
  Context context = VirtualCore.get().getContext();
  if (user != null) {
    intent.putExtra("_VA_|_user_id_", user.getIdentifier());
  }
  // TODO: checkPermission
  context.sendBroadcast(intent);
}
origin: bzsome/VirtualApp-x326

public void sendBroadcastAsUser(Intent intent, VUserHandle user, String permission) {
  SpecialComponentList.protectIntent(intent);
  Context context = VirtualCore.get().getContext();
  if (user != null) {
    intent.putExtra("_VA_|_user_id_", user.getIdentifier());
  }
  // TODO: checkPermission
  context.sendBroadcast(intent);
}
origin: darkskygit/VirtualApp

public boolean bindServiceAsUser(Intent service, ServiceConnection connection, int flags, VUserHandle user) {
  service = new Intent(service);
  if (user != null) {
    service.putExtra("_VA_|_user_id_", user.getIdentifier());
  }
  return VirtualCore.get().getContext().bindService(service, connection, flags);
}
origin: bzsome/VirtualApp-x326

public boolean bindServiceAsUser(Intent service, ServiceConnection connection, int flags, VUserHandle user) {
  service = new Intent(service);
  if (user != null) {
    service.putExtra("_VA_|_user_id_", user.getIdentifier());
  }
  return VirtualCore.get().getContext().bindService(service, connection, flags);
}
origin: bzsome/VirtualApp-x326

public void sendBroadcastAsUser(Intent intent, VUserHandle user) {
  SpecialComponentList.protectIntent(intent);
  Context context = VirtualCore.get().getContext();
  if (user != null) {
    intent.putExtra("_VA_|_user_id_", user.getIdentifier());
  }
  context.sendBroadcast(intent);
}
origin: bzsome/VirtualApp-x326

public void sendOrderedBroadcastAsUser(Intent intent, VUserHandle user, String receiverPermission,
                    BroadcastReceiver resultReceiver, Handler scheduler, int initialCode,
                    String initialData, Bundle initialExtras) {
  Context context = VirtualCore.get().getContext();
  if (user != null) {
    intent.putExtra("_VA_|_user_id_", user.getIdentifier());
  }
  // TODO: checkPermission
  context.sendOrderedBroadcast(intent, null/* permission */, resultReceiver, scheduler, initialCode, initialData,
      initialExtras);
}
origin: darkskygit/VirtualApp

public void sendOrderedBroadcastAsUser(Intent intent, VUserHandle user, String receiverPermission,
                    BroadcastReceiver resultReceiver, Handler scheduler, int initialCode,
                    String initialData, Bundle initialExtras) {
  Context context = VirtualCore.get().getContext();
  if (user != null) {
    intent.putExtra("_VA_|_user_id_", user.getIdentifier());
  }
  // TODO: checkPermission
  context.sendOrderedBroadcast(intent, null/* permission */, resultReceiver, scheduler, initialCode, initialData,
      initialExtras);
}
origin: darkskygit/VirtualApp

@Override
public void handleMessage(Message msg) {
  final int userId = msg.arg2;
  final int n = mCallbacks.beginBroadcast();
  for (int i = 0; i < n; i++) {
    final IPackageInstallerCallback callback = mCallbacks.getBroadcastItem(i);
    final VUserHandle user = (VUserHandle) mCallbacks.getBroadcastCookie(i);
    // TODO: dispatch notifications for slave profiles
    if (userId == user.getIdentifier()) {
      try {
        invokeCallback(callback, msg);
      } catch (RemoteException ignored) {
      }
    }
  }
  mCallbacks.finishBroadcast();
}
origin: bzsome/VirtualApp-x326

@Override
public void handleMessage(Message msg) {
  final int userId = msg.arg2;
  final int n = mCallbacks.beginBroadcast();
  for (int i = 0; i < n; i++) {
    final IPackageInstallerCallback callback = mCallbacks.getBroadcastItem(i);
    final VUserHandle user = (VUserHandle) mCallbacks.getBroadcastCookie(i);
    // TODO: dispatch notifications for slave profiles
    if (userId == user.getIdentifier()) {
      try {
        invokeCallback(callback, msg);
      } catch (RemoteException ignored) {
      }
    }
  }
  mCallbacks.finishBroadcast();
}
com.lody.virtual.osVUserHandlegetIdentifier

Javadoc

Returns the userId stored in this VUserHandle.

Popular methods of VUserHandle

  • <init>
    Instantiate a new VUserHandle from the data in a Parcel that was previously written with #writeToPar
  • equals
  • formatUid
  • getAppId
    Returns the app id (or base vuid) for a given vuid, stripping out the user id from it.
  • getCallingUserId
  • 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

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • onCreateOptionsMenu (Activity)
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
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