Code example for PackageInfo

0
     * already 'installed' on system. 
     *  
     * @param packageInfo 
     */ 
    public void addPackage( PackageInfo packageInfo ) {
    	 packageList.put(packageInfo.packageName, packageInfo);
    } 
     
    public void addPackage( String packageName ) {
    	PackageInfo info = new PackageInfo();
    	info.packageName = packageName;
    	addPackage( info );
    }     
     
    private void initializePackageInfo() { 
    	if (packageList != null) { return; }
 
        PackageInfo packageInfo = new PackageInfo();
        packageInfo.packageName = contextWrapper.getPackageName();
        packageInfo.versionName = "1.0";
         
        packageList = new HashMap<String, PackageInfo>();
        addPackage( packageInfo );