)]}'
{
  "commit": "3fe46365cefb859051656faf069aa3cd446510bb",
  "tree": "74ee05abb268ee6ed8c63918f49031564c4d9869",
  "parents": [
    "114656eb2ff4de7a774d4cdd1e4db6b94647bbce"
  ],
  "author": {
    "name": "Rashid Zaman",
    "email": "rashidz@meta.com",
    "time": "Thu Aug 15 10:45:50 2024 -0700"
  },
  "committer": {
    "name": "Treehugger Robot",
    "email": "android-test-infra-autosubmit@system.gserviceaccount.com",
    "time": "Fri Sep 06 11:45:04 2024 +0000"
  },
  "message": "Don\u0027t filter default package list for first boot dexopt\n\ncommit 20a8542b513a (\"Implement app downgrading.\") added filtering of the\nlist of packages to dexopt and for REASON_FIRST_BOOT this filtered the\nlist of packages based on last active time which is determined as the\nmaximum of a package\u0027s last used time and first install time. During\nfirst boot a package\u0027s last used time is 0 so the last active time is\nbased on a package\u0027s installation time which after\ncommit cbd2f357c218 (\"[pm] use actual scanning time as firstInstallTime\nfor preload apps\") in frameworks/base when fix_system_apps_first_install_time\nis enabled is set to the current time as returned by\nSystem.currentTimeMillis() when packages are being installed during\nPackageManagerService startup. This can be a problem during first boot if\npm.dexopt.downgrade_after_inactive_days is set because in this\ncase packages with a last active time (installation time in this case) more\nthan pm.dexopt.downgrade_after_inactive_days in the past will be be filtered\nout of the default package list and not dexopted and this filtering is\ndone relative to the current time as returned by\nSystem.currentTimeMillis() which in some cases will have been advanced by\nAlarmManagerService after package installation to the build time as set\nin ro.build.date.utc. This can happen on some devices, for example, when\nthe RTC has never been set correctly or is set to a time more than\npm.dexopt.downgrade_after_inactive_days prior to the build time in\nro.build.date.utc as kernels with CONFIG_RTC_HCTOSYS enabled will set\nthe system time using the value read from the RTC during kernel init and\nthis will be the time used to set the first install time for packages\nand will later cause AlarmManagerService to advance the system time\nprior to first boot dexopt. Fix these cases as well by not doing any\nfiltering for first boot dexopt.\n\nTest: Set pm.dexopt.downgrade_after_inactive_days\u003d10 on\n  aosp_cheetah-trunk_staging-userdebug and set system time to more than 10\n  days in the past and confirm with debugger and ART Service logging that\n  there are now packages being dexopted:\n  adb shell \u0027date @1723857773\u0027 \u0026\u0026 adb shell hwclock -w \u0026\u0026 adb reboot\n  bootloader \u0026\u0026 fastboot flashall -w\nTest: atest ArtServiceTests\n\nChange-Id: I4ebd74766cfe21db4001b44bd292cc042a8e23f0\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "83336805d735d85fa07b6ee6580a7c95dc6032b0",
      "old_mode": 33188,
      "old_path": "libartservice/service/java/com/android/server/art/ArtManagerLocal.java",
      "new_id": "0d9303ed3009d6b5ac75a106dccccfea4e31325b",
      "new_mode": 33188,
      "new_path": "libartservice/service/java/com/android/server/art/ArtManagerLocal.java"
    },
    {
      "type": "modify",
      "old_id": "01e706f0a4468bef6d4fa9623af9dc3f02f0f0cc",
      "old_mode": 33188,
      "old_path": "libartservice/service/javatests/com/android/server/art/ArtManagerLocalTest.java",
      "new_id": "739c2daaa9df49ec0f31b3556ff2c05c6c487648",
      "new_mode": 33188,
      "new_path": "libartservice/service/javatests/com/android/server/art/ArtManagerLocalTest.java"
    }
  ]
}
