Only compile dex files if they are not up to date.

Instead of trying to compile them all the time, and relying on file
permissions to keep us from overwriting up-to-date dex files with
different compiler filters.

Bug: 27641809
Bug: 28639246
Bug: 28826195
Change-Id: Ie717089d58517427b6f9a522b48146761c57a1a9
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc
index 64b40b7..218c490 100644
--- a/runtime/oat_file_assistant.cc
+++ b/runtime/oat_file_assistant.cc
@@ -220,6 +220,10 @@
   return true;
 }
 
+bool OatFileAssistant::IsUpToDate() {
+  return OatFileIsUpToDate() || OdexFileIsUpToDate();
+}
+
 OatFileAssistant::ResultOfAttemptToUpdate
 OatFileAssistant::MakeUpToDate(std::string* error_msg) {
   CompilerFilter::Filter target;