Fixed uninstallPackage

The argument to uninstallPackage should be the package name,
not the APK name.

Bug: 62987793
Test: run cts -o -d -m CtsDumpsysHostTestCases
      run cts -o -d -m CtsSecurityTestCases -t android.security.cts.PackageSignatureTest

Change-Id: I030325047a3d78cdef63f69480fadec72a1b5de9
diff --git a/hostsidetests/dumpsys/src/android/dumpsys/cts/StoragedDumpsysTest.java b/hostsidetests/dumpsys/src/android/dumpsys/cts/StoragedDumpsysTest.java
index af6a3c9..c8981c5 100644
--- a/hostsidetests/dumpsys/src/android/dumpsys/cts/StoragedDumpsysTest.java
+++ b/hostsidetests/dumpsys/src/android/dumpsys/cts/StoragedDumpsysTest.java
@@ -36,6 +36,12 @@
     private static final String DEVICE_SIDE_TEST_APK = "CtsStoragedTestApp.apk";
     private static final String DEVICE_SIDE_TEST_PACKAGE = "com.android.server.cts.storaged";
 
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        getDevice().uninstallPackage(DEVICE_SIDE_TEST_PACKAGE);
+    }
+
     /**
      * Tests the output of "dumpsys storaged --force --hours 0.01".
      *
@@ -48,7 +54,7 @@
         }
 
         if (mDevice.getAppPackageInfo(DEVICE_SIDE_TEST_APK) != null) {
-            getDevice().uninstallPackage(DEVICE_SIDE_TEST_APK);
+            getDevice().uninstallPackage(DEVICE_SIDE_TEST_PACKAGE);
         }
 
         CompatibilityBuildHelper buildHelper = new CompatibilityBuildHelper(mCtsBuild);
@@ -64,8 +70,6 @@
                 "com.android.server.cts.storaged.StoragedTest",
                 "testForegroundIO");
 
-        getDevice().uninstallPackage(DEVICE_SIDE_TEST_APK);
-
         String output = mDevice.executeShellCommand("dumpsys storaged --force --hours 0.01");
         assertNotNull(output);
         assertTrue(output.length() > 0);