public void Update(PackageManager manager, string id)
        {
            // Try to find the package that needs to be updated
            for (int i = 0; i < packages.Count; i++)
            {
                Package pkg = packages[i];

                if (id.Equals(pkg.Id))
                {
                    PackageStatus status = manager.GetLocalPackageStatus(id, -1);
                    pkg.UpdateStatus(status);

                    packages[i] = pkg;

                    adapter.Update(pkg);
                }
            }
        }
        void UpdatePackage(string id)
        {
            if (packageAdapter == null)
            {
                return;
            }

            RunOnUiThread(delegate {
                // Try to find the package that needs to be updated
                for (int i = 0; i < packageArray.Count; i++)
                {
                    Package pkg = packageArray[i];

                    if (id.Equals(pkg.Id))
                    {
                        PackageStatus status = packageManager.GetLocalPackageStatus(id, -1);
                        pkg.UpdateStatus(status);

                        packageArray[i] = pkg;
                        packageAdapter.Update(pkg);
                    }
                }
            });
        }