void deletePackageAsUser(String pkg, PackageDeleteObserver observer, int flags, int mUserId) {
            // Hidden + suspended, to indicate a deleted system app.
			mDevicePolicies.invoke(DevicePolicyManager::setApplicationHidden, pkg, true);
            if (mDevicePolicies.invoke(DevicePolicyManager::isApplicationHidden, pkg)) {
                mDevicePolicies.invoke(DevicePolicyManager::setPackagesSuspended, new String[] { pkg }, true);
                observer.packageDeleted(pkg, DELETE_SUCCEEDED);
            } else observer.packageDeleted(pkg, DELETE_FAILED_INTERNAL_ERROR);
        }
Runs the next task when all packages have been deleted or shuts down the activity if package
deletion fails.
engine/src/main/java/com/oasisfeng/island/provisioning/task/DeleteNonRequiredAppsTask.java