summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorAnna Trostanetski <atrost@google.com>2019-08-15 07:02:57 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-08-15 07:02:57 -0700
commiteb3326be84bb1bf36cfcd899ec30fbd13e930396 (patch)
tree54e3723024e3a39a28c925367302d14f5db54266 /core/java/android
parent7d019880fe5ae3364ead96472c8fe01c003f481b (diff)
parent77a833f3e029e61f74be546e31da359e4c249831 (diff)
Merge "Move IPlatformCompat.aidl definition to framework.jar" into stage-aosp-master
am: 77a833f3e0 Change-Id: I8d9d5bcaed39facc14e72289db3b4896b162f54d
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/compat/IPlatformCompat.aidl61
1 files changed, 61 insertions, 0 deletions
diff --git a/core/java/android/compat/IPlatformCompat.aidl b/core/java/android/compat/IPlatformCompat.aidl
new file mode 100644
index 000000000000..3d8a9d5c5e86
--- /dev/null
+++ b/core/java/android/compat/IPlatformCompat.aidl
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.compat;
+
+import android.content.pm.ApplicationInfo;
+
+/**
+ * Platform private API for talking with the PlatformCompat service.
+ *
+ * <p> Should be used for gating and logging from non-app processes.
+ * For app processes please use android.compat.Compatibility API.
+ *
+ * {@hide}
+ */
+interface IPlatformCompat
+{
+
+ /**
+ * Reports that a compatibility change is affecting an app process now.
+ *
+ * <p>Note: for changes that are gated using {@link #isChangeEnabled(long, ApplicationInfo)},
+ * you do not need to call this API directly. The change will be reported for you in the case
+ * that {@link #isChangeEnabled(long, ApplicationInfo)} returns {@code true}.
+ *
+ * @param changeId The ID of the compatibility change taking effect.
+ * @param appInfo Representing the affected app.
+ */
+ void reportChange(long changeId, in ApplicationInfo appInfo);
+
+ /**
+ * Query if a given compatibility change is enabled for an app process. This method should
+ * be called when implementing functionality on behalf of the affected app.
+ *
+ * <p>If this method returns {@code true}, the calling code should implement the compatibility
+ * change, resulting in differing behaviour compared to earlier releases. If this method returns
+ * {@code false}, the calling code should behave as it did in earlier releases.
+ *
+ * <p>When this method returns {@code true}, it will also report the change as
+ * {@link #reportChange(long, ApplicationInfo)} would, so there is no need to call that method
+ * directly.
+ *
+ * @param changeId The ID of the compatibility change in question.
+ * @param appInfo Representing the app in question.
+ * @return {@code true} if the change is enabled for the current app.
+ */
+ boolean isChangeEnabled(long changeId, in ApplicationInfo appInfo);
+} \ No newline at end of file