Merge "Expose SharedLibraryInfo#getAllCodePaths as @TestApi." am: 3f955dda5c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703011 Change-Id: I0ef56b657d6090b755750ca23211954f4d57e113
This commit is contained in:
@@ -537,6 +537,10 @@ package android.content.pm {
|
|||||||
field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.ProviderInfoList> CREATOR;
|
field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.ProviderInfoList> CREATOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class SharedLibraryInfo implements android.os.Parcelable {
|
||||||
|
method @NonNull public java.util.List<java.lang.String> getAllCodePaths();
|
||||||
|
}
|
||||||
|
|
||||||
public final class ShortcutInfo implements android.os.Parcelable {
|
public final class ShortcutInfo implements android.os.Parcelable {
|
||||||
method public boolean isVisibleToPublisher();
|
method public boolean isVisibleToPublisher();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import android.annotation.IntDef;
|
|||||||
import android.annotation.IntRange;
|
import android.annotation.IntRange;
|
||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.annotation.Nullable;
|
import android.annotation.Nullable;
|
||||||
|
import android.annotation.TestApi;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
@@ -29,6 +30,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class provides information for a shared library. There are
|
* This class provides information for a shared library. There are
|
||||||
@@ -177,7 +179,8 @@ public final class SharedLibraryInfo implements Parcelable {
|
|||||||
*
|
*
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public List<String> getAllCodePaths() {
|
@TestApi
|
||||||
|
public @NonNull List<String> getAllCodePaths() {
|
||||||
if (getPath() != null) {
|
if (getPath() != null) {
|
||||||
// Builtin library.
|
// Builtin library.
|
||||||
ArrayList<String> list = new ArrayList<>();
|
ArrayList<String> list = new ArrayList<>();
|
||||||
@@ -185,7 +188,7 @@ public final class SharedLibraryInfo implements Parcelable {
|
|||||||
return list;
|
return list;
|
||||||
} else {
|
} else {
|
||||||
// Static or dynamic library.
|
// Static or dynamic library.
|
||||||
return mCodePaths;
|
return Objects.requireNonNull(mCodePaths);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user