Rename to Android Game Qualification

Test: none
Change-Id: I90f7c9fea01c6074e904ccda6d9ea4bf6b458734
Merged-In: I6954b48ab99ceecbe3c5b44ec8240c0fad6d5655
Merged-In: Ib62ad87a71c6b4ac7ab63b0f95abdfbce23a20c4
diff --git a/AndroidTest.xml b/AndroidTest.xml
index c52bd5f..920605d 100644
--- a/AndroidTest.xml
+++ b/AndroidTest.xml
@@ -1,11 +1,11 @@
-<configuration description="Game benchmark test">
-    <option name="test-tag" value="graphics-benchmark" />
+<configuration description="Game qualification test">
+    <option name="test-tag" value="game-qualification" />
     <target_preparer class="com.android.tradefed.targetprep.InstallBuildEnvApkSetup">
-        <option name="apk-name" value="GraphicsBenchmarkTestCases.apk" />
+        <option name="apk-name" value="GameQualificationTestCases.apk" />
     </target_preparer>
 
-    <metrics_collector class="com.android.graphics.benchmark.metric.GraphicsBenchmarkMetricCollector" />
+    <metrics_collector class="com.android.game.qualification.metric.GameQualificationMetricCollector" />
 
-    <test class="com.android.graphics.benchmark.testtype.GraphicsBenchmarkHostsideController" />
+    <test class="com.android.game.qualification.testtype.GameQualificationHostsideController" />
 
 </configuration>
diff --git a/benchmark_libs/Android.bp b/benchmark_libs/Android.bp
index 0657698..5607556 100644
--- a/benchmark_libs/Android.bp
+++ b/benchmark_libs/Android.bp
@@ -13,11 +13,11 @@
 // limitations under the License.
 
 cc_library_shared {
-    name: "libagbench",
+    name: "libagq",
     sdk_version: "current",
 
     srcs: [
-        "android_benchmark.cpp"
+        "agq.cpp"
     ],
     export_include_dirs: ["."],
     shared_libs: ["liblog"],
diff --git a/benchmark_libs/android_benchmark.cpp b/benchmark_libs/agq.cpp
similarity index 74%
rename from benchmark_libs/android_benchmark.cpp
rename to benchmark_libs/agq.cpp
index 4b3da92..38594f5 100644
--- a/benchmark_libs/android_benchmark.cpp
+++ b/benchmark_libs/agq.cpp
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#include "android_benchmark.h"
+#include "agq.h"
 #include <jni.h>
 #include <android/log.h>
 #include <time.h>
 
-#define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, "AndroidGraphicsBenchmark", __VA_ARGS__))
+#define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, "AndroidGameQualification", __VA_ARGS__))
 
 static JavaVM* sJavaVm = nullptr;
 static JNIEnv* sJniEnv = nullptr;
@@ -33,7 +33,7 @@
 
 namespace android {
 
-static const char* const INTENT_START = "com.android.graphics.benchmark.START";
+static const char* const INTENT_START = "com.android.game.qualification.START";
 
 static JNIEnv* getJniEnv() {
     if (sJniEnv == nullptr) {
@@ -74,16 +74,16 @@
     return intent;
 }
 
-// Implementation of AndroidGraphicsBenchmark::Impl.
+// Implementation of android::GameQualification::Impl.
 
-class AndroidGraphicsBenchmark::Impl {
+class GameQualification::Impl {
 public:
-    void startBenchmark(jobject context);
-    void startBenchmark(ANativeActivity* activity);
+    void startLoop(jobject context);
+    void startLoop(ANativeActivity* activity);
 };
 
 
-void AndroidGraphicsBenchmark::Impl::startBenchmark(jobject context) {
+void GameQualification::Impl::startLoop(jobject context) {
     JNIEnv* env = getJniEnv();
     jclass contextClass = env->FindClass("android/content/Context");
     jmethodID method =
@@ -94,27 +94,27 @@
     env->CallVoidMethod(context, method, createIntent());
 }
 
-void AndroidGraphicsBenchmark::Impl::startBenchmark(ANativeActivity* activity) {
+void GameQualification::Impl::startLoop(ANativeActivity* activity) {
     sJavaVm = activity->vm;
-    startBenchmark(activity->clazz);
+    startLoop(activity->clazz);
 }
 
-/* Implementation of AndroidGraphicsBenchmark */
+/* Implementation of GameQualification */
 
-AndroidGraphicsBenchmark::AndroidGraphicsBenchmark() {
-    mImpl = new AndroidGraphicsBenchmark::Impl();
+GameQualification::GameQualification() {
+    mImpl = new GameQualification::Impl();
 }
 
-AndroidGraphicsBenchmark::~AndroidGraphicsBenchmark() {
+GameQualification::~GameQualification() {
     delete mImpl;
 }
 
-void AndroidGraphicsBenchmark::startBenchmark(jobject context) {
-    mImpl->startBenchmark(context);
+void GameQualification::startLoop(jobject context) {
+    mImpl->startLoop(context);
 }
 
-void AndroidGraphicsBenchmark::startBenchmark(ANativeActivity* activity) {
-    mImpl->startBenchmark(activity);
+void GameQualification::startLoop(ANativeActivity* activity) {
+    mImpl->startLoop(activity);
 }
 
 } // end of namespace android
diff --git a/benchmark_libs/android_benchmark.h b/benchmark_libs/agq.h
similarity index 66%
rename from benchmark_libs/android_benchmark.h
rename to benchmark_libs/agq.h
index 5dff2ae..7c86b95 100644
--- a/benchmark_libs/android_benchmark.h
+++ b/benchmark_libs/agq.h
@@ -14,39 +14,39 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_GRAPHICS_BENCHMARK_H
-#define ANDROID_GRAPHICS_BENCHMARK_H
+#ifndef AGQ_H
+#define AGQ_H
 
 #include <jni.h>
 #include <android/native_activity.h>
 
 namespace android {
 
-class AndroidGraphicsBenchmark {
+class GameQualification {
 private:
     class Impl;
     Impl* mImpl;
 
-    AndroidGraphicsBenchmark(const AndroidGraphicsBenchmark& that);
+    GameQualification(const GameQualification& that);
 public:
-    AndroidGraphicsBenchmark();
-    ~AndroidGraphicsBenchmark();
+    GameQualification();
+    ~GameQualification();
 
     /*
-     * Signal Android Graphics Benchmark the start of a loop.
+     * Signal Android Game Qualification library the start of a loop.
      *
      * For use with app with JNI.  context should be a jobject of type android.content.Context.
      */
-    void startBenchmark(jobject context);
+    void startLoop(jobject context);
 
     /*
-     * Signal Android Graphics Benchmark the start of a loop.
+     * Signal Android Game Qualification library the start of a loop.
      *
      * For use with pure native app using ANativeActivity.
      */
-    void startBenchmark(ANativeActivity* activity);
+    void startLoop(ANativeActivity* activity);
 };
 
 } // end of namespace android
 
-#endif // ANDROID_GRAPHICS_BENCHMARK_H
+#endif // AGQ_H
diff --git a/deviceside/Android.mk b/deviceside/Android.mk
index 4fb6630..165ca9f 100644
--- a/deviceside/Android.mk
+++ b/deviceside/Android.mk
@@ -19,9 +19,9 @@
 LOCAL_MODULE_TAGS := tests
 LOCAL_SDK_VERSION := 26  # Oreo
 
-LOCAL_PACKAGE_NAME := GraphicsBenchmarkTestCases
+LOCAL_PACKAGE_NAME := GameQualificationTestCases
 
-LOCAL_STATIC_JAVA_LIBRARIES := android-support-test graphicsbenchmarkhelper
+LOCAL_STATIC_JAVA_LIBRARIES := android-support-test gamequalificationhelper
 LOCAL_JAVA_LIBRARIES := android.test.runner.stubs
 
 LOCAL_COMPATIBILITY_SUITE := device-tests
diff --git a/deviceside/AndroidManifest.xml b/deviceside/AndroidManifest.xml
index c4b5dd4..e5398a9 100644
--- a/deviceside/AndroidManifest.xml
+++ b/deviceside/AndroidManifest.xml
@@ -2,13 +2,13 @@
 
 <manifest
     xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.android.graphics.benchmark.device">
+    package="com.android.game.qualification.device">
     <uses-sdk android:minSdkVersion="14" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 
     <instrumentation
       android:name="android.support.test.runner.AndroidJUnitRunner"
-      android:targetPackage="com.android.graphics.benchmark.device" />
+      android:targetPackage="com.android.game.qualification.device" />
 
     <application>
         <uses-library android:name="android.test.runner" />
diff --git a/deviceside/src/com/android/graphics/benchmark/device/GraphicsBenchmarkTest.java b/deviceside/src/com/android/game/qualification/device/GameQualificationTest.java
similarity index 93%
rename from deviceside/src/com/android/graphics/benchmark/device/GraphicsBenchmarkTest.java
rename to deviceside/src/com/android/game/qualification/device/GameQualificationTest.java
index 9590a1a..bff3f60 100644
--- a/deviceside/src/com/android/graphics/benchmark/device/GraphicsBenchmarkTest.java
+++ b/deviceside/src/com/android/game/qualification/device/GameQualificationTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.graphics.benchmark.device;
+package com.android.game.qualification.device;
 
 import android.content.BroadcastReceiver;
 import android.content.Context;
@@ -25,8 +25,8 @@
 import android.support.test.InstrumentationRegistry;
 import android.util.Log;
 
-import com.android.graphics.benchmark.ApkInfo;
-import com.android.graphics.benchmark.ApkListXmlParser;
+import com.android.game.qualification.ApkInfo;
+import com.android.game.qualification.ApkListXmlParser;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -43,10 +43,10 @@
 import javax.xml.parsers.ParserConfigurationException;
 
 @RunWith(Parameterized.class)
-public class GraphicsBenchmarkTest {
-    public static final String INTENT_ACTION = "com.android.graphics.benchmark.START";
+public class GameQualificationTest {
+    public static final String INTENT_ACTION = "com.android.game.qualification.START";
 
-    private static final String TAG = "GraphicsBenchmarkTest";
+    private static final String TAG = "GameQualificationTest";
 
     @Parameters(name = "{0}")
     public static Iterable<Object[]> data()
diff --git a/deviceside/src/com/android/graphics/benchmark/device/MetricsReporter.java b/deviceside/src/com/android/game/qualification/device/MetricsReporter.java
similarity index 87%
rename from deviceside/src/com/android/graphics/benchmark/device/MetricsReporter.java
rename to deviceside/src/com/android/game/qualification/device/MetricsReporter.java
index 4398fd3..2f12bb3 100644
--- a/deviceside/src/com/android/graphics/benchmark/device/MetricsReporter.java
+++ b/deviceside/src/com/android/game/qualification/device/MetricsReporter.java
@@ -13,18 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.android.graphics.benchmark.device;
+package com.android.game.qualification.device;
 
 import java.io.File;
 import java.io.OutputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.nio.file.Files;
-import java.util.ArrayList;
-import java.util.List;
 
-import com.android.graphics.benchmark.proto.ResultDataProto;
-import com.android.graphics.benchmark.ResultData;
+import com.android.game.qualification.proto.ResultDataProto;
+import com.android.game.qualification.ResultData;
 
 public class MetricsReporter {
     private String appName;
diff --git a/helper/Android.mk b/helper/Android.mk
index c6b1e39..d683f03 100644
--- a/helper/Android.mk
+++ b/helper/Android.mk
@@ -22,7 +22,7 @@
 	$(call all-java-files-under, src)\
 	$(call all-proto-files-under, proto)
 LOCAL_SDK_VERSION := 26  # Oreo
-LOCAL_MODULE := graphicsbenchmarkhelper
+LOCAL_MODULE := gamequalificationhelper
 LOCAL_MODULE_TAGS := optional
 
 include $(BUILD_STATIC_JAVA_LIBRARY)
@@ -32,7 +32,7 @@
 LOCAL_SRC_FILES := \
 	$(call all-java-files-under, src) \
 	$(call all-proto-files-under, proto)
-LOCAL_MODULE := graphicsbenchmarkhelper-host
+LOCAL_MODULE := gamequalificationhelper-host
 LOCAL_MODULE_TAGS := optional
 LOCAL_COMPATIBILITY_SUITE := general-tests
 
@@ -43,10 +43,10 @@
 include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES := $(call all-java-files-under, test)
-LOCAL_MODULE := graphicsbenchmarkhelper-test
+LOCAL_MODULE := gamequalificationhelper-test
 LOCAL_MODULE_TAGS := tests
 LOCAL_COMPATIBILITY_SUITE := general-tests
-LOCAL_JAVA_LIBRARIES := graphicsbenchmarkhelper-host junit-host
+LOCAL_JAVA_LIBRARIES := gamequalificationhelper-host junit-host
 
 include $(BUILD_HOST_JAVA_LIBRARY)
 
diff --git a/helper/proto/resultdata.proto b/helper/proto/resultdata.proto
index 6383b9e..fad2e9a 100644
--- a/helper/proto/resultdata.proto
+++ b/helper/proto/resultdata.proto
@@ -1,8 +1,8 @@
 syntax = "proto2";
 
-package graphicsbenchmark_proto;
+package gamequalification_proto;
 
-option java_package = "com.android.graphics.benchmark.proto";
+option java_package = "com.android.game.qualification.proto";
 option java_outer_classname = "ResultDataProto";
 
 message Event {
diff --git a/helper/src/com/android/graphics/benchmark/ApkInfo.java b/helper/src/com/android/game/qualification/ApkInfo.java
similarity index 94%
rename from helper/src/com/android/graphics/benchmark/ApkInfo.java
rename to helper/src/com/android/game/qualification/ApkInfo.java
index 9145908..6145903 100644
--- a/helper/src/com/android/graphics/benchmark/ApkInfo.java
+++ b/helper/src/com/android/game/qualification/ApkInfo.java
@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
-package com.android.graphics.benchmark;
+package com.android.game.qualification;
 
 import java.util.Collection;
 import java.util.List;
 
 public class ApkInfo {
-    public static final String APK_LIST_LOCATION = "/sdcard/benchmark/apk-info.xml";
+public static final String APK_LIST_LOCATION = "/sdcard/GameQualification/apk-info.xml";
 
     //TODO: support non-String args.
     public static class Argument {
diff --git a/helper/src/com/android/graphics/benchmark/ApkListXmlParser.java b/helper/src/com/android/game/qualification/ApkListXmlParser.java
similarity index 98%
rename from helper/src/com/android/graphics/benchmark/ApkListXmlParser.java
rename to helper/src/com/android/game/qualification/ApkListXmlParser.java
index 233758f..eb4daf3 100644
--- a/helper/src/com/android/graphics/benchmark/ApkListXmlParser.java
+++ b/helper/src/com/android/game/qualification/ApkListXmlParser.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.graphics.benchmark;
+package com.android.game.qualification;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
diff --git a/helper/src/com/android/graphics/benchmark/ResultData.java b/helper/src/com/android/game/qualification/ResultData.java
similarity index 83%
rename from helper/src/com/android/graphics/benchmark/ResultData.java
rename to helper/src/com/android/game/qualification/ResultData.java
index 4f7ff5b..707de35 100644
--- a/helper/src/com/android/graphics/benchmark/ResultData.java
+++ b/helper/src/com/android/game/qualification/ResultData.java
@@ -14,10 +14,10 @@
  * limitations under the License.
  */
 
-package com.android.graphics.benchmark;
+package com.android.game.qualification;
 
 public class ResultData {
-    public static final String RESULT_FILE_LOCATION = "benchmark/result.protobuf";
+    public static final String RESULT_FILE_LOCATION = "GameQualification/result.protobuf";
 
     private ResultData() {}
 }
diff --git a/helper/test/com/android/graphics/benchmark/ApkListXmlParserTest.java b/helper/test/com/android/game/qualification/ApkListXmlParserTest.java
similarity index 97%
rename from helper/test/com/android/graphics/benchmark/ApkListXmlParserTest.java
rename to helper/test/com/android/game/qualification/ApkListXmlParserTest.java
index dfb4a41..491db70 100644
--- a/helper/test/com/android/graphics/benchmark/ApkListXmlParserTest.java
+++ b/helper/test/com/android/game/qualification/ApkListXmlParserTest.java
@@ -1,9 +1,8 @@
-package com.android.graphics.benchmark;
+package com.android.game.qualification;
 
 
 import static org.junit.Assert.assertEquals;
 
-import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
diff --git a/hostside/Android.mk b/hostside/Android.mk
index defd604..a4d1637 100644
--- a/hostside/Android.mk
+++ b/hostside/Android.mk
@@ -20,11 +20,11 @@
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 LOCAL_JAVA_RESOURCE_DIRS := res
 
-LOCAL_MODULE := GraphicsBenchmarkHost
+LOCAL_MODULE := GameQualificationHost
 
 LOCAL_MODULE_TAGS := optional
 
-LOCAL_JAVA_LIBRARIES := tradefed graphicsbenchmarkhelper-host
+LOCAL_JAVA_LIBRARIES := tradefed gamequalificationhelper-host
 
 LOCAL_COMPATIBILITY_SUITE := general-tests
 
diff --git a/hostside/res/com/android/game/qualification/apk-info.xml b/hostside/res/com/android/game/qualification/apk-info.xml
new file mode 100644
index 0000000..7159fb9
--- /dev/null
+++ b/hostside/res/com/android/game/qualification/apk-info.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<apk-info>
+    <apk>
+        <name>sample</name>
+        <fileName>GameQualificationSampleApp.apk</fileName>
+        <packageName>com.android.game.qualification.example</packageName>
+        <layerName>SurfaceView - com.android.game.qualification.example/com.android.game.qualification.example.SampleActivity#0</layerName>
+    </apk>
+</apk-info>
\ No newline at end of file
diff --git a/hostside/res/com/android/graphics/benchmark/apk-info.xml b/hostside/res/com/android/graphics/benchmark/apk-info.xml
deleted file mode 100644
index b923d6d..0000000
--- a/hostside/res/com/android/graphics/benchmark/apk-info.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<apk-info>
-    <apk>
-        <name>sample</name>
-        <fileName>GraphicsBenchmarkSampleApp.apk</fileName>
-        <packageName>com.android.graphics.benchmark.example</packageName>
-        <layerName>SurfaceView - com.android.graphics.benchmark.example/com.android.graphics.benchmark.example.SampleActivity#0</layerName>
-    </apk>
-</apk-info>
\ No newline at end of file
diff --git a/hostside/src/com/android/graphics/benchmark/metric/GraphicsBenchmarkMetricCollector.java b/hostside/src/com/android/game/qualification/metric/GameQualificationMetricCollector.java
similarity index 93%
rename from hostside/src/com/android/graphics/benchmark/metric/GraphicsBenchmarkMetricCollector.java
rename to hostside/src/com/android/game/qualification/metric/GameQualificationMetricCollector.java
index a09f601..f625955 100644
--- a/hostside/src/com/android/graphics/benchmark/metric/GraphicsBenchmarkMetricCollector.java
+++ b/hostside/src/com/android/game/qualification/metric/GameQualificationMetricCollector.java
@@ -14,15 +14,13 @@
  * limitations under the License.
  */
 
-package com.android.graphics.benchmark.metric;
+package com.android.game.qualification.metric;
 
-import com.android.graphics.benchmark.ApkInfo;
-import com.android.graphics.benchmark.proto.ResultDataProto;
+import com.android.game.qualification.ApkInfo;
+import com.android.game.qualification.proto.ResultDataProto;
 
 import com.android.tradefed.device.metric.BaseDeviceMetricCollector;
 import com.android.tradefed.device.metric.DeviceMetricData;
-import com.android.tradefed.invoker.IInvocationContext;
-import com.android.graphics.benchmark.ApkInfo;
 import com.android.tradefed.device.ITestDevice;
 import com.android.tradefed.device.DeviceNotAvailableException;
 import com.android.tradefed.log.LogUtil.CLog;
@@ -34,10 +32,9 @@
 import java.io.BufferedWriter;
 import java.io.FileWriter;
 import java.io.IOException;
-import java.nio.file.Files;
 
 /** A {@link ScheduledDeviceMetricCollector} to collect graphics benchmarking stats at regular intervals. */
-public class GraphicsBenchmarkMetricCollector extends BaseDeviceMetricCollector {
+public class GameQualificationMetricCollector extends BaseDeviceMetricCollector {
     private long mLatestSeen = 0;
     private static ApkInfo mTestApk;
     private static ResultDataProto.Result mDeviceResultData;
@@ -247,12 +244,12 @@
     private void onEnd(DeviceMetricData runData) {
 
         // TODO: Find a way to send the results to the same directory as the inv. log files
-        try (BufferedWriter outputFile = new BufferedWriter(new FileWriter("/tmp/0/graphics-benchmark/out.txt", !mFirstRun))) {
+        try (BufferedWriter outputFile = new BufferedWriter(new FileWriter("/tmp/0/GameQualification/out.txt", !mFirstRun))) {
 
             outputFile.write("VSync Period: " + mVSyncPeriod + "\n\n");
 
             if (mDeviceResultData.getEventsCount() == 0) {
-                CLog.w("No start benchmark intent given; assuming single run with no loading period to exclude.");
+                CLog.w("No start intent given; assuming single run with no loading period to exclude.");
             }
 
             long startTime = 0L;
diff --git a/hostside/src/com/android/graphics/benchmark/testtype/GraphicsBenchmarkHostsideController.java b/hostside/src/com/android/game/qualification/testtype/GameQualificationHostsideController.java
similarity index 90%
rename from hostside/src/com/android/graphics/benchmark/testtype/GraphicsBenchmarkHostsideController.java
rename to hostside/src/com/android/game/qualification/testtype/GameQualificationHostsideController.java
index 00627b1..9064e0e 100644
--- a/hostside/src/com/android/graphics/benchmark/testtype/GraphicsBenchmarkHostsideController.java
+++ b/hostside/src/com/android/game/qualification/testtype/GameQualificationHostsideController.java
@@ -14,16 +14,16 @@
  * limitations under the License.
  */
 
-package com.android.graphics.benchmark.testtype;
+package com.android.game.qualification.testtype;
 
-import com.android.graphics.benchmark.metric.GraphicsBenchmarkMetricCollector;
-import com.android.graphics.benchmark.proto.ResultDataProto;
-import com.android.graphics.benchmark.ResultData;
+import com.android.game.qualification.ResultData;
+import com.android.game.qualification.metric.GameQualificationMetricCollector;
+import com.android.game.qualification.proto.ResultDataProto;
 
 import com.android.ddmlib.testrunner.RemoteAndroidTestRunner;
 import com.android.ddmlib.testrunner.TestIdentifier;
-import com.android.graphics.benchmark.ApkInfo;
-import com.android.graphics.benchmark.ApkListXmlParser;
+import com.android.game.qualification.ApkInfo;
+import com.android.game.qualification.ApkListXmlParser;
 import com.android.tradefed.config.Option;
 import com.android.tradefed.device.DeviceNotAvailableException;
 import com.android.tradefed.device.ITestDevice;
@@ -54,10 +54,10 @@
 
 import javax.xml.parsers.ParserConfigurationException;
 
-public class GraphicsBenchmarkHostsideController implements IShardableTest, IDeviceTest {
+public class GameQualificationHostsideController implements IShardableTest, IDeviceTest {
     // Package and class of the device side test.
-    private static final String PACKAGE = "com.android.graphics.benchmark.device";
-    private static final String CLASS = PACKAGE + ".GraphicsBenchmarkTest";
+    private static final String PACKAGE = "com.android.game.qualification.device";
+    private static final String CLASS = PACKAGE + ".GameQualificationTest";
 
     private static final String AJUR_RUNNER = "android.support.test.runner.AndroidJUnitRunner";
     private static final long DEFAULT_TEST_TIMEOUT_MS = 10 * 60 * 1000L; //10min
@@ -109,7 +109,7 @@
             for(int j = i; j < mApks.size(); j += shardCountHint) {
                 apkInfo.add(mApks.get(j));
             }
-            GraphicsBenchmarkHostsideController shard = new GraphicsBenchmarkHostsideController();
+            GameQualificationHostsideController shard = new GameQualificationHostsideController();
             shard.mApks = apkInfo;
             shard.mApkDir = getApkDir();
 
@@ -128,11 +128,11 @@
         for (ApkInfo apk : mApks) {
             File apkFile = findApk(apk.getFileName());
             getDevice().installPackage(apkFile, true);
-            GraphicsBenchmarkMetricCollector.setAppLayerName(apk);
+            GameQualificationMetricCollector.setAppLayerName(apk);
 
             // Might seem counter-intuitive, but the easiest way to get per-package results is
             // to put this call and the corresponding testRunEnd inside the for loop for now
-            listener.testRunStarted("graphicsbenchmark", mApks.size());
+            listener.testRunStarted("gamequalification", mApks.size());
 
              // TODO: Migrate to TF TestDescription when available
              TestIdentifier identifier = new TestIdentifier(CLASS, "run[" + apk.getName() + "]");
@@ -156,7 +156,7 @@
             listener.testEnded(identifier, testMetrics);
 
             ResultDataProto.Result resultData = retrieveResultData();
-            GraphicsBenchmarkMetricCollector.setDeviceResultData(resultData);
+            GameQualificationMetricCollector.setDeviceResultData(resultData);
 
             listener.testRunEnded(0, runMetrics);
 
@@ -208,7 +208,7 @@
             mApkInfoFile = new File(getApkDir(), "apk-info.xml");
 
             if (!mApkInfoFile.exists()) {
-                String resource = "/com/android/graphics/benchmark/apk-info.xml";
+                String resource = "/com/android/game/qualification/apk-info.xml";
                 try(InputStream inputStream = ApkInfo.class.getResourceAsStream(resource)) {
                     if (inputStream == null) {
                         throw new FileNotFoundException("Unable to find resource: " + resource);
diff --git a/sample_app/Android.mk b/sample_app/Android.mk
index a2e0eb7..7930ab5 100644
--- a/sample_app/Android.mk
+++ b/sample_app/Android.mk
@@ -20,16 +20,16 @@
 LOCAL_MODULE := libsample
 LOCAL_MODULE_TAGS := tests
 LOCAL_SRC_FILES := src/cpp/sample_activity.cpp
-LOCAL_SHARED_LIBRARIES := libagbench
+LOCAL_SHARED_LIBRARIES := libagq
 
 include $(BUILD_SHARED_LIBRARY)
 
 include $(CLEAR_VARS)
 
 LOCAL_SDK_VERSION := 26  # Oreo
-LOCAL_PACKAGE_NAME := GraphicsBenchmarkSampleApp
+LOCAL_PACKAGE_NAME := GameQualificationSampleApp
 LOCAL_MODULE_TAGS := tests
-LOCAL_JNI_SHARED_LIBRARIES := libagbench libsample
+LOCAL_JNI_SHARED_LIBRARIES := libagq libsample
 LOCAL_COMPATIBILITY_SUITE := device-tests
 LOCAL_SRC_FILES := $(call all-java-files-under, src/java)
 
diff --git a/sample_app/AndroidManifest.xml b/sample_app/AndroidManifest.xml
index bd77eb3..a2c4a43 100644
--- a/sample_app/AndroidManifest.xml
+++ b/sample_app/AndroidManifest.xml
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.android.graphics.benchmark.example">
+          package="com.android.game.qualification.example">
 
   <application
       android:allowBackup="false"
-      android:label="SampleBenchmark">
-    <activity android:name=".SampleActivity">
+      android:label="SampleQualificationApp">
+    <activity android:name="com.android.game.qualification.example.SampleActivity">
       <intent-filter>
         <action android:name="android.intent.action.MAIN"/>
 
diff --git a/sample_app/src/cpp/sample_activity.cpp b/sample_app/src/cpp/sample_activity.cpp
index 5504c3a..9f96b16 100644
--- a/sample_app/src/cpp/sample_activity.cpp
+++ b/sample_app/src/cpp/sample_activity.cpp
@@ -16,11 +16,11 @@
  */
 
 #include <jni.h>
-#include <android_benchmark.h>
+#include <agq.h>
 
 extern "C"
 JNIEXPORT void JNICALL
-Java_com_android_graphics_benchmark_example_SampleActivity_broadcastIntent(JNIEnv*, jobject instance) {
-    android::AndroidGraphicsBenchmark benchmark;
-    benchmark.startBenchmark(instance);
+Java_com_android_game_qualification_example_SampleActivity_broadcastIntent(JNIEnv*, jobject instance) {
+    android::GameQualification qualification;
+    qualification.startLoop(instance);
 }
diff --git a/sample_app/src/java/com/android/graphics/benchmark/example/MyGLRenderer.java b/sample_app/src/java/com/android/game/qualification/example/MyGLRenderer.java
similarity index 98%
rename from sample_app/src/java/com/android/graphics/benchmark/example/MyGLRenderer.java
rename to sample_app/src/java/com/android/game/qualification/example/MyGLRenderer.java
index 3b7d98a..af0df1e 100644
--- a/sample_app/src/java/com/android/graphics/benchmark/example/MyGLRenderer.java
+++ b/sample_app/src/java/com/android/game/qualification/example/MyGLRenderer.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.android.graphics.benchmark.example;
+package com.android.game.qualification.example;
 
 import android.opengl.GLES20;
 import android.opengl.GLSurfaceView;
diff --git a/sample_app/src/java/com/android/graphics/benchmark/example/MyGLSurfaceView.java b/sample_app/src/java/com/android/game/qualification/example/MyGLSurfaceView.java
similarity index 95%
rename from sample_app/src/java/com/android/graphics/benchmark/example/MyGLSurfaceView.java
rename to sample_app/src/java/com/android/game/qualification/example/MyGLSurfaceView.java
index c0897e7..1b7f3de 100644
--- a/sample_app/src/java/com/android/graphics/benchmark/example/MyGLSurfaceView.java
+++ b/sample_app/src/java/com/android/game/qualification/example/MyGLSurfaceView.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.android.graphics.benchmark.example;
+package com.android.game.qualification.example;
 
 import android.content.Context;
 import android.opengl.GLSurfaceView;
diff --git a/sample_app/src/java/com/android/graphics/benchmark/example/SampleActivity.java b/sample_app/src/java/com/android/game/qualification/example/SampleActivity.java
similarity index 97%
rename from sample_app/src/java/com/android/graphics/benchmark/example/SampleActivity.java
rename to sample_app/src/java/com/android/game/qualification/example/SampleActivity.java
index 82ecd72..87a48af 100644
--- a/sample_app/src/java/com/android/graphics/benchmark/example/SampleActivity.java
+++ b/sample_app/src/java/com/android/game/qualification/example/SampleActivity.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.android.graphics.benchmark.example;
+package com.android.game.qualification.example;
 
 import android.app.Activity;
 import android.opengl.GLSurfaceView;
diff --git a/sample_app/src/java/com/android/graphics/benchmark/example/Sphere.java b/sample_app/src/java/com/android/game/qualification/example/Sphere.java
similarity index 98%
rename from sample_app/src/java/com/android/graphics/benchmark/example/Sphere.java
rename to sample_app/src/java/com/android/game/qualification/example/Sphere.java
index 71ea90b..d2c0146 100644
--- a/sample_app/src/java/com/android/graphics/benchmark/example/Sphere.java
+++ b/sample_app/src/java/com/android/game/qualification/example/Sphere.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.android.graphics.benchmark.example;
+package com.android.game.qualification.example;
 
 import android.opengl.GLES20;