Android Package Manage disableComponent(PackageManager pm, ComponentName component)

Here you can find the source of disableComponent(PackageManager pm, ComponentName component)

Description

disable Component

Declaration

public static void disableComponent(PackageManager pm,
            ComponentName component) 

Method Source Code

//package com.java2s;
import android.content.ComponentName;
import android.content.pm.PackageManager;

public class Main {
    public static void disableComponent(PackageManager pm,
            ComponentName component) {//w  w  w .  j  av  a2  s  . c  o  m
        pm.setComponentEnabledSetting(component,
                PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
                PackageManager.DONT_KILL_APP);
    }
}

Related

  1. getApplicationIcon(String packageName)
  2. getUidForPackageName(PackageManager pm, String packageName)
  3. enableComponent(PackageManager pm, ComponentName component)
  4. isPackageInstalled(String packageName, PackageManager pm)
  5. getApplicationMarketPage( @Nonnull String packageName)
  6. isPackageInstalled(final String packageName, final PackageManager pm)