private Set<String> getNewSystemApps() {
        File systemAppsFile = getSystemAppsFile(mContext, mUserId);
        systemAppsFile.getParentFile().mkdirs(); // Creating the folder if it does not exist

        Set<String> currentSystemApps = mUtils.getCurrentSystemApps(mIPackageManager, mUserId);
        final Set<String> previousSystemApps;
        if (mNewProfile) {
            // Provisioning case.
            previousSystemApps = Collections.<String>emptySet();
        } else  if (!systemAppsFile.exists()) {
            // OTA case.
            ProvisionLogger.loge("Could not find the system apps file " +
                    systemAppsFile.getAbsolutePath());
            mCallback.onError();
            return Collections.<String>emptySet();
        } else {
            previousSystemApps = readSystemApps(systemAppsFile);
        }

        writeSystemApps(currentSystemApps, systemAppsFile);
        Set<String> newApps = currentSystemApps;
        newApps.removeAll(previousSystemApps);
        return newApps;
    }
Provisioning type should be either {@link #DEVICE_OWNER}, {@link #PROFILE_OWNER} or
{@link #MANAGED_USER}.
engine/src/main/java/com/oasisfeng/island/provisioning/task/DeleteNonRequiredAppsTask.java