FileDocCategorySizeDatePackage
StkAppInstaller.javaAPI DocAndroid 1.5 API1940Wed May 06 22:42:48 BST 2009com.android.stk

StkAppInstaller

public abstract class StkAppInstaller extends Object
Application installer for SIM Toolkit.

Fields Summary
Constructors Summary
private StkAppInstaller()

Methods Summary
static voidinstall(android.content.Context context)

        setAppState(context, true);
    
private static voidsetAppState(android.content.Context context, boolean install)

        if (context == null) {
            return;
        }
        PackageManager pm = context.getPackageManager();
        if (pm == null) {
            return;
        }
        // check that STK app package is known to the PackageManager
        ComponentName cName = new ComponentName("com.android.stk",
                "com.android.stk.StkLauncherActivity");
        int state = install ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
                : PackageManager.COMPONENT_ENABLED_STATE_DISABLED;

        try {
            pm.setComponentEnabledSetting(cName, state,
                    PackageManager.DONT_KILL_APP);
        } catch (Exception e) {
            StkLog.d("StkAppInstaller", "Could not change STK app state");
        }
    
static voidunInstall(android.content.Context context)

        setAppState(context, false);