Program: 2483
Project: 2483
Buggy source:
public PackageManagerService(Context context,Installer installer,boolean factoryTest,boolean onlyCore){
  EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_START,SystemClock.uptimeMillis());
  if (mSdkVersion <= 0) {
    Slog.w(TAG,"String_Node_Str");
  }
  mContext=context;
  mFactoryTest=factoryTest;
  mOnlyCore=onlyCore;
  mNoDexOpt="String_Node_Str".equals(SystemProperties.get("String_Node_Str"));
  mMetrics=new DisplayMetrics();
  mSettings=new Settings(context);
  mSettings.addSharedUserLPw("String_Node_Str",Process.SYSTEM_UID,ApplicationInfo.FLAG_SYSTEM);
  mSettings.addSharedUserLPw("String_Node_Str",RADIO_UID,ApplicationInfo.FLAG_SYSTEM);
  mSettings.addSharedUserLPw("String_Node_Str",LOG_UID,ApplicationInfo.FLAG_SYSTEM);
  mSettings.addSharedUserLPw("String_Node_Str",NFC_UID,ApplicationInfo.FLAG_SYSTEM);
  mSettings.addSharedUserLPw("String_Node_Str",BLUETOOTH_UID,ApplicationInfo.FLAG_SYSTEM);
  mSettings.addSharedUserLPw("String_Node_Str",SHELL_UID,ApplicationInfo.FLAG_SYSTEM);
  String separateProcesses=SystemProperties.get("String_Node_Str");
  if (separateProcesses != null && separateProcesses.length() > 0) {
    if ("String_Node_Str".equals(separateProcesses)) {
      mDefParseFlags=PackageParser.PARSE_IGNORE_PROCESSES;
      mSeparateProcesses=null;
      Slog.w(TAG,"String_Node_Str");
    }
 else {
      mDefParseFlags=0;
      mSeparateProcesses=separateProcesses.split("String_Node_Str");
      Slog.w(TAG,"String_Node_Str" + separateProcesses);
    }
  }
 else {
    mDefParseFlags=0;
    mSeparateProcesses=null;
  }
  mInstaller=installer;
  WindowManager wm=(WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
  Display d=wm.getDefaultDisplay();
  d.getMetrics(mMetrics);
synchronized (mInstallLock) {
synchronized (mPackages) {
      mHandlerThread.start();
      mHandler=new PackageHandler(mHandlerThread.getLooper());
      File dataDir=Environment.getDataDirectory();
      mAppDataDir=new File(dataDir,"String_Node_Str");
      mAppInstallDir=new File(dataDir,"String_Node_Str");
      mAppLibInstallDir=new File(dataDir,"String_Node_Str");
      mAsecInternalPath=new File(dataDir,"String_Node_Str").getPath();
      mUserAppDataDir=new File(dataDir,"String_Node_Str");
      mDrmAppPrivateInstallDir=new File(dataDir,"String_Node_Str");
      sUserManager=new UserManagerService(context,this,mInstallLock,mPackages);
      readPermissions();
      mFoundPolicyFile=SELinuxMMAC.readInstallPolicy();
      mRestoredSettings=mSettings.readLPw(this,sUserManager.getUsers(false),mSdkVersion,mOnlyCore);
      long startTime=SystemClock.uptimeMillis();
      EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_SYSTEM_SCAN_START,startTime);
      int scanMode=SCAN_MONITOR | SCAN_NO_PATHS | SCAN_DEFER_DEX| SCAN_BOOTING;
      if (mNoDexOpt) {
        Slog.w(TAG,"String_Node_Str");
        scanMode|=SCAN_NO_DEX;
      }
      final HashSet<String> libFiles=new HashSet<String>();
      mFrameworkDir=new File(Environment.getRootDirectory(),"String_Node_Str");
      mDalvikCacheDir=new File(dataDir,"String_Node_Str");
      boolean didDexOpt=false;
      String bootClassPath=System.getProperty("String_Node_Str");
      if (bootClassPath != null) {
        String[] paths=splitString(bootClassPath,':');
        for (int i=0; i < paths.length; i++) {
          try {
            if (dalvik.system.DexFile.isDexOptNeeded(paths[i])) {
              libFiles.add(paths[i]);
              mInstaller.dexopt(paths[i],Process.SYSTEM_UID,true);
              didDexOpt=true;
            }
          }
 catch (          FileNotFoundException e) {
            Slog.w(TAG,"String_Node_Str" + paths[i]);
          }
catch (          IOException e) {
            Slog.w(TAG,"String_Node_Str" + paths[i] + "String_Node_Str"+ e.getMessage());
          }
        }
      }
 else {
        Slog.w(TAG,"String_Node_Str");
      }
      if (mSharedLibraries.size() > 0) {
        Iterator<SharedLibraryEntry> libs=mSharedLibraries.values().iterator();
        while (libs.hasNext()) {
          String lib=libs.next().path;
          if (lib == null) {
            continue;
          }
          try {
            if (dalvik.system.DexFile.isDexOptNeeded(lib)) {
              libFiles.add(lib);
              mInstaller.dexopt(lib,Process.SYSTEM_UID,true);
              didDexOpt=true;
            }
          }
 catch (          FileNotFoundException e) {
            Slog.w(TAG,"String_Node_Str" + lib);
          }
catch (          IOException e) {
            Slog.w(TAG,"String_Node_Str" + lib + "String_Node_Str"+ e.getMessage());
          }
        }
      }
      libFiles.add(mFrameworkDir.getPath() + "String_Node_Str");
      String[] frameworkFiles=mFrameworkDir.list();
      if (frameworkFiles != null) {
        for (int i=0; i < frameworkFiles.length; i++) {
          File libPath=new File(mFrameworkDir,frameworkFiles[i]);
          String path=libPath.getPath();
          if (libFiles.contains(path)) {
            continue;
          }
          if (!path.endsWith("String_Node_Str") && !path.endsWith("String_Node_Str")) {
            continue;
          }
          try {
            if (dalvik.system.DexFile.isDexOptNeeded(path)) {
              mInstaller.dexopt(path,Process.SYSTEM_UID,true);
              didDexOpt=true;
            }
          }
 catch (          FileNotFoundException e) {
            Slog.w(TAG,"String_Node_Str" + path);
          }
catch (          IOException e) {
            Slog.w(TAG,"String_Node_Str" + path,e);
          }
        }
      }
      if (didDexOpt) {
        String[] files=mDalvikCacheDir.list();
        if (files != null) {
          for (int i=0; i < files.length; i++) {
            String fn=files[i];
            if (fn.startsWith("String_Node_Str") || fn.startsWith("String_Node_Str")) {
              Slog.i(TAG,"String_Node_Str" + fn);
              (new File(mDalvikCacheDir,fn)).delete();
            }
          }
        }
      }
      mFrameworkInstallObserver=new AppDirObserver(mFrameworkDir.getPath(),OBSERVER_EVENTS,true);
      mFrameworkInstallObserver.startWatching();
      scanDirLI(mFrameworkDir,PackageParser.PARSE_IS_SYSTEM | PackageParser.PARSE_IS_SYSTEM_DIR,scanMode | SCAN_NO_DEX,0);
      mSystemAppDir=new File(Environment.getRootDirectory(),"String_Node_Str");
      mSystemInstallObserver=new AppDirObserver(mSystemAppDir.getPath(),OBSERVER_EVENTS,true);
      mSystemInstallObserver.startWatching();
      scanDirLI(mSystemAppDir,PackageParser.PARSE_IS_SYSTEM | PackageParser.PARSE_IS_SYSTEM_DIR,scanMode,0);
      mVendorAppDir=new File("String_Node_Str");
      mVendorInstallObserver=new AppDirObserver(mVendorAppDir.getPath(),OBSERVER_EVENTS,true);
      mVendorInstallObserver.startWatching();
      scanDirLI(mVendorAppDir,PackageParser.PARSE_IS_SYSTEM | PackageParser.PARSE_IS_SYSTEM_DIR,scanMode,0);
      if (DEBUG_UPGRADE)       Log.v(TAG,"String_Node_Str");
      mInstaller.moveFiles();
      final List<String> possiblyDeletedUpdatedSystemApps=new ArrayList<String>();
      if (!mOnlyCore) {
        Iterator<PackageSetting> psit=mSettings.mPackages.values().iterator();
        while (psit.hasNext()) {
          PackageSetting ps=psit.next();
          if ((ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) == 0) {
            continue;
          }
          final PackageParser.Package scannedPkg=mPackages.get(ps.name);
          if (scannedPkg != null) {
            if (mSettings.isDisabledSystemPackageLPr(ps.name)) {
              Slog.i(TAG,"String_Node_Str" + ps.name + "String_Node_Str");
              removePackageLI(ps,true);
            }
            continue;
          }
          if (!mSettings.isDisabledSystemPackageLPr(ps.name)) {
            psit.remove();
            String msg="String_Node_Str" + ps.name + "String_Node_Str";
            reportSettingsProblem(Log.WARN,msg);
            removeDataDirsLI(ps.name);
          }
 else {
            final PackageSetting disabledPs=mSettings.getDisabledSystemPkgLPr(ps.name);
            if (disabledPs.codePath == null || !disabledPs.codePath.exists()) {
              possiblyDeletedUpdatedSystemApps.add(ps.name);
            }
          }
        }
      }
      ArrayList<PackageSetting> deletePkgsList=mSettings.getListOfIncompleteInstallPackagesLPr();
      for (int i=0; i < deletePkgsList.size(); i++) {
        cleanupInstallFailedPackage(deletePkgsList.get(i));
      }
      deleteTempPackageFiles();
      if (!mOnlyCore) {
        EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_DATA_SCAN_START,SystemClock.uptimeMillis());
        mAppInstallObserver=new AppDirObserver(mAppInstallDir.getPath(),OBSERVER_EVENTS,false);
        mAppInstallObserver.startWatching();
        scanDirLI(mAppInstallDir,0,scanMode,0);
        mDrmAppInstallObserver=new AppDirObserver(mDrmAppPrivateInstallDir.getPath(),OBSERVER_EVENTS,false);
        mDrmAppInstallObserver.startWatching();
        scanDirLI(mDrmAppPrivateInstallDir,PackageParser.PARSE_FORWARD_LOCK,scanMode,0);
        for (        String deletedAppName : possiblyDeletedUpdatedSystemApps) {
          PackageParser.Package deletedPkg=mPackages.get(deletedAppName);
          mSettings.removeDisabledSystemPackageLPw(deletedAppName);
          String msg;
          if (deletedPkg == null) {
            msg="String_Node_Str" + deletedAppName + "String_Node_Str";
            removeDataDirsLI(deletedAppName);
          }
 else {
            msg="String_Node_Str" + deletedAppName + "String_Node_Str"+ deletedAppName;
            deletedPkg.applicationInfo.flags&=~ApplicationInfo.FLAG_SYSTEM;
            PackageSetting deletedPs=mSettings.mPackages.get(deletedAppName);
            deletedPs.pkgFlags&=~ApplicationInfo.FLAG_SYSTEM;
          }
          reportSettingsProblem(Log.WARN,msg);
        }
      }
 else {
        mAppInstallObserver=null;
        mDrmAppInstallObserver=null;
      }
      updateAllSharedLibrariesLPw();
      EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_SCAN_END,SystemClock.uptimeMillis());
      Slog.i(TAG,"String_Node_Str" + ((SystemClock.uptimeMillis() - startTime) / 1000f) + "String_Node_Str");
      final boolean regrantPermissions=mSettings.mInternalSdkPlatform != mSdkVersion;
      if (regrantPermissions)       Slog.i(TAG,"String_Node_Str" + mSettings.mInternalSdkPlatform + "String_Node_Str"+ mSdkVersion+ "String_Node_Str");
      mSettings.mInternalSdkPlatform=mSdkVersion;
      updatePermissionsLPw(null,null,UPDATE_PERMISSIONS_ALL | (regrantPermissions ? (UPDATE_PERMISSIONS_REPLACE_PKG | UPDATE_PERMISSIONS_REPLACE_ALL) : 0));
      mSettings.writeLPr();
      EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_READY,SystemClock.uptimeMillis());
      Runtime.getRuntime().gc();
      mRequiredVerifierPackage=getRequiredVerifierLPr();
    }
  }
}

Fixed version (ground truth):
public PackageManagerService(Context context,Installer installer,boolean factoryTest,boolean onlyCore){
  EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_START,SystemClock.uptimeMillis());
  if (mSdkVersion <= 0) {
    Slog.w(TAG,"String_Node_Str");
  }
  mContext=context;
  mFactoryTest=factoryTest;
  mOnlyCore=onlyCore;
  mNoDexOpt="String_Node_Str".equals(SystemProperties.get("String_Node_Str"));
  mMetrics=new DisplayMetrics();
  mSettings=new Settings(context);
  mSettings.addSharedUserLPw("String_Node_Str",Process.SYSTEM_UID,ApplicationInfo.FLAG_SYSTEM);
  mSettings.addSharedUserLPw("String_Node_Str",RADIO_UID,ApplicationInfo.FLAG_SYSTEM);
  mSettings.addSharedUserLPw("String_Node_Str",LOG_UID,ApplicationInfo.FLAG_SYSTEM);
  mSettings.addSharedUserLPw("String_Node_Str",NFC_UID,ApplicationInfo.FLAG_SYSTEM);
  mSettings.addSharedUserLPw("String_Node_Str",BLUETOOTH_UID,ApplicationInfo.FLAG_SYSTEM);
  mSettings.addSharedUserLPw("String_Node_Str",SHELL_UID,ApplicationInfo.FLAG_SYSTEM);
  String separateProcesses=SystemProperties.get("String_Node_Str");
  if (separateProcesses != null && separateProcesses.length() > 0) {
    if ("String_Node_Str".equals(separateProcesses)) {
      mDefParseFlags=PackageParser.PARSE_IGNORE_PROCESSES;
      mSeparateProcesses=null;
      Slog.w(TAG,"String_Node_Str");
    }
 else {
      mDefParseFlags=0;
      mSeparateProcesses=separateProcesses.split("String_Node_Str");
      Slog.w(TAG,"String_Node_Str" + separateProcesses);
    }
  }
 else {
    mDefParseFlags=0;
    mSeparateProcesses=null;
  }
  mInstaller=installer;
  WindowManager wm=(WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
  Display d=wm.getDefaultDisplay();
  d.getMetrics(mMetrics);
synchronized (mInstallLock) {
synchronized (mPackages) {
      mHandlerThread.start();
      mHandler=new PackageHandler(mHandlerThread.getLooper());
      File dataDir=Environment.getDataDirectory();
      mAppDataDir=new File(dataDir,"String_Node_Str");
      mAppInstallDir=new File(dataDir,"String_Node_Str");
      mAppLibInstallDir=new File(dataDir,"String_Node_Str");
      mAsecInternalPath=new File(dataDir,"String_Node_Str").getPath();
      mUserAppDataDir=new File(dataDir,"String_Node_Str");
      mDrmAppPrivateInstallDir=new File(dataDir,"String_Node_Str");
      sUserManager=new UserManagerService(context,this,mInstallLock,mPackages);
      readPermissions();
      mFoundPolicyFile=SELinuxMMAC.readInstallPolicy();
      mRestoredSettings=mSettings.readLPw(this,sUserManager.getUsers(false),mSdkVersion,mOnlyCore);
      long startTime=SystemClock.uptimeMillis();
      EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_SYSTEM_SCAN_START,startTime);
      int scanMode=SCAN_MONITOR | SCAN_NO_PATHS | SCAN_DEFER_DEX| SCAN_BOOTING;
      if (mNoDexOpt) {
        Slog.w(TAG,"String_Node_Str");
        scanMode|=SCAN_NO_DEX;
      }
      final HashSet<String> libFiles=new HashSet<String>();
      mFrameworkDir=new File(Environment.getRootDirectory(),"String_Node_Str");
      mDalvikCacheDir=new File(dataDir,"String_Node_Str");
      boolean didDexOpt=false;
      String bootClassPath=System.getProperty("String_Node_Str");
      if (bootClassPath != null) {
        String[] paths=splitString(bootClassPath,':');
        for (int i=0; i < paths.length; i++) {
          try {
            if (dalvik.system.DexFile.isDexOptNeeded(paths[i])) {
              libFiles.add(paths[i]);
              mInstaller.dexopt(paths[i],Process.SYSTEM_UID,true);
              didDexOpt=true;
            }
          }
 catch (          FileNotFoundException e) {
            Slog.w(TAG,"String_Node_Str" + paths[i]);
          }
catch (          IOException e) {
            Slog.w(TAG,"String_Node_Str" + paths[i] + "String_Node_Str"+ e.getMessage());
          }
        }
      }
 else {
        Slog.w(TAG,"String_Node_Str");
      }
      if (mSharedLibraries.size() > 0) {
        Iterator<SharedLibraryEntry> libs=mSharedLibraries.values().iterator();
        while (libs.hasNext()) {
          String lib=libs.next().path;
          if (lib == null) {
            continue;
          }
          try {
            if (dalvik.system.DexFile.isDexOptNeeded(lib)) {
              libFiles.add(lib);
              mInstaller.dexopt(lib,Process.SYSTEM_UID,true);
              didDexOpt=true;
            }
          }
 catch (          FileNotFoundException e) {
            Slog.w(TAG,"String_Node_Str" + lib);
          }
catch (          IOException e) {
            Slog.w(TAG,"String_Node_Str" + lib + "String_Node_Str"+ e.getMessage());
          }
        }
      }
      libFiles.add(mFrameworkDir.getPath() + "String_Node_Str");
      String[] frameworkFiles=mFrameworkDir.list();
      if (frameworkFiles != null) {
        for (int i=0; i < frameworkFiles.length; i++) {
          File libPath=new File(mFrameworkDir,frameworkFiles[i]);
          String path=libPath.getPath();
          if (libFiles.contains(path)) {
            continue;
          }
          if (!path.endsWith("String_Node_Str") && !path.endsWith("String_Node_Str")) {
            continue;
          }
          try {
            if (dalvik.system.DexFile.isDexOptNeeded(path)) {
              mInstaller.dexopt(path,Process.SYSTEM_UID,true);
              didDexOpt=true;
            }
          }
 catch (          FileNotFoundException e) {
            Slog.w(TAG,"String_Node_Str" + path);
          }
catch (          IOException e) {
            Slog.w(TAG,"String_Node_Str" + path,e);
          }
        }
      }
      if (didDexOpt) {
        String[] files=mDalvikCacheDir.list();
        if (files != null) {
          for (int i=0; i < files.length; i++) {
            String fn=files[i];
            if (fn.startsWith("String_Node_Str") || fn.startsWith("String_Node_Str")) {
              Slog.i(TAG,"String_Node_Str" + fn);
              (new File(mDalvikCacheDir,fn)).delete();
            }
          }
        }
      }
      mFrameworkInstallObserver=new AppDirObserver(mFrameworkDir.getPath(),OBSERVER_EVENTS,true);
      mFrameworkInstallObserver.startWatching();
      scanDirLI(mFrameworkDir,PackageParser.PARSE_IS_SYSTEM | PackageParser.PARSE_IS_SYSTEM_DIR,scanMode | SCAN_NO_DEX,0);
      mSystemAppDir=new File(Environment.getRootDirectory(),"String_Node_Str");
      mSystemInstallObserver=new AppDirObserver(mSystemAppDir.getPath(),OBSERVER_EVENTS,true);
      mSystemInstallObserver.startWatching();
      scanDirLI(mSystemAppDir,PackageParser.PARSE_IS_SYSTEM | PackageParser.PARSE_IS_SYSTEM_DIR,scanMode,0);
      mVendorAppDir=new File("String_Node_Str");
      mVendorInstallObserver=new AppDirObserver(mVendorAppDir.getPath(),OBSERVER_EVENTS,true);
      mVendorInstallObserver.startWatching();
      scanDirLI(mVendorAppDir,PackageParser.PARSE_IS_SYSTEM | PackageParser.PARSE_IS_SYSTEM_DIR,scanMode,0);
      if (DEBUG_UPGRADE)       Log.v(TAG,"String_Node_Str");
      mInstaller.moveFiles();
      final List<String> possiblyDeletedUpdatedSystemApps=new ArrayList<String>();
      if (!mOnlyCore) {
        Iterator<PackageSetting> psit=mSettings.mPackages.values().iterator();
        while (psit.hasNext()) {
          PackageSetting ps=psit.next();
          if ((ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) == 0) {
            continue;
          }
          final PackageParser.Package scannedPkg=mPackages.get(ps.name);
          if (scannedPkg != null) {
            if (mSettings.isDisabledSystemPackageLPr(ps.name)) {
              Slog.i(TAG,"String_Node_Str" + ps.name + "String_Node_Str");
              removePackageLI(ps,true);
            }
            continue;
          }
          if (!mSettings.isDisabledSystemPackageLPr(ps.name)) {
            psit.remove();
            String msg="String_Node_Str" + ps.name + "String_Node_Str";
            reportSettingsProblem(Log.WARN,msg);
            removeDataDirsLI(ps.name);
          }
 else {
            final PackageSetting disabledPs=mSettings.getDisabledSystemPkgLPr(ps.name);
            if (disabledPs.codePath == null || !disabledPs.codePath.exists()) {
              possiblyDeletedUpdatedSystemApps.add(ps.name);
            }
          }
        }
      }
      ArrayList<PackageSetting> deletePkgsList=mSettings.getListOfIncompleteInstallPackagesLPr();
      for (int i=0; i < deletePkgsList.size(); i++) {
        cleanupInstallFailedPackage(deletePkgsList.get(i));
      }
      deleteTempPackageFiles();
      if (!mOnlyCore) {
        EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_DATA_SCAN_START,SystemClock.uptimeMillis());
        mAppInstallObserver=new AppDirObserver(mAppInstallDir.getPath(),OBSERVER_EVENTS,false);
        mAppInstallObserver.startWatching();
        scanDirLI(mAppInstallDir,0,scanMode,0);
        mDrmAppInstallObserver=new AppDirObserver(mDrmAppPrivateInstallDir.getPath(),OBSERVER_EVENTS,false);
        mDrmAppInstallObserver.startWatching();
        scanDirLI(mDrmAppPrivateInstallDir,PackageParser.PARSE_FORWARD_LOCK,scanMode,0);
        for (        String deletedAppName : possiblyDeletedUpdatedSystemApps) {
          PackageParser.Package deletedPkg=mPackages.get(deletedAppName);
          mSettings.removeDisabledSystemPackageLPw(deletedAppName);
          String msg;
          if (deletedPkg == null) {
            msg="String_Node_Str" + deletedAppName + "String_Node_Str";
            removeDataDirsLI(deletedAppName);
          }
 else {
            msg="String_Node_Str" + deletedAppName + "String_Node_Str"+ deletedAppName;
            deletedPkg.applicationInfo.flags&=~ApplicationInfo.FLAG_SYSTEM;
            PackageSetting deletedPs=mSettings.mPackages.get(deletedAppName);
            deletedPs.pkgFlags&=~ApplicationInfo.FLAG_SYSTEM;
          }
          reportSettingsProblem(Log.WARN,msg);
        }
      }
 else {
        mAppInstallObserver=null;
        mDrmAppInstallObserver=null;
      }
      updateAllSharedLibrariesLPw();
      EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_SCAN_END,SystemClock.uptimeMillis());
      Slog.i(TAG,"String_Node_Str" + ((SystemClock.uptimeMillis() - startTime) / 1000f) + "String_Node_Str");
      final boolean regrantPermissions=mSettings.mInternalSdkPlatform != mSdkVersion;
      if (regrantPermissions)       Slog.i(TAG,"String_Node_Str" + mSettings.mInternalSdkPlatform + "String_Node_Str"+ mSdkVersion+ "String_Node_Str");
      mSettings.mInternalSdkPlatform=mSdkVersion;
      updatePermissionsLPw(null,null,UPDATE_PERMISSIONS_ALL | (regrantPermissions ? (UPDATE_PERMISSIONS_REPLACE_PKG | UPDATE_PERMISSIONS_REPLACE_ALL) : 0));
      if (!mRestoredSettings && !onlyCore) {
        mSettings.readDefaultPreferredAppsLPw(this,0);
      }
      mSettings.writeLPr();
      EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_READY,SystemClock.uptimeMillis());
      Runtime.getRuntime().gc();
      mRequiredVerifierPackage=getRequiredVerifierLPr();
    }
  }
}