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

Commit ea14d191 authored by Alex Buynytskyy's avatar Alex Buynytskyy
Browse files

Migrating Incremental* APIs to PackageManager APIs.

This is the first step, migrating java parts.
CleanSpec.mk added as a workaround for b/146502407

Test: builds and flashes
Bug: b/136132412

Change-Id: Id0a26aa011b555ea457b5aafe7f5789c36d25bcc
parent 62fc781f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -807,9 +807,11 @@ filegroup {
filegroup {
    name: "dataloader_aidl",
    srcs: [
        "core/java/android/content/pm/DataLoaderParamsParcel.aidl",
        "core/java/android/content/pm/FileSystemControlParcel.aidl",
        "core/java/android/content/pm/IDataLoaderStatusListener.aidl",
        "core/java/android/os/incremental/IncrementalDataLoaderParamsParcel.aidl",
        "core/java/android/os/incremental/NamedParcelFileDescriptor.aidl",
        "core/java/android/content/pm/IPackageInstallerSessionFileSystemConnector.aidl",
        "core/java/android/content/pm/NamedParcelFileDescriptor.aidl",
    ],
    path: "core/java",
}
+2 −0
Original line number Diff line number Diff line
@@ -257,6 +257,8 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/ext.jar)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/telephony/java/com/google/android/mms)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/*-service.jar)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/service-statsd.jar)
$(call add-clean-step, rm -rf $(SOONG_OUT_DIR)/.intermediates/frameworks/base/libincremental_aidl-cpp-source/)
$(call add-clean-step, rm -rf $(SOONG_OUT_DIR)/.intermediates/frameworks/base/libincremental_manager_aidl-cpp-source/)
# ******************************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST ABOVE THIS BANNER
# ******************************************************************
+7 −7
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package android.os.incremental;
package android.content.pm;

import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -29,12 +29,12 @@ import java.util.stream.Collectors;
 * Hide for now.
 * @hide
 */
public class IncrementalDataLoaderParams {
    @NonNull private final IncrementalDataLoaderParamsParcel mData;
public class DataLoaderParams {
    @NonNull private final DataLoaderParamsParcel mData;

    public IncrementalDataLoaderParams(@NonNull String url, @NonNull String packageName,
    public DataLoaderParams(@NonNull String url, @NonNull String packageName,
            @Nullable Map<String, ParcelFileDescriptor> namedFds) {
        IncrementalDataLoaderParamsParcel data = new IncrementalDataLoaderParamsParcel();
        DataLoaderParamsParcel data = new DataLoaderParamsParcel();
        data.staticArgs = url;
        data.packageName = packageName;
        if (namedFds == null || namedFds.isEmpty()) {
@@ -52,7 +52,7 @@ public class IncrementalDataLoaderParams {
        mData = data;
    }

    public IncrementalDataLoaderParams(@NonNull IncrementalDataLoaderParamsParcel data) {
    public DataLoaderParams(@NonNull DataLoaderParamsParcel data) {
        mData = data;
    }

@@ -70,7 +70,7 @@ public class IncrementalDataLoaderParams {
        return mData.packageName;
    }

    public final @NonNull IncrementalDataLoaderParamsParcel getData() {
    public final @NonNull DataLoaderParamsParcel getData() {
        return mData;
    }

+3 −3
Original line number Diff line number Diff line
@@ -14,15 +14,15 @@
 * limitations under the License.
 */

package android.os.incremental;
package android.content.pm;

import android.os.incremental.NamedParcelFileDescriptor;
import android.content.pm.NamedParcelFileDescriptor;

/**
 * Class for holding data loader configuration parameters.
 * @hide
 */
parcelable IncrementalDataLoaderParamsParcel {
parcelable DataLoaderParamsParcel {
    @utf8InCpp String packageName;
    @utf8InCpp String staticArgs;
    NamedParcelFileDescriptor[] dynamicArgs;
+31 −0
Original line number Diff line number Diff line
/*
 * 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.content.pm;

import android.content.pm.IPackageInstallerSessionFileSystemConnector;
import android.os.incremental.IncrementalFileSystemControlParcel;

/**
 * Wraps info needed for DataLoader to provide data.
 * @hide
 */
parcelable FileSystemControlParcel {
    // Incremental FS control descriptors.
    @nullable IncrementalFileSystemControlParcel incremental;
    // Callback-based installation connector.
    @nullable IPackageInstallerSessionFileSystemConnector callback;
}
Loading