summaryrefslogtreecommitdiff
path: root/test-mock/src
diff options
context:
space:
mode:
authorCalin Juravle <calin@google.com>2017-11-07 18:49:43 -0800
committerCalin Juravle <calin@google.com>2017-12-04 14:26:46 -0800
commit45f8b29ce0ca9f80c586850c4be3a1e552bc6c2f (patch)
tree9913a099ec8f3f38240422d7cfbedef42b509f4b /test-mock/src
parent71e9a56fc30d66ad6d475fbf26425d791c2befa2 (diff)
Add SystemApis to expose runtime profile information
The API allows a system apps which acquired {@code android.permission.READ_RUNTIME_PROFILE} to snapshot the runtime profiles of installed packages. The API is implemented in a new service class (AndroidRuntimeManager) accessible from the context using context().getPackageManager().getAndroidRuntimeManager(). The main functionality is exposed as a one way call into the AndroidRuntimeManager with the result being posted on a callback. The profile is available to the caller as a read-only ParcelFileDescriptor. This CL only adds the API interfaces and validation. It does not fully implement the functionality. oneway void snapshotRuntimeProfile(in String packageName, in String codePath, in ISnapshotRuntimeProfileCallback callback) Bug: 30934496 Test: gts-tradefed -m GtsAndroidRuntimeManagerHostTestCases Change-Id: Iaa6be4715840f24508acba3162ea9c1ab725bd38
Diffstat (limited to 'test-mock/src')
-rw-r--r--test-mock/src/android/test/mock/MockPackageManager.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/test-mock/src/android/test/mock/MockPackageManager.java b/test-mock/src/android/test/mock/MockPackageManager.java
index 0c562e65bc85..ce8019f85632 100644
--- a/test-mock/src/android/test/mock/MockPackageManager.java
+++ b/test-mock/src/android/test/mock/MockPackageManager.java
@@ -46,6 +46,7 @@ import android.content.pm.ServiceInfo;
import android.content.pm.SharedLibraryInfo;
import android.content.pm.VerifierDeviceIdentity;
import android.content.pm.VersionedPackage;
+import android.content.pm.dex.ArtManager;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.graphics.Rect;
@@ -1174,4 +1175,12 @@ public class MockPackageManager extends PackageManager {
@Nullable DexModuleRegisterCallback callback) {
throw new UnsupportedOperationException();
}
+
+ /**
+ * @hide
+ */
+ @Override
+ public ArtManager getArtManager() {
+ throw new UnsupportedOperationException();
+ }
}