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

How to use
ResolverActivity
in
com.lody.virtual.client.stub

Best Java code snippets using com.lody.virtual.client.stub.ResolverActivity (Showing top 20 results out of 315)

origin: android-hacker/VirtualXposed

super.onCreate(savedInstanceState);
mLaunchedFromUid = userid;
mPm = getPackageManager();
mAlwaysUseOption = alwaysUseOption;
mMaxColumns = getResources().getInteger(R.integer.config_maxResolverActivityColumns);
final ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
mIconDpi = am.getLauncherLargeIconDensity();
mIconSize = am.getLauncherLargeIconSize();
  if (mLaunchedFromUid < 0) {
    finish();
    return;
  startSelected(0, false);
  mRegistered = false;
  finish();
  return;
origin: android-hacker/VirtualXposed

Drawable loadIconForResolveInfo(ResolveInfo ri) {
  Drawable dr;
  try {
    if (ri.resolvePackageName != null && ri.icon != 0) {
      dr = getIcon(mPm.getResourcesForApplication(ri.resolvePackageName), ri.icon);
      if (dr != null) {
        return dr;
      }
    }
    final int iconRes = ri.getIconResource();
    if (iconRes != 0) {
      dr = getIcon(mPm.getResourcesForApplication(ri.activityInfo.packageName), iconRes);
      if (dr != null) {
        return dr;
      }
    }
  } catch (PackageManager.NameNotFoundException e) {
    VLog.e(TAG, "Couldn't find resources for package\n" + VLog.getStackTraceString(e));
  }
  return ri.loadIcon(mPm);
}
origin: android-hacker/VirtualXposed

@Override
protected void onStop() {
  super.onStop();
  if (mRegistered) {
    mRegistered = false;
  }
  if ((getIntent().getFlags() & Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {
    // This resolver is in the unusual situation where it has been
    // launched at the top of a new task.  We don't let it be added
    // to the recent tasks shown to the user, and we need to make sure
    // that each time we are launched we get the correct launching
    // uid (not re-using the same resolver from an old launching uid),
    // so we will now finish ourself since being no longer visible,
    // the user probably can't get back to us.
    if (!isChangingConfigurations()) {
      finish();
    }
  }
}
origin: android-hacker/VirtualXposed

void startSelected(int which, boolean always) {
  if (isFinishing()) {
    return;
  }
  ResolveInfo ri = mAdapter.resolveInfoForPosition(which);
  Intent intent = mAdapter.intentForPosition(which);
  onIntentSelected(ri, intent, always);
  finish();
}
origin: android-hacker/VirtualXposed

@SuppressLint("MissingSuperCall")
@Override
protected void onCreate(Bundle savedInstanceState) {
  final int titleResource;
  final Intent intent = makeMyIntent();
  final Set<String> categories = intent.getCategories();
  if (Intent.ACTION_MAIN.equals(intent.getAction())
      && categories != null
      && categories.size() == 1
      && categories.contains(Intent.CATEGORY_HOME)) {
    titleResource = R.string.choose;
  } else {
    titleResource = R.string.choose;
  }
  onCreate(savedInstanceState, intent, getResources().getText(titleResource),
      null, null, true, VUserHandle.getCallingUserId());
}
origin: android-hacker/VirtualXposed

    getPackageManager().addPreferredActivity(filter, bestMatch, set,
        intent.getComponent());
  } else {
      Reflect.on(VClientImpl.get().getCurrentApplication().getPackageManager()).call("setLastChosenActivity",
          intent,
          intent.resolveTypeIfNeeded(getContentResolver()),
          PackageManager.MATCH_DEFAULT_ONLY,
          filter, bestMatch, intent.getComponent());
if (info == null) {
  startActivity(intent);
origin: android-hacker/VirtualXposed

  @Override
  public void onCancel(DialogInterface dialog) {
    finish();
  }
});
origin: android-hacker/VirtualXposed

private Intent makeMyIntent() {
  Intent intent = new Intent(getIntent());
  intent.setComponent(null);
  intent.setFlags(intent.getFlags() & ~Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
  return intent;
}
origin: android-hacker/VirtualXposed

@Override
protected DisplayResolveInfo doInBackground(DisplayResolveInfo... params) {
  final DisplayResolveInfo info = params[0];
  if (info.displayIcon == null) {
    info.displayIcon = loadIconForResolveInfo(info.ri);
  }
  return info;
}
origin: android-hacker/VirtualXposed

    getPackageManager(), 0);
if (ai == null) {
  VLog.w("ResolverActivity", "No activity found for "
    ri.loadLabel(getPackageManager()), null, ii));
origin: darkskygit/VirtualApp

void startSelected(int which, boolean always) {
  if (isFinishing()) {
    return;
  }
  ResolveInfo ri = mAdapter.resolveInfoForPosition(which);
  Intent intent = mAdapter.intentForPosition(which);
  onIntentSelected(ri, intent, always);
  finish();
}
origin: darkskygit/VirtualApp

@SuppressLint("MissingSuperCall")
@Override
protected void onCreate(Bundle savedInstanceState) {
  final int titleResource;
  final Intent intent = makeMyIntent();
  final Set<String> categories = intent.getCategories();
  if (Intent.ACTION_MAIN.equals(intent.getAction())
      && categories != null
      && categories.size() == 1
      && categories.contains(Intent.CATEGORY_HOME)) {
    titleResource = R.string.choose;
  } else {
    titleResource = R.string.choose;
  }
  onCreate(savedInstanceState, intent, getResources().getText(titleResource),
      null, null, true, VUserHandle.getCallingUserId());
}
origin: darkskygit/VirtualApp

    getPackageManager().addPreferredActivity(filter, bestMatch, set,
        intent.getComponent());
  } else {
      Reflect.on(VClientImpl.get().getCurrentApplication().getPackageManager()).call("setLastChosenActivity",
          intent,
          intent.resolveTypeIfNeeded(getContentResolver()),
          PackageManager.MATCH_DEFAULT_ONLY,
          filter, bestMatch, intent.getComponent());
if (info == null) {
  startActivity(intent);
origin: android-hacker/VirtualXposed

public void handlePackagesChanged() {
  final int oldItemCount = getCount();
  rebuildList();
  notifyDataSetChanged();
  final int newItemCount = getCount();
  if (newItemCount == 0) {
    // We no longer have any items...  just finish the activity.
    finish();
  }
}
origin: bzsome/VirtualApp-x326

private Intent makeMyIntent() {
  Intent intent = new Intent(getIntent());
  intent.setComponent(null);
  intent.setFlags(intent.getFlags() & ~Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
  return intent;
}
origin: darkskygit/VirtualApp

@Override
protected DisplayResolveInfo doInBackground(DisplayResolveInfo... params) {
  final DisplayResolveInfo info = params[0];
  if (info.displayIcon == null) {
    info.displayIcon = loadIconForResolveInfo(info.ri);
  }
  return info;
}
origin: bzsome/VirtualApp-x326

    getPackageManager(), 0);
if (ai == null) {
  VLog.w("ResolverActivity", "No activity found for "
    ri.loadLabel(getPackageManager()), null, ii));
origin: darkskygit/VirtualApp

super.onCreate(savedInstanceState);
mLaunchedFromUid = userid;
mPm = getPackageManager();
mAlwaysUseOption = alwaysUseOption;
mMaxColumns = getResources().getInteger(R.integer.config_maxResolverActivityColumns);
final ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
mIconDpi = am.getLauncherLargeIconDensity();
mIconSize = am.getLauncherLargeIconSize();
  if (mLaunchedFromUid < 0) {
    finish();
    return;
  startSelected(0, false);
  mRegistered = false;
  finish();
  return;
origin: bzsome/VirtualApp-x326

void startSelected(int which, boolean always) {
  if (isFinishing()) {
    return;
  }
  ResolveInfo ri = mAdapter.resolveInfoForPosition(which);
  Intent intent = mAdapter.intentForPosition(which);
  onIntentSelected(ri, intent, always);
  finish();
}
origin: bzsome/VirtualApp-x326

@SuppressLint("MissingSuperCall")
@Override
protected void onCreate(Bundle savedInstanceState) {
  final int titleResource;
  final Intent intent = makeMyIntent();
  final Set<String> categories = intent.getCategories();
  if (Intent.ACTION_MAIN.equals(intent.getAction())
      && categories != null
      && categories.size() == 1
      && categories.contains(Intent.CATEGORY_HOME)) {
    titleResource = R.string.choose;
  } else {
    titleResource = R.string.choose;
  }
  onCreate(savedInstanceState, intent, getResources().getText(titleResource),
      null, null, true, VUserHandle.getCallingUserId());
}
com.lody.virtual.client.stubResolverActivity

Most used methods

  • finish
  • getContentResolver
  • getIcon
  • getIntent
  • getPackageManager
  • getResources
  • getSystemService
  • isChangingConfigurations
  • isFinishing
  • loadIconForResolveInfo
  • makeMyIntent
  • onCreate
  • makeMyIntent,
  • onCreate,
  • onIntentSelected,
  • showAppDetails,
  • startActivity,
  • startSelected

Popular in Java

  • Reactive rest calls using spring rest template
  • compareTo (BigDecimal)
  • getSystemService (Context)
  • runOnUiThread (Activity)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Top Vim 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