Add test to catch subsequent scans of nomedia directories

Directories with .nomedia files should only be scanned once (unless the
parent directory is moved). We do not scan directories with .nomedia
file if the string in .nomedia file matches the file path of the
parents directory (this is usually set in the first scan).

Since we do not have strong benchmarks to compare these numbers with,
we are using Timers to compare numbers relatively.

Extracted Timer logic to a utils file for easy access by all tests.

Bug: 173156814
Test: atest ModernMediaScannerTest
Test: atest PerformanceTest

Change-Id: I2f83721ef0ec2bc92f80c11c8a7e7ffc73123723
diff --git a/tests/Android.bp b/tests/Android.bp
index cab61cf..8054a05 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -17,9 +17,11 @@
         "main_res",
         "res",
     ],
+
     srcs: [
         ":framework-mediaprovider-sources",
         ":mediaprovider-sources",
+        ":mediaprovider-testutils",
         "src/**/*.java",
     ],
 
@@ -50,3 +52,8 @@
         ],
     },
 }
+
+filegroup {
+    name: "mediaprovider-testutils",
+    srcs: ["utils/**/*.java"],
+}