Merge "remove dynamicArgs from public methods" into rvc-dev am: 2f83e15e18 am: 5ee5fed39d

Change-Id: I3a3308eeb7147c01c1043e33aeacbe1332500093
This commit is contained in:
Songchun Fan
2020-03-19 19:41:42 +00:00
committed by Automerger Merge Worker
3 changed files with 4 additions and 17 deletions

View File

@@ -2002,11 +2002,10 @@ package android.content.pm {
}
public class DataLoaderParams {
method @NonNull public static final android.content.pm.DataLoaderParams forIncremental(@NonNull android.content.ComponentName, @NonNull String, @Nullable java.util.Map<java.lang.String,android.os.ParcelFileDescriptor>);
method @NonNull public static final android.content.pm.DataLoaderParams forIncremental(@NonNull android.content.ComponentName, @NonNull String);
method @NonNull public static final android.content.pm.DataLoaderParams forStreaming(@NonNull android.content.ComponentName, @NonNull String);
method @NonNull public final String getArguments();
method @NonNull public final android.content.ComponentName getComponentName();
method @NonNull public final java.util.Map<java.lang.String,android.os.ParcelFileDescriptor> getDynamicArgs();
method @NonNull public final int getType();
}

View File

@@ -22,9 +22,7 @@ import android.annotation.SystemApi;
import android.content.ComponentName;
import android.os.ParcelFileDescriptor;
import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;
/**
* This class represents the parameters used to configure a Data Loader.
@@ -54,12 +52,10 @@ public class DataLoaderParams {
*
* @param componentName Data Loader component supporting Incremental installation.
* @param arguments free form installation arguments
* @param namedFds TODO(b/146080380) remove
*/
public static final @NonNull DataLoaderParams forIncremental(
@NonNull ComponentName componentName, @NonNull String arguments,
@Nullable Map<String, ParcelFileDescriptor> namedFds) {
return new DataLoaderParams(DataLoaderType.INCREMENTAL, componentName, arguments, namedFds);
@NonNull ComponentName componentName, @NonNull String arguments) {
return new DataLoaderParams(DataLoaderType.INCREMENTAL, componentName, arguments, null);
}
/** @hide */
@@ -115,12 +111,4 @@ public class DataLoaderParams {
public final @NonNull String getArguments() {
return mData.arguments;
}
/**
* @return data loader's dynamic arguments such as file descriptors TODO: remove
*/
public final @NonNull Map<String, ParcelFileDescriptor> getDynamicArgs() {
return Arrays.stream(mData.dynamicArgs).collect(
Collectors.toMap(p -> p.name, p -> p.fd));
}
}

View File

@@ -91,7 +91,7 @@ public class PackageManagerShellCommandDataLoader extends DataLoaderService {
static DataLoaderParams getIncrementalDataLoaderParams(ShellCommand shellCommand) {
return DataLoaderParams.forIncremental(new ComponentName(PACKAGE, CLASS),
getDataLoaderParamsArgs(shellCommand), null);
getDataLoaderParamsArgs(shellCommand));
}
private static int extractShellCommandId(String args) {