Tabnine Logo
ServiceRecord
Code IndexAdd Tabnine to your IDE (free)

How to use
ServiceRecord
in
com.lody.virtual.server.am

Best Java code snippets using com.lody.virtual.server.am.ServiceRecord (Showing top 20 results out of 315)

origin: android-hacker/VirtualXposed

  return 0;
ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(service);
r.addToBoundIntent(service, connection);
return 1;
origin: android-hacker/VirtualXposed

private ServiceRecord findRecordLocked(IServiceConnection connection) {
  synchronized (mHistory) {
    for (ServiceRecord r : mHistory) {
      if (r.containConnection(connection)) {
        return r;
      }
    }
    return null;
  }
}
origin: android-hacker/VirtualXposed

@Override
public VParceledListSlice<ActivityManager.RunningServiceInfo> getServices(int maxNum, int flags, int userId) {
  synchronized (mHistory) {
    List<ActivityManager.RunningServiceInfo> services = new ArrayList<>(mHistory.size());
    for (ServiceRecord r : mHistory) {
      if (r.process.userId != userId) {
        continue;
      }
      ActivityManager.RunningServiceInfo info = new ActivityManager.RunningServiceInfo();
      info.uid = r.process.vuid;
      info.pid = r.process.pid;
      ProcessRecord processRecord = findProcessLocked(r.process.pid);
      if (processRecord != null) {
        info.process = processRecord.processName;
        info.clientPackage = processRecord.info.packageName;
      }
      info.activeSince = r.activeSince;
      info.lastActivityTime = r.lastActivityTime;
      info.clientCount = r.getClientCount();
      info.service = ComponentUtils.toComponentName(r.serviceInfo);
      info.started = r.startId > 0;
      services.add(info);
    }
    return new VParceledListSlice<>(services);
  }
}
origin: android-hacker/VirtualXposed

@Override
public void unbindFinished(IBinder token, Intent service, boolean doRebind, int userId) {
  synchronized (this) {
    ServiceRecord r = (ServiceRecord) token;
    if (r != null) {
      ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(service);
      if (boundRecord != null) {
        boundRecord.doRebind = doRebind;
      }
    }
  }
}
origin: android-hacker/VirtualXposed

ServiceRecord r = findRecordLocked(userId, serviceInfo);
if (r == null) {
  r = new ServiceRecord();
  r.startId = 0;
  r.activeSince = SystemClock.elapsedRealtime();
origin: android-hacker/VirtualXposed

if (r.startId <= 0 && r.getConnectionCount() <= 0) {
  try {
    IApplicationThreadCompat.scheduleStopService(r.process.appThread, r);
origin: android-hacker/VirtualXposed

void addToBoundIntent(Intent intent, IServiceConnection connection) {
  IntentBindRecord record = peekBinding(intent);
  if (record == null) {
    record = new IntentBindRecord();
    record.intent = intent;
    synchronized (bindings) {
      bindings.add(record);
    }
  }
  record.addConnection(connection);
}
origin: bzsome/VirtualApp-x326

ServiceRecord r = findRecordLocked(userId, serviceInfo);
if (r == null) {
  r = new ServiceRecord();
  r.startId = 0;
  r.activeSince = SystemClock.elapsedRealtime();
origin: darkskygit/VirtualApp

if (r.startId <= 0 && r.getConnectionCount() <= 0) {
  try {
    IApplicationThreadCompat.scheduleStopService(r.process.appThread, r);
origin: android-hacker/VirtualXposed

@Override
public void publishService(IBinder token, Intent intent, IBinder service, int userId) {
  synchronized (this) {
    ServiceRecord r = (ServiceRecord) token;
    if (r != null) {
      ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(intent);
      if (boundRecord != null) {
        boundRecord.binder = service;
        for (IServiceConnection conn : boundRecord.connections) {
          ComponentName component = ComponentUtils.toComponentName(r.serviceInfo);
          connectService(conn, component, boundRecord, false);
        }
      }
    }
  }
}
origin: darkskygit/VirtualApp

  return 0;
ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(service);
r.addToBoundIntent(service, connection);
return 1;
origin: darkskygit/VirtualApp

private ServiceRecord findRecordLocked(IServiceConnection connection) {
  synchronized (mHistory) {
    for (ServiceRecord r : mHistory) {
      if (r.containConnection(connection)) {
        return r;
      }
    }
    return null;
  }
}
origin: darkskygit/VirtualApp

@Override
public VParceledListSlice<ActivityManager.RunningServiceInfo> getServices(int maxNum, int flags, int userId) {
  synchronized (mHistory) {
    List<ActivityManager.RunningServiceInfo> services = new ArrayList<>(mHistory.size());
    for (ServiceRecord r : mHistory) {
      if (r.process.userId != userId) {
        continue;
      }
      ActivityManager.RunningServiceInfo info = new ActivityManager.RunningServiceInfo();
      info.uid = r.process.vuid;
      info.pid = r.process.pid;
      ProcessRecord processRecord = findProcessLocked(r.process.pid);
      if (processRecord != null) {
        info.process = processRecord.processName;
        info.clientPackage = processRecord.info.packageName;
      }
      info.activeSince = r.activeSince;
      info.lastActivityTime = r.lastActivityTime;
      info.clientCount = r.getClientCount();
      info.service = ComponentUtils.toComponentName(r.serviceInfo);
      info.started = r.startId > 0;
      services.add(info);
    }
    return new VParceledListSlice<>(services);
  }
}
origin: darkskygit/VirtualApp

ServiceRecord r = findRecordLocked(userId, serviceInfo);
if (r == null) {
  r = new ServiceRecord();
  r.startId = 0;
  r.activeSince = SystemClock.elapsedRealtime();
origin: bzsome/VirtualApp-x326

if (r.startId <= 0 && r.getConnectionCount() <= 0) {
  try {
    IApplicationThreadCompat.scheduleStopService(r.process.appThread, r);
origin: android-hacker/VirtualXposed

@Override
public IBinder peekService(Intent service, String resolvedType, int userId) {
  synchronized (this) {
    ServiceInfo serviceInfo = resolveServiceInfo(service, userId);
    if (serviceInfo == null) {
      return null;
    }
    ServiceRecord r = findRecordLocked(userId, serviceInfo);
    if (r != null) {
      ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(service);
      if (boundRecord != null) {
        return boundRecord.binder;
      }
    }
    return null;
  }
}
origin: bzsome/VirtualApp-x326

  return 0;
ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(service);
r.addToBoundIntent(service, connection);
return 1;
origin: bzsome/VirtualApp-x326

private ServiceRecord findRecordLocked(IServiceConnection connection) {
  synchronized (mHistory) {
    for (ServiceRecord r : mHistory) {
      if (r.containConnection(connection)) {
        return r;
      }
    }
    return null;
  }
}
origin: bzsome/VirtualApp-x326

@Override
public VParceledListSlice<ActivityManager.RunningServiceInfo> getServices(int maxNum, int flags, int userId) {
  synchronized (mHistory) {
    List<ActivityManager.RunningServiceInfo> services = new ArrayList<>(mHistory.size());
    for (ServiceRecord r : mHistory) {
      if (r.process.userId != userId) {
        continue;
      }
      ActivityManager.RunningServiceInfo info = new ActivityManager.RunningServiceInfo();
      info.uid = r.process.vuid;
      info.pid = r.process.pid;
      ProcessRecord processRecord = findProcessLocked(r.process.pid);
      if (processRecord != null) {
        info.process = processRecord.processName;
        info.clientPackage = processRecord.info.packageName;
      }
      info.activeSince = r.activeSince;
      info.lastActivityTime = r.lastActivityTime;
      info.clientCount = r.getClientCount();
      info.service = ComponentUtils.toComponentName(r.serviceInfo);
      info.started = r.startId > 0;
      services.add(info);
    }
    return new VParceledListSlice<>(services);
  }
}
origin: darkskygit/VirtualApp

@Override
public void unbindFinished(IBinder token, Intent service, boolean doRebind, int userId) {
  synchronized (this) {
    ServiceRecord r = (ServiceRecord) token;
    if (r != null) {
      ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(service);
      if (boundRecord != null) {
        boundRecord.doRebind = doRebind;
      }
    }
  }
}
com.lody.virtual.server.amServiceRecord

Most used methods

  • <init>
  • addToBoundIntent
  • containConnection
  • getClientCount
  • getConnectionCount
  • peekBinding

Popular in Java

  • Reading from database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • getResourceAsStream (ClassLoader)
  • setScale (BigDecimal)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Github Copilot alternatives
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