Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80cf0fec authored by Mohammad Samiul Islam's avatar Mohammad Samiul Islam Committed by Automerger Merge Worker
Browse files

Merge "Create new AIDL objects for retrieving information about staged apex"...

Merge "Create new AIDL objects for retrieving information about staged apex" into stage-aosp-master am: 7cbd8d49

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15639100

Change-Id: I8e55e223307533b256841f3a17c3598fab26976b
parents c5fa804f 7cbd8d49
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -295,6 +295,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",
}
+27 −0
Original line number Diff line number Diff line
/*
 * 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;
}
+22 −0
Original line number Diff line number Diff line
@@ -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
@@ -123,4 +125,24 @@ interface IPackageManagerNative {
     * requested version.
     */
    boolean hasSystemFeature(in String featureName, in int version);

    /** 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);
}
+28 −0
Original line number Diff line number Diff line
/*
 * 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);
}
+30 −0
Original line number Diff line number Diff line
/*
 * 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;
}