Codota Logo
VBinder.getCallingUid
Code IndexAdd Codota to your IDE (free)

How to use
getCallingUid
method
in
com.lody.virtual.os.VBinder

Best Java code snippets using com.lody.virtual.os.VBinder.getCallingUid (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: android-hacker/VirtualXposed

/** @hide */
public static int getCallingUserId() {
  return getUserId(VBinder.getCallingUid());
}
origin: android-hacker/VirtualXposed

public static int getBaseCallingUid() {
  return VUserHandle.getAppId(getCallingUid());
}
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

@Override
public void cancelAll() throws RemoteException {
  int vuid = VBinder.getCallingUid();
  synchronized (mJobStore) {
    boolean changed = false;
    Iterator<Map.Entry<JobId, JobConfig>> iterator = mJobStore.entrySet().iterator();
    while (iterator.hasNext()) {
      Map.Entry<JobId, JobConfig> entry = iterator.next();
      JobId job = entry.getKey();
      if (job.vuid == vuid) {
        JobConfig config = entry.getValue();
        mScheduler.cancel(config.virtualJobId);
        changed = true;
        iterator.remove();
        break;
      }
    }
    if (changed) {
      saveJobs();
    }
  }
}
origin: android-hacker/VirtualXposed

@Override
public void cancel(int jobId) throws RemoteException {
  int vuid = VBinder.getCallingUid();
  synchronized (mJobStore) {
    boolean changed = false;
    Iterator<Map.Entry<JobId, JobConfig>> iterator = mJobStore.entrySet().iterator();
    while (iterator.hasNext()) {
      Map.Entry<JobId, JobConfig> entry = iterator.next();
      JobId job = entry.getKey();
      JobConfig config = entry.getValue();
      if (job.vuid == vuid && job.clientJobId == jobId) {
        changed = true;
        mScheduler.cancel(config.virtualJobId);
        iterator.remove();
        break;
      }
    }
    if (changed) {
      saveJobs();
    }
  }
}
origin: android-hacker/VirtualXposed

/**
 * Enforces that only the system UID or root's UID or apps that have the
 * {android.Manifest.permission.MANAGE_USERS MANAGE_USERS}
 * permission can make certain calls to the VUserManager.
 *
 * @param message used as message if SecurityException is thrown
 * @throws SecurityException if the caller is not system or root
 */
private static void checkManageUsersPermission(String message) {
  final int uid = VBinder.getCallingUid();
  if (uid != VirtualCore.get().myUid()) {
    throw new SecurityException("You need MANAGE_USERS permission to: " + message);
  }
}
origin: android-hacker/VirtualXposed

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

@Override
public List<JobInfo> getAllPendingJobs() throws RemoteException {
  int vuid = VBinder.getCallingUid();
  List<JobInfo> jobs = mScheduler.getAllPendingJobs();
  synchronized (mJobStore) {
    Iterator<JobInfo> iterator = jobs.listIterator();
    while (iterator.hasNext()) {
      JobInfo job = iterator.next();
      if (!VASettings.STUB_JOB.equals(job.getService().getClassName())) {
        // Schedule by Host, invisible in VA.
        iterator.remove();
        continue;
      }
      Map.Entry<JobId, JobConfig> jobEntry = findJobByVirtualJobId(job.getId());
      if (jobEntry == null) {
        iterator.remove();
        continue;
      }
      JobId jobId = jobEntry.getKey();
      JobConfig config = jobEntry.getValue();
      if (jobId.vuid != vuid) {
        iterator.remove();
        continue;
      }
      mirror.android.app.job.JobInfo.jobId.set(job, jobId.clientJobId);
      mirror.android.app.job.JobInfo.service.set(job, new ComponentName(jobId.packageName, config.serviceName));
    }
  }
  return jobs;
}
origin: android-hacker/VirtualXposed

private int createSessionInternal(SessionParams params, String installerPackageName, int userId)
    throws IOException {
  final int callingUid = VBinder.getCallingUid();
  final int sessionId;
  final PackageInstallerSession session;
  synchronized (mSessions) {
    // Sanity check that installer isn't going crazy
    final int activeCount = getSessionCount(mSessions, callingUid);
    if (activeCount >= MAX_ACTIVE_SESSIONS) {
      throw new IllegalStateException(
          "Too many active sessions for UID " + callingUid);
    }
    sessionId = allocateSessionIdLocked();
    session = new PackageInstallerSession(mInternalCallback, mContext, mInstallHandler.getLooper(), installerPackageName, sessionId, userId, callingUid, params, VEnvironment.getPackageInstallerStageDir());
  }
  mCallbacks.notifySessionCreated(session.sessionId, session.userId);
  return sessionId;
}
origin: android-hacker/VirtualXposed

@Override
public int schedule(JobInfo job) throws RemoteException {
  int vuid = VBinder.getCallingUid();
  int id = job.getId();
  ComponentName service = job.getService();
  JobId jobId = new JobId(vuid, service.getPackageName(), id);
  JobConfig config = mJobStore.get(jobId);
  if (config == null) {
    config = new JobConfig(mGlobalJobId++, service.getClassName(), job.getExtras());
    mJobStore.put(jobId, config);
  } else {
    config.serviceName = service.getClassName();
    config.extras = job.getExtras();
  }
  saveJobs();
  mirror.android.app.job.JobInfo.jobId.set(job, config.virtualJobId);
  mirror.android.app.job.JobInfo.service.set(job, mJobProxyComponent);
  return mScheduler.schedule(job);
}
origin: android-hacker/VirtualXposed

final boolean customTokens = info.desc.customTokens;
loginOptions.putInt(AccountManager.KEY_CALLER_UID, VBinder.getCallingUid());
loginOptions.putInt(AccountManager.KEY_CALLER_PID, Binder.getCallingPid());
if (notifyOnAuthFailure) {
origin: darkskygit/VirtualApp

/** @hide */
public static int getCallingUserId() {
  return getUserId(VBinder.getCallingUid());
}
origin: bzsome/VirtualApp-x326

/** @hide */
public static int getCallingUserId() {
  return getUserId(VBinder.getCallingUid());
}
origin: darkskygit/VirtualApp

public static int getBaseCallingUid() {
  return VUserHandle.getAppId(getCallingUid());
}
origin: bzsome/VirtualApp-x326

public static int getBaseCallingUid() {
  return VUserHandle.getAppId(getCallingUid());
}
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: darkskygit/VirtualApp

/**
 * Enforces that only the system UID or root's UID or apps that have the
 * {android.Manifest.permission.MANAGE_USERS MANAGE_USERS}
 * permission can make certain calls to the VUserManager.
 *
 * @param message used as message if SecurityException is thrown
 * @throws SecurityException if the caller is not system or root
 */
private static void checkManageUsersPermission(String message) {
  final int uid = VBinder.getCallingUid();
  if (uid != VirtualCore.get().myUid()) {
    throw new SecurityException("You need MANAGE_USERS permission to: " + message);
  }
}
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()));
  }
}
com.lody.virtual.osVBindergetCallingUid

Popular methods of VBinder

  • getCallingPid

Popular in Java

  • Reading from database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • getSystemService (Context)
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • BoxLayout (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
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