diff options
author | Mohammad Islam <samiul@google.com> | 2021-08-27 18:16:39 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-08-27 18:16:39 +0000 |
commit | 060d7f3321dd26e6d19f12a0b12a5aab13d99ffe (patch) | |
tree | 90f148d2eaa0821f1dc12c626cd60c9297f14964 | |
parent | b0a8f735abc55d369b2cdaaf8fe7bf67b49b13ca (diff) | |
parent | ac421259aac7c192bec6c873ba7fd573f36dcfae (diff) | |
download | native-060d7f3321dd26e6d19f12a0b12a5aab13d99ffe.tar.gz |
Merge "Create new AIDL objects for retrieving information about staged apex"
5 files changed, 110 insertions, 0 deletions
diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp index f53a2567c6..98750795d9 100644 --- a/libs/binder/Android.bp +++ b/libs/binder/Android.bp @@ -298,6 +298,9 @@ filegroup { "aidl/android/content/pm/IPackageChangeObserver.aidl", "aidl/android/content/pm/IPackageManagerNative.aidl", "aidl/android/content/pm/PackageChangeEvent.aidl", + "aidl/android/content/pm/IStagedApexObserver.aidl", + "aidl/android/content/pm/ApexStagedEvent.aidl", + "aidl/android/content/pm/StagedApexInfo.aidl", ], path: "aidl", } diff --git a/libs/binder/aidl/android/content/pm/ApexStagedEvent.aidl b/libs/binder/aidl/android/content/pm/ApexStagedEvent.aidl new file mode 100644 index 0000000000..75f87530f9 --- /dev/null +++ b/libs/binder/aidl/android/content/pm/ApexStagedEvent.aidl @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2021 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.content.pm; + +/** + * This event is designed for notification to native code listener about + * any changes to set of apex packages staged for installation on next boot. + * + * @hide + */ +parcelable ApexStagedEvent { + @utf8InCpp String[] stagedApexModuleNames; +} diff --git a/libs/binder/aidl/android/content/pm/IPackageManagerNative.aidl b/libs/binder/aidl/android/content/pm/IPackageManagerNative.aidl index dc8d74c052..c076be78b0 100644 --- a/libs/binder/aidl/android/content/pm/IPackageManagerNative.aidl +++ b/libs/binder/aidl/android/content/pm/IPackageManagerNative.aidl @@ -18,6 +18,8 @@ package android.content.pm; import android.content.pm.IPackageChangeObserver; +import android.content.pm.IStagedApexObserver; +import android.content.pm.StagedApexInfo; /** * Parallel implementation of certain {@link PackageManager} APIs that need to @@ -101,4 +103,24 @@ interface IPackageManagerNative { * This does nothing if this observer was not already registered. */ void unregisterPackageChangeObserver(in IPackageChangeObserver observer); + + /** Register a observer for change in set of staged APEX ready for installation */ + void registerStagedApexObserver(in IStagedApexObserver observer); + + /** + * Unregister an existing staged apex observer. + * This does nothing if this observer was not already registered. + */ + void unregisterStagedApexObserver(in IStagedApexObserver observer); + + /** + * Get APEX module names of all APEX that are staged ready for installation + */ + @utf8InCpp String[] getStagedApexModuleNames(); + + /** + * Get information of APEX which is staged ready for installation. + * Returns null if no such APEX is found. + */ + StagedApexInfo getStagedApexInfo(in @utf8InCpp String moduleName); } diff --git a/libs/binder/aidl/android/content/pm/IStagedApexObserver.aidl b/libs/binder/aidl/android/content/pm/IStagedApexObserver.aidl new file mode 100644 index 0000000000..9906436acf --- /dev/null +++ b/libs/binder/aidl/android/content/pm/IStagedApexObserver.aidl @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2021 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.content.pm; + +import android.content.pm.ApexStagedEvent; + +/** + * This is a non-blocking notification when set of staged apex has changed + * + * @hide + */ +oneway interface IStagedApexObserver { + void onApexStaged(in ApexStagedEvent event); +} diff --git a/libs/binder/aidl/android/content/pm/StagedApexInfo.aidl b/libs/binder/aidl/android/content/pm/StagedApexInfo.aidl new file mode 100644 index 0000000000..ece79895f7 --- /dev/null +++ b/libs/binder/aidl/android/content/pm/StagedApexInfo.aidl @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2021 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.content.pm; + +/** + * This object is designed for returning information regarding + * staged APEX that are ready to be installed on next reboot. + * + * @hide + */ +parcelable StagedApexInfo { + @utf8InCpp String moduleName; + @utf8InCpp String diskImagePath; + long versionCode; + @utf8InCpp String versionName; +} |