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

Commit c7c2e0e2 authored by Songchun Fan's avatar Songchun Fan Committed by Android (Google) Code Review
Browse files

Merge "[incremental/pm] register progress listener"

parents 19ede2f1 a7098594
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1029,6 +1029,7 @@ filegroup {
    name: "incremental_manager_aidl",
    srcs: [
        "core/java/android/os/incremental/IIncrementalService.aidl",
        "core/java/android/os/incremental/IStorageLoadingProgressListener.aidl",
        "core/java/android/os/incremental/IncrementalNewFileParams.aidl",
        "core/java/android/os/incremental/IStorageHealthListener.aidl",
        "core/java/android/os/incremental/StorageHealthCheckParams.aidl",
+25 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 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;

/**
 * Callbacks for Package Manager to report package loading progress to listeners.
 * @hide
 */
oneway interface IPackageLoadingProgressCallback {
    void onPackageLoadingProgressChanged(float progress);
}
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.content.pm.IPackageInstaller;
import android.content.pm.IPackageDeleteObserver;
import android.content.pm.IPackageDeleteObserver2;
import android.content.pm.IPackageDataObserver;
import android.content.pm.IPackageLoadingProgressCallback;
import android.content.pm.IPackageMoveObserver;
import android.content.pm.IPackageStatsObserver;
import android.content.pm.IntentFilterVerificationInfo;
+11 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.os.incremental;
import android.content.pm.DataLoaderParamsParcel;
import android.content.pm.IDataLoaderStatusListener;
import android.os.incremental.IncrementalNewFileParams;
import android.os.incremental.IStorageLoadingProgressListener;
import android.os.incremental.IStorageHealthListener;
import android.os.incremental.StorageHealthCheckParams;

@@ -133,4 +134,14 @@ interface IIncrementalService {
     * Waits until all native library extraction is done for the storage
     */
    boolean waitForNativeBinariesExtraction(int storageId);

    /**
     * Register to start listening for loading progress change for a storage.
     */
    boolean registerLoadingProgressListener(int storageId, IStorageLoadingProgressListener listener);

    /**
     * Stop listening for the loading progress change for a storage.
     */
    boolean unregisterLoadingProgressListener(int storageId);
}
+25 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 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.os.incremental;

/**
 * Callbacks for Incremental Service to report storage loading progress to Package Manager Service.
 * @hide
 */
oneway interface IStorageLoadingProgressListener {
    void onStorageLoadingProgressChanged(int storageId, float progress);
}
Loading