FileDocCategorySizeDatePackage
UninstallAppProgress.javaAPI DocAndroid 1.5 API3424Wed May 06 22:42:46 BST 2009com.android.packageinstaller

UninstallAppProgress

public class UninstallAppProgress extends android.app.Activity
This activity corresponds to a download progress screen that is displayed when an application is uninstalled. The result of the application uninstall is indicated in the result code that gets set to 0 or 1. The application gets launched by an intent with the intent's class name explicitly set to UninstallAppProgress and expects the application object of the application to uninstall.

Fields Summary
private final String
TAG
private boolean
localLOGV
private android.content.pm.ApplicationInfo
mAppInfo
private final int
UNINSTALL_COMPLETE
public static final int
SUCCEEDED
public static final int
FAILED
private android.os.Handler
mHandler
Constructors Summary
Methods Summary
public voidinitView()

        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.op_progress);
        //initialize views
        PackageUtil.initAppSnippet(this, mAppInfo, R.id.app_snippet);
        TextView installTextView = (TextView)findViewById(R.id.center_text);
        installTextView.setText(R.string.uninstalling);
        final ProgressBar progressBar = (ProgressBar) findViewById(R.id.progress_bar);
        progressBar.setIndeterminate(true);
        PackageDeleteObserver observer = new PackageDeleteObserver();
        getPackageManager().deletePackage(mAppInfo.packageName, observer, 0);
    
public voidonCreate(android.os.Bundle icicle)

    
    
        
        super.onCreate(icicle);
        Intent intent = getIntent();
        mAppInfo = intent.getParcelableExtra(PackageUtil.INTENT_ATTR_APPLICATION_INFO);
        initView();
    
voidsetResultAndFinish(int retCode)

        setResult(retCode);
        finish();