Merge "TIF: Unhide TvInputInfo.getExtra() and TvInputInfo.Builder.setExtra()" into nyc-dev
diff --git a/api/current.txt b/api/current.txt
index f4f8c97..eb129da 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -9499,8 +9499,6 @@
method public java.util.List<android.content.pm.LauncherActivityInfo> getActivityList(java.lang.String, android.os.UserHandle);
method public android.os.ParcelFileDescriptor getShortcutIconFd(android.content.pm.ShortcutInfo);
method public android.os.ParcelFileDescriptor getShortcutIconFd(java.lang.String, java.lang.String, android.os.UserHandle);
- method public int getShortcutIconResId(android.content.pm.ShortcutInfo);
- method public int getShortcutIconResId(java.lang.String, java.lang.String, android.os.UserHandle);
method public java.util.List<android.content.pm.ShortcutInfo> getShortcuts(android.content.pm.LauncherApps.ShortcutQuery, android.os.UserHandle);
method public boolean hasShortcutHostPermission();
method public boolean isActivityEnabled(android.content.ComponentName, android.os.UserHandle);
@@ -10041,7 +10039,9 @@
public final class ShortcutInfo implements android.os.Parcelable {
method public int describeContents();
method public android.content.ComponentName getActivityComponent();
+ method public java.util.List<java.lang.String> getCategories();
method public android.os.PersistableBundle getExtras();
+ method public int getIconResourceId();
method public java.lang.String getId();
method public android.content.Intent getIntent();
method public long getLastChangedTimestamp();
@@ -10065,12 +10065,14 @@
field public static final int FLAG_HAS_ICON_RES = 4; // 0x4
field public static final int FLAG_KEY_FIELDS_ONLY = 16; // 0x10
field public static final int FLAG_PINNED = 2; // 0x2
+ field public static final java.lang.String SHORTCUT_CATEGORY_CONVERSATION = "android.shortcut.conversation";
}
public static class ShortcutInfo.Builder {
ctor public ShortcutInfo.Builder(android.content.Context);
method public android.content.pm.ShortcutInfo build();
method public android.content.pm.ShortcutInfo.Builder setActivityComponent(android.content.ComponentName);
+ method public android.content.pm.ShortcutInfo.Builder setCategories(java.util.List<java.lang.String>);
method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle);
method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon);
method public android.content.pm.ShortcutInfo.Builder setId(java.lang.String);
@@ -10081,15 +10083,15 @@
}
public class ShortcutManager {
- method public boolean addDynamicShortcut(android.content.pm.ShortcutInfo);
- method public void deleteAllDynamicShortcuts();
- method public void deleteDynamicShortcut(java.lang.String);
+ method public boolean addDynamicShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
method public java.util.List<android.content.pm.ShortcutInfo> getDynamicShortcuts();
method public int getIconMaxDimensions();
method public int getMaxDynamicShortcutCount();
method public java.util.List<android.content.pm.ShortcutInfo> getPinnedShortcuts();
method public long getRateLimitResetTime();
method public int getRemainingCallCount();
+ method public void removeAllDynamicShortcuts();
+ method public void removeDynamicShortcuts(java.util.List<java.lang.String>);
method public boolean setDynamicShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
method public boolean updateShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
}
@@ -14435,13 +14437,13 @@
public final class OutputConfiguration implements android.os.Parcelable {
ctor public OutputConfiguration(android.view.Surface);
+ ctor public OutputConfiguration(int, android.view.Surface);
method public int describeContents();
method public android.view.Surface getSurface();
- method public int getSurfaceSetId();
- method public void setSurfaceSetId(int);
+ method public int getSurfaceGroupId();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.hardware.camera2.params.OutputConfiguration> CREATOR;
- field public static final int SURFACE_SET_ID_INVALID = -1; // 0xffffffff
+ field public static final int SURFACE_GROUP_ID_NONE = -1; // 0xffffffff
}
public final class RggbChannelVector {
diff --git a/api/system-current.txt b/api/system-current.txt
index a7bf3e6..5bfbc16 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -9837,8 +9837,6 @@
method public java.util.List<android.content.pm.LauncherActivityInfo> getActivityList(java.lang.String, android.os.UserHandle);
method public android.os.ParcelFileDescriptor getShortcutIconFd(android.content.pm.ShortcutInfo);
method public android.os.ParcelFileDescriptor getShortcutIconFd(java.lang.String, java.lang.String, android.os.UserHandle);
- method public int getShortcutIconResId(android.content.pm.ShortcutInfo);
- method public int getShortcutIconResId(java.lang.String, java.lang.String, android.os.UserHandle);
method public java.util.List<android.content.pm.ShortcutInfo> getShortcuts(android.content.pm.LauncherApps.ShortcutQuery, android.os.UserHandle);
method public boolean hasShortcutHostPermission();
method public boolean isActivityEnabled(android.content.ComponentName, android.os.UserHandle);
@@ -10441,7 +10439,9 @@
public final class ShortcutInfo implements android.os.Parcelable {
method public int describeContents();
method public android.content.ComponentName getActivityComponent();
+ method public java.util.List<java.lang.String> getCategories();
method public android.os.PersistableBundle getExtras();
+ method public int getIconResourceId();
method public java.lang.String getId();
method public android.content.Intent getIntent();
method public long getLastChangedTimestamp();
@@ -10465,12 +10465,14 @@
field public static final int FLAG_HAS_ICON_RES = 4; // 0x4
field public static final int FLAG_KEY_FIELDS_ONLY = 16; // 0x10
field public static final int FLAG_PINNED = 2; // 0x2
+ field public static final java.lang.String SHORTCUT_CATEGORY_CONVERSATION = "android.shortcut.conversation";
}
public static class ShortcutInfo.Builder {
ctor public ShortcutInfo.Builder(android.content.Context);
method public android.content.pm.ShortcutInfo build();
method public android.content.pm.ShortcutInfo.Builder setActivityComponent(android.content.ComponentName);
+ method public android.content.pm.ShortcutInfo.Builder setCategories(java.util.List<java.lang.String>);
method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle);
method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon);
method public android.content.pm.ShortcutInfo.Builder setId(java.lang.String);
@@ -10481,15 +10483,15 @@
}
public class ShortcutManager {
- method public boolean addDynamicShortcut(android.content.pm.ShortcutInfo);
- method public void deleteAllDynamicShortcuts();
- method public void deleteDynamicShortcut(java.lang.String);
+ method public boolean addDynamicShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
method public java.util.List<android.content.pm.ShortcutInfo> getDynamicShortcuts();
method public int getIconMaxDimensions();
method public int getMaxDynamicShortcutCount();
method public java.util.List<android.content.pm.ShortcutInfo> getPinnedShortcuts();
method public long getRateLimitResetTime();
method public int getRemainingCallCount();
+ method public void removeAllDynamicShortcuts();
+ method public void removeDynamicShortcuts(java.util.List<java.lang.String>);
method public boolean setDynamicShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
method public boolean updateShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
}
@@ -14843,20 +14845,20 @@
public final class OutputConfiguration implements android.os.Parcelable {
ctor public OutputConfiguration(android.view.Surface);
+ ctor public OutputConfiguration(int, android.view.Surface);
ctor public OutputConfiguration(android.view.Surface, int);
- ctor public OutputConfiguration(android.hardware.camera2.params.OutputConfiguration);
+ ctor public OutputConfiguration(int, android.view.Surface, int);
method public int describeContents();
method public int getRotation();
method public android.view.Surface getSurface();
- method public int getSurfaceSetId();
- method public void setSurfaceSetId(int);
+ method public int getSurfaceGroupId();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.hardware.camera2.params.OutputConfiguration> CREATOR;
field public static final int ROTATION_0 = 0; // 0x0
field public static final int ROTATION_180 = 2; // 0x2
field public static final int ROTATION_270 = 3; // 0x3
field public static final int ROTATION_90 = 1; // 0x1
- field public static final int SURFACE_SET_ID_INVALID = -1; // 0xffffffff
+ field public static final int SURFACE_GROUP_ID_NONE = -1; // 0xffffffff
}
public final class RggbChannelVector {
diff --git a/api/test-current.txt b/api/test-current.txt
index c78da1b..04fedb1 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -9509,8 +9509,6 @@
method public java.util.List<android.content.pm.LauncherActivityInfo> getActivityList(java.lang.String, android.os.UserHandle);
method public android.os.ParcelFileDescriptor getShortcutIconFd(android.content.pm.ShortcutInfo);
method public android.os.ParcelFileDescriptor getShortcutIconFd(java.lang.String, java.lang.String, android.os.UserHandle);
- method public int getShortcutIconResId(android.content.pm.ShortcutInfo);
- method public int getShortcutIconResId(java.lang.String, java.lang.String, android.os.UserHandle);
method public java.util.List<android.content.pm.ShortcutInfo> getShortcuts(android.content.pm.LauncherApps.ShortcutQuery, android.os.UserHandle);
method public boolean hasShortcutHostPermission();
method public boolean isActivityEnabled(android.content.ComponentName, android.os.UserHandle);
@@ -10052,7 +10050,9 @@
public final class ShortcutInfo implements android.os.Parcelable {
method public int describeContents();
method public android.content.ComponentName getActivityComponent();
+ method public java.util.List<java.lang.String> getCategories();
method public android.os.PersistableBundle getExtras();
+ method public int getIconResourceId();
method public java.lang.String getId();
method public android.content.Intent getIntent();
method public long getLastChangedTimestamp();
@@ -10076,12 +10076,14 @@
field public static final int FLAG_HAS_ICON_RES = 4; // 0x4
field public static final int FLAG_KEY_FIELDS_ONLY = 16; // 0x10
field public static final int FLAG_PINNED = 2; // 0x2
+ field public static final java.lang.String SHORTCUT_CATEGORY_CONVERSATION = "android.shortcut.conversation";
}
public static class ShortcutInfo.Builder {
ctor public ShortcutInfo.Builder(android.content.Context);
method public android.content.pm.ShortcutInfo build();
method public android.content.pm.ShortcutInfo.Builder setActivityComponent(android.content.ComponentName);
+ method public android.content.pm.ShortcutInfo.Builder setCategories(java.util.List<java.lang.String>);
method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle);
method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon);
method public android.content.pm.ShortcutInfo.Builder setId(java.lang.String);
@@ -10093,15 +10095,15 @@
public class ShortcutManager {
ctor public ShortcutManager(android.content.Context);
- method public boolean addDynamicShortcut(android.content.pm.ShortcutInfo);
- method public void deleteAllDynamicShortcuts();
- method public void deleteDynamicShortcut(java.lang.String);
+ method public boolean addDynamicShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
method public java.util.List<android.content.pm.ShortcutInfo> getDynamicShortcuts();
method public int getIconMaxDimensions();
method public int getMaxDynamicShortcutCount();
method public java.util.List<android.content.pm.ShortcutInfo> getPinnedShortcuts();
method public long getRateLimitResetTime();
method public int getRemainingCallCount();
+ method public void removeAllDynamicShortcuts();
+ method public void removeDynamicShortcuts(java.util.List<java.lang.String>);
method public boolean setDynamicShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
method public boolean updateShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
}
@@ -14447,13 +14449,13 @@
public final class OutputConfiguration implements android.os.Parcelable {
ctor public OutputConfiguration(android.view.Surface);
+ ctor public OutputConfiguration(int, android.view.Surface);
method public int describeContents();
method public android.view.Surface getSurface();
- method public int getSurfaceSetId();
- method public void setSurfaceSetId(int);
+ method public int getSurfaceGroupId();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.hardware.camera2.params.OutputConfiguration> CREATOR;
- field public static final int SURFACE_SET_ID_INVALID = -1; // 0xffffffff
+ field public static final int SURFACE_GROUP_ID_NONE = -1; // 0xffffffff
}
public final class RggbChannelVector {
diff --git a/core/java/android/content/pm/IShortcutService.aidl b/core/java/android/content/pm/IShortcutService.aidl
index 31d377b..9c90346 100644
--- a/core/java/android/content/pm/IShortcutService.aidl
+++ b/core/java/android/content/pm/IShortcutService.aidl
@@ -28,11 +28,12 @@
ParceledListSlice getDynamicShortcuts(String packageName, int userId);
- boolean addDynamicShortcut(String packageName, in ShortcutInfo shortcutInfo, int userId);
+ boolean addDynamicShortcuts(String packageName, in ParceledListSlice shortcutInfoList,
+ int userId);
- void deleteDynamicShortcut(String packageName, in String shortcutId, int userId);
+ void removeDynamicShortcuts(String packageName, in List shortcutIds, int userId);
- void deleteAllDynamicShortcuts(String packageName, int userId);
+ void removeAllDynamicShortcuts(String packageName, int userId);
ParceledListSlice getPinnedShortcuts(String packageName, int userId);
diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java
index 7c2d4aa..824722d 100644
--- a/core/java/android/content/pm/LauncherApps.java
+++ b/core/java/android/content/pm/LauncherApps.java
@@ -39,6 +39,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -490,43 +491,24 @@
}
/**
- * Return the icon resource ID, if {@code shortcut} has one
- * (i.e. when {@link ShortcutInfo#hasIconResource()} returns {@code true}).
- *
- * <p>Callers must be allowed to access the shortcut information, as defined in {@link
- * #hasShortcutHostPermission()}.
- *
- * @param shortcut The target shortcut.
+ * @hide kept for testing.
*/
public int getShortcutIconResId(@NonNull ShortcutInfo shortcut) {
- return getShortcutIconResId(shortcut.getPackageName(), shortcut.getId(),
- shortcut.getUserId());
+ return shortcut.getIconResourceId();
}
/**
- * Return the icon resource ID, if {@code shortcut} has one
- * (i.e. when {@link ShortcutInfo#hasIconResource()} returns {@code true}).
- *
- * <p>Callers must be allowed to access the shortcut information, as defined in {@link
- * #hasShortcutHostPermission()}.
- *
- * @param packageName The target package name.
- * @param shortcutId The ID of the shortcut to lad rom.
- * @param user The UserHandle of the profile.
+ * @hide kept for testing.
*/
public int getShortcutIconResId(@NonNull String packageName, @NonNull String shortcutId,
@NonNull UserHandle user) {
- return getShortcutIconResId(packageName, shortcutId, user.getIdentifier());
- }
+ final ShortcutQuery q = new ShortcutQuery();
+ q.setPackage(packageName);
+ q.setShortcutIds(Arrays.asList(shortcutId));
+ q.setQueryFlags(ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_PINNED);
+ final List<ShortcutInfo> shortcuts = getShortcuts(q, user);
- private int getShortcutIconResId(@NonNull String packageName, @NonNull String shortcutId,
- int userId) {
- try {
- return mService.getShortcutIconResId(mContext.getPackageName(),
- packageName, shortcutId, userId);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
+ return shortcuts.size() > 0 ? shortcuts.get(0).getIconResourceId() : 0;
}
/**
diff --git a/core/java/android/content/pm/ShortcutInfo.java b/core/java/android/content/pm/ShortcutInfo.java
index 7a807c4..a900015 100644
--- a/core/java/android/content/pm/ShortcutInfo.java
+++ b/core/java/android/content/pm/ShortcutInfo.java
@@ -34,6 +34,8 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.ArrayList;
+import java.util.List;
// TODO Enhance javadoc
/**
@@ -107,6 +109,11 @@
@Retention(RetentionPolicy.SOURCE)
public @interface CloneFlags {}
+ /**
+ * Shortcut category for
+ */
+ public static final String SHORTCUT_CATEGORY_CONVERSATION = "android.shortcut.conversation";
+
private final String mId;
@NonNull
@@ -124,6 +131,9 @@
@Nullable
private String mText;
+ @NonNull
+ private List<String> mCategories;
+
/**
* Intent *with extras removed*.
*/
@@ -168,6 +178,7 @@
mIcon = b.mIcon;
mTitle = b.mTitle;
mText = b.mText;
+ mCategories = clone(b.mCategories);
mIntent = b.mIntent;
if (mIntent != null) {
final Bundle intentExtras = mIntent.getExtras();
@@ -181,6 +192,10 @@
updateTimestamp();
}
+ private <T> ArrayList<T> clone(List<T> source) {
+ return (source == null) ? null : new ArrayList<>(source);
+ }
+
/**
* Throws if any of the mandatory fields is not set.
*
@@ -202,17 +217,20 @@
mFlags = source.mFlags;
mLastChangedTimestamp = source.mLastChangedTimestamp;
+ // Just always keep it since it's cheep.
+ mIconResourceId = source.mIconResourceId;
+
if ((cloneFlags & CLONE_REMOVE_NON_KEY_INFO) == 0) {
mActivityComponent = source.mActivityComponent;
if ((cloneFlags & CLONE_REMOVE_ICON) == 0) {
mIcon = source.mIcon;
mBitmapPath = source.mBitmapPath;
- mIconResourceId = source.mIconResourceId;
}
mTitle = source.mTitle;
mText = source.mText;
+ mCategories = clone(source.mCategories);
if ((cloneFlags & CLONE_REMOVE_INTENT) == 0) {
mIntent = source.mIntent;
mIntentPersistableExtras = source.mIntentPersistableExtras;
@@ -262,6 +280,9 @@
if (source.mText != null) {
mText = source.mText;
}
+ if (source.mCategories != null) {
+ mCategories = clone(source.mCategories);
+ }
if (source.mIntent != null) {
mIntent = source.mIntent;
mIntentPersistableExtras = source.mIntentPersistableExtras;
@@ -325,6 +346,8 @@
private String mText;
+ private List<String> mCategories;
+
private Intent mIntent;
private int mWeight;
@@ -369,8 +392,9 @@
*
* <p>For performance reasons, icons will <b>NOT</b> be available on instances
* returned by {@link ShortcutManager} or {@link LauncherApps}. Launcher applications
- * need to use {@link LauncherApps#getShortcutIconFd(ShortcutInfo)}
- * and {@link LauncherApps#getShortcutIconResId(ShortcutInfo)}.
+ * can use {@link ShortcutInfo#getIconResourceId()} if {@link #hasIconResource()} is true.
+ * Otherwise, if {@link #hasIconFile()} is true, use
+ * {@link LauncherApps#getShortcutIconFd} to load the image.
*/
@NonNull
public Builder setIcon(Icon icon) {
@@ -403,6 +427,18 @@
}
/**
+ * Sets categories for a shortcut. Launcher applications may use this information to
+ * categorise shortcuts.
+ *
+ * @see #SHORTCUT_CATEGORY_CONVERSATION
+ */
+ @NonNull
+ public Builder setCategories(List<String> categories) {
+ mCategories = categories;
+ return this;
+ }
+
+ /**
* Sets the intent of a shortcut. This is a mandatory field. The extras must only contain
* persistable information. (See {@link PersistableBundle}).
*/
@@ -500,6 +536,14 @@
}
/**
+ * Return the categories.
+ */
+ @Nullable
+ public List<String> getCategories() {
+ return mCategories;
+ }
+
+ /**
* Return the intent.
*
* <p>All shortcuts must have an intent, but this method will return null when
@@ -662,7 +706,9 @@
mIconResourceId = iconResourceId;
}
- /** @hide */
+ /**
+ * Get the resource ID for the icon, valid only when {@link #hasIconResource()} } is true.
+ */
public int getIconResourceId() {
return mIconResourceId;
}
@@ -687,6 +733,8 @@
mIcon = source.readParcelable(cl);
mTitle = source.readString();
mText = source.readString();
+ mCategories = new ArrayList<>();
+ source.readStringList(mCategories);
mIntent = source.readParcelable(cl);
mIntentPersistableExtras = source.readParcelable(cl);
mWeight = source.readInt();
@@ -706,6 +754,7 @@
dest.writeParcelable(mIcon, flags);
dest.writeString(mTitle);
dest.writeString(mText);
+ dest.writeStringList(mCategories);
dest.writeParcelable(mIntent, flags);
dest.writeParcelable(mIntentPersistableExtras, flags);
dest.writeInt(mWeight);
@@ -770,6 +819,9 @@
sb.append(", text=");
sb.append(secure ? "***" : mText);
+ sb.append(", categories=");
+ sb.append(mCategories);
+
sb.append(", icon=");
sb.append(mIcon);
@@ -807,7 +859,7 @@
/** @hide */
public ShortcutInfo(
@UserIdInt int userId, String id, String packageName, ComponentName activityComponent,
- Icon icon, String title, String text, Intent intent,
+ Icon icon, String title, String text, List<String> categories, Intent intent,
PersistableBundle intentPersistableExtras,
int weight, PersistableBundle extras, long lastChangedTimestamp,
int flags, int iconResId, String bitmapPath) {
@@ -818,6 +870,7 @@
mIcon = icon;
mTitle = title;
mText = text;
+ mCategories = clone(categories);
mIntent = intent;
mIntentPersistableExtras = intentPersistableExtras;
mWeight = weight;
diff --git a/core/java/android/content/pm/ShortcutManager.java b/core/java/android/content/pm/ShortcutManager.java
index 919ccda..75803d3 100644
--- a/core/java/android/content/pm/ShortcutManager.java
+++ b/core/java/android/content/pm/ShortcutManager.java
@@ -34,11 +34,11 @@
* <h3>Dynamic shortcuts and pinned shortcuts</h3>
*
* An application can publish shortcuts with {@link #setDynamicShortcuts(List)} and
- * {@link #addDynamicShortcut(ShortcutInfo)}. There can be at most
+ * {@link #addDynamicShortcuts(List)}. There can be at most
* {@link #getMaxDynamicShortcutCount()} number of dynamic shortcuts at a time from the same
* application.
- * A dynamic shortcut can be deleted with {@link #deleteDynamicShortcut(String)}, and apps
- * can also use {@link #deleteAllDynamicShortcuts()} to delete all dynamic shortcuts.
+ * A dynamic shortcut can be deleted with {@link #removeDynamicShortcuts(List)}, and apps
+ * can also use {@link #removeAllDynamicShortcuts()} to delete all dynamic shortcuts.
*
* <p>The shortcuts that are currently published by the above APIs are called "dynamic", because
* they can be removed by the creator application at any time. The user may "pin" dynamic shortcuts
@@ -61,11 +61,11 @@
*
* <h3>Rate limiting</h3>
*
- * Calls to {@link #setDynamicShortcuts(List)}, {@link #addDynamicShortcut(ShortcutInfo)},
+ * Calls to {@link #setDynamicShortcuts(List)}, {@link #addDynamicShortcuts(List)},
* and {@link #updateShortcuts(List)} will be
* rate-limited. An application can call these methods at most
* {@link #getRemainingCallCount()} times until the rate-limiting counter is reset,
- * which happens at a certain time every day.
+ * which happens every hour.
*
* <p>An application can use {@link #getRateLimitResetTime()} to get the next reset time.
*
@@ -153,10 +153,10 @@
* @throws IllegalArgumentException if the caller application has already published the
* max number of dynamic shortcuts.
*/
- public boolean addDynamicShortcut(@NonNull ShortcutInfo shortcutInfo) {
+ public boolean addDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) {
try {
- return mService.addDynamicShortcut(
- mContext.getPackageName(), shortcutInfo, injectMyUserId());
+ return mService.addDynamicShortcuts(mContext.getPackageName(),
+ new ParceledListSlice(shortcutInfoList), injectMyUserId());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -165,9 +165,10 @@
/**
* Delete a single dynamic shortcut by ID.
*/
- public void deleteDynamicShortcut(@NonNull String shortcutId) {
+ public void removeDynamicShortcuts(@NonNull List<String> shortcutIds) {
try {
- mService.deleteDynamicShortcut(mContext.getPackageName(), shortcutId, injectMyUserId());
+ mService.removeDynamicShortcuts(mContext.getPackageName(), shortcutIds,
+ injectMyUserId());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -176,9 +177,9 @@
/**
* Delete all dynamic shortcuts from the caller application.
*/
- public void deleteAllDynamicShortcuts() {
+ public void removeAllDynamicShortcuts() {
try {
- mService.deleteAllDynamicShortcuts(mContext.getPackageName(), injectMyUserId());
+ mService.removeAllDynamicShortcuts(mContext.getPackageName(), injectMyUserId());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
diff --git a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
index 18a155d..b542339 100644
--- a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
@@ -501,11 +501,8 @@
Log.d(TAG, "createCaptureSessionByOutputConfiguration");
}
- // OutputConfiguration objects aren't immutable, make a copy before using.
- List<OutputConfiguration> currentOutputs = new ArrayList<OutputConfiguration>();
- for (OutputConfiguration output : outputConfigurations) {
- currentOutputs.add(new OutputConfiguration(output));
- }
+ // OutputConfiguration objects are immutable, but need to have our own array
+ List<OutputConfiguration> currentOutputs = new ArrayList<>(outputConfigurations);
createCaptureSessionInternal(null, currentOutputs, callback, handler,
/*isConstrainedHighSpeed*/false);
diff --git a/core/java/android/hardware/camera2/params/OutputConfiguration.java b/core/java/android/hardware/camera2/params/OutputConfiguration.java
index cd0c474..61b534b 100644
--- a/core/java/android/hardware/camera2/params/OutputConfiguration.java
+++ b/core/java/android/hardware/camera2/params/OutputConfiguration.java
@@ -17,6 +17,8 @@
package android.hardware.camera2.params;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.hardware.camera2.CameraDevice;
import android.hardware.camera2.utils.HashCodeHelpers;
@@ -71,12 +73,12 @@
public static final int ROTATION_270 = 3;
/**
- * Invalid surface set ID.
+ * Invalid surface group ID.
*
*<p>An {@link OutputConfiguration} with this value indicates that the included surface
- *doesn't belong to any surface set.</p>
+ *doesn't belong to any surface group.</p>
*/
- public static final int SURFACE_SET_ID_INVALID = -1;
+ public static final int SURFACE_GROUP_ID_NONE = -1;
/**
* Create a new {@link OutputConfiguration} instance with a {@link Surface}.
@@ -84,11 +86,47 @@
* @param surface
* A Surface for camera to output to.
*
- * <p>This constructor creates a default configuration.</p>
+ * <p>This constructor creates a default configuration, with a surface group ID of
+ * {@value #SURFACE_GROUP_ID_NONE}.</p>
*
*/
- public OutputConfiguration(Surface surface) {
- this(surface, ROTATION_0);
+ public OutputConfiguration(@NonNull Surface surface) {
+ this(SURFACE_GROUP_ID_NONE, surface, ROTATION_0);
+ }
+
+ /**
+ * Create a new {@link OutputConfiguration} instance with a {@link Surface},
+ * with a surface group ID.
+ *
+ * <p>
+ * A surface group ID is used to identify which surface group this output surface belongs to. A
+ * surface group is a group of output surfaces that are not intended to receive camera output
+ * buffer streams simultaneously. The {@link CameraDevice} may be able to share the buffers used
+ * by all the surfaces from the same surface group, therefore may reduce the overall memory
+ * footprint. The application should only set the same set ID for the streams that are not
+ * simultaneously streaming. A negative ID indicates that this surface doesn't belong to any
+ * surface group. The default value is {@value #SURFACE_GROUP_ID_NONE}.</p>
+ *
+ * <p>For example, a video chat application that has an adaptive output resolution feature would
+ * need two (or more) output resolutions, to switch resolutions without any output glitches.
+ * However, at any given time, only one output is active to minimize outgoing network bandwidth
+ * and encoding overhead. To save memory, the application should set the video outputs to have
+ * the same non-negative group ID, so that the camera device can share the same memory region
+ * for the alternating outputs.</p>
+ *
+ * <p>It is not an error to include output streams with the same group ID in the same capture
+ * request, but the resulting memory consumption may be higher than if the two streams were
+ * not in the same surface group to begin with, especially if the outputs have substantially
+ * different dimensions.</p>
+ *
+ * @param surfaceGroupId
+ * A group ID for this output, used for sharing memory between multiple outputs.
+ * @param surface
+ * A Surface for camera to output to.
+ *
+ */
+ public OutputConfiguration(int surfaceGroupId, @NonNull Surface surface) {
+ this(surfaceGroupId, surface, ROTATION_0);
}
/**
@@ -100,9 +138,9 @@
* A Surface for camera to output to.
* @param rotation
* The desired rotation to be applied on camera output. Value must be one of
- * ROTATION_[0, 90, 180, 270]. Note that when the rotation is 90 or 270 degree,
+ * ROTATION_[0, 90, 180, 270]. Note that when the rotation is 90 or 270 degrees,
* application should make sure corresponding surface size has width and height
- * transposed corresponding to the width and height without rotation. For example,
+ * transposed relative to the width and height without rotation. For example,
* if application needs camera to capture 1280x720 picture and rotate it by 90 degree,
* application should set rotation to {@code ROTATION_90} and make sure the
* corresponding Surface size is 720x1280. Note that {@link CameraDevice} might
@@ -110,15 +148,43 @@
* @hide
*/
@SystemApi
- public OutputConfiguration(Surface surface, int rotation) {
+ public OutputConfiguration(@NonNull Surface surface, int rotation) {
+ this(SURFACE_GROUP_ID_NONE, surface, rotation);
+ }
+
+
+ /**
+ * Create a new {@link OutputConfiguration} instance, with rotation and a group ID.
+ *
+ * <p>This constructor takes an argument for desired camera rotation and for the surface group
+ * ID. See {@link #OutputConfiguration(int, Surface)} for details of the group ID.</p>
+ *
+ * @param surfaceGroupId
+ * A group ID for this output, used for sharing memory between multiple outputs.
+ * @param surface
+ * A Surface for camera to output to.
+ * @param rotation
+ * The desired rotation to be applied on camera output. Value must be one of
+ * ROTATION_[0, 90, 180, 270]. Note that when the rotation is 90 or 270 degrees,
+ * application should make sure corresponding surface size has width and height
+ * transposed relative to the width and height without rotation. For example,
+ * if application needs camera to capture 1280x720 picture and rotate it by 90 degree,
+ * application should set rotation to {@code ROTATION_90} and make sure the
+ * corresponding Surface size is 720x1280. Note that {@link CameraDevice} might
+ * throw {@code IllegalArgumentException} if device cannot perform such rotation.
+ * @hide
+ */
+ @SystemApi
+ public OutputConfiguration(int surfaceGroupId, @NonNull Surface surface, int rotation) {
checkNotNull(surface, "Surface must not be null");
checkArgumentInRange(rotation, ROTATION_0, ROTATION_270, "Rotation constant");
- mSurfaceSetId = SURFACE_SET_ID_INVALID;
+ mSurfaceGroupId = surfaceGroupId;
mSurface = surface;
mRotation = rotation;
mConfiguredSize = SurfaceUtils.getSurfaceSize(surface);
mConfiguredFormat = SurfaceUtils.getSurfaceFormat(surface);
mConfiguredDataspace = SurfaceUtils.getSurfaceDataspace(surface);
+ mConfiguredGenerationId = surface.getGenerationId();
}
/**
@@ -129,35 +195,36 @@
*
* @hide
*/
- @SystemApi
- public OutputConfiguration(OutputConfiguration other) {
+ public OutputConfiguration(@NonNull OutputConfiguration other) {
if (other == null) {
throw new IllegalArgumentException("OutputConfiguration shouldn't be null");
}
this.mSurface = other.mSurface;
this.mRotation = other.mRotation;
- this.mSurfaceSetId = other.mSurfaceSetId;
+ this.mSurfaceGroupId = other.mSurfaceGroupId;
this.mConfiguredDataspace = other.mConfiguredDataspace;
this.mConfiguredFormat = other.mConfiguredFormat;
this.mConfiguredSize = other.mConfiguredSize;
+ this.mConfiguredGenerationId = other.mConfiguredGenerationId;
}
/**
* Create an OutputConfiguration from Parcel.
*/
- private OutputConfiguration(Parcel source) {
+ private OutputConfiguration(@NonNull Parcel source) {
int rotation = source.readInt();
int surfaceSetId = source.readInt();
Surface surface = Surface.CREATOR.createFromParcel(source);
checkNotNull(surface, "Surface must not be null");
checkArgumentInRange(rotation, ROTATION_0, ROTATION_270, "Rotation constant");
- mSurfaceSetId = surfaceSetId;
+ mSurfaceGroupId = surfaceSetId;
mSurface = surface;
mRotation = rotation;
mConfiguredSize = SurfaceUtils.getSurfaceSize(mSurface);
mConfiguredFormat = SurfaceUtils.getSurfaceFormat(mSurface);
mConfiguredDataspace = SurfaceUtils.getSurfaceDataspace(mSurface);
+ mConfiguredGenerationId = mSurface.getGenerationId();
}
/**
@@ -165,6 +232,7 @@
*
* @return the {@link Surface} associated with this {@link OutputConfiguration}.
*/
+ @NonNull
public Surface getSurface() {
return mSurface;
}
@@ -183,35 +251,13 @@
}
/**
- * Set the surface set ID to this {@link OutputConfiguration}.
+ * Get the surface group ID associated with this {@link OutputConfiguration}.
*
- * <p>
- * A surface set ID is used to identify which surface set this output surface belongs to. A
- * surface set is a group of output surfaces that are not intended to receive camera output
- * buffer streams simultaneously. The {@link CameraDevice} may be able to share the buffers used
- * by all the surfaces from the same surface set, therefore may save the overall memory
- * footprint. The application should only set the same set ID for the streams that are not
- * simultaneously streaming. A negative ID indicates that this surface doesn't belong to any
- * surface set. The default value will be {@value #SURFACE_SET_ID_INVALID}.
- * </p>
- *
- * @param setId
+ * @return the surface group ID associated with this {@link OutputConfiguration}.
+ * The default value is {@value #SURFACE_GROUP_ID_NONE}.
*/
- public void setSurfaceSetId(int setId) {
- if (setId < 0) {
- setId = SURFACE_SET_ID_INVALID;
- }
- mSurfaceSetId = setId;
- }
-
- /**
- * Get the surface set Id associated with this {@link OutputConfiguration}.
- *
- * @return the surface set Id associated with this {@link OutputConfiguration}.
- * Value will be one of ROTATION_[0, 90, 180, 270]
- */
- public int getSurfaceSetId() {
- return mSurfaceSetId;
+ public int getSurfaceGroupId() {
+ return mSurfaceGroupId;
}
public static final Parcelable.Creator<OutputConfiguration> CREATOR =
@@ -244,7 +290,7 @@
throw new IllegalArgumentException("dest must not be null");
}
dest.writeInt(mRotation);
- dest.writeInt(mSurfaceSetId);
+ dest.writeInt(mSurfaceGroupId);
mSurface.writeToParcel(dest, flags);
}
@@ -265,12 +311,13 @@
return true;
} else if (obj instanceof OutputConfiguration) {
final OutputConfiguration other = (OutputConfiguration) obj;
- return mSurface == other.mSurface &&
- mRotation == other.mRotation &&
+ return mRotation == other.mRotation &&
+ mSurface == other.mSurface &&
+ mConfiguredGenerationId == other.mConfiguredGenerationId &&
mConfiguredSize.equals(other.mConfiguredSize) &&
mConfiguredFormat == other.mConfiguredFormat &&
mConfiguredDataspace == other.mConfiguredDataspace &&
- mSurfaceSetId == other.mSurfaceSetId;
+ mSurfaceGroupId == other.mSurfaceGroupId;
}
return false;
}
@@ -280,16 +327,20 @@
*/
@Override
public int hashCode() {
- return HashCodeHelpers.hashCode(mSurface.hashCode(), mRotation);
+ return HashCodeHelpers.hashCode(
+ mRotation, mSurface.hashCode(), mConfiguredGenerationId,
+ mConfiguredSize.hashCode(), mConfiguredFormat, mConfiguredDataspace, mSurfaceGroupId);
}
private static final String TAG = "OutputConfiguration";
private final Surface mSurface;
private final int mRotation;
- private int mSurfaceSetId;
+ private int mSurfaceGroupId;
// The size, format, and dataspace of the surface when OutputConfiguration is created.
private final Size mConfiguredSize;
private final int mConfiguredFormat;
private final int mConfiguredDataspace;
+ // Surface generation ID to distinguish changes to Surface native internals
+ private final int mConfiguredGenerationId;
}
diff --git a/core/java/android/net/TrafficStats.java b/core/java/android/net/TrafficStats.java
index cfd0468..1ac9fca 100644
--- a/core/java/android/net/TrafficStats.java
+++ b/core/java/android/net/TrafficStats.java
@@ -228,7 +228,6 @@
* statistics parameters.
*
* @see #setThreadStatsTag(int)
- * @see #setThreadStatsUid(int)
*/
public static void tagSocket(Socket socket) throws SocketException {
SocketTagger.get().tag(socket);
@@ -249,7 +248,6 @@
* parameters.
*
* @see #setThreadStatsTag(int)
- * @see #setThreadStatsUid(int)
*/
public static void tagDatagramSocket(DatagramSocket socket) throws SocketException {
SocketTagger.get().tag(socket);
diff --git a/core/java/android/net/http/X509TrustManagerExtensions.java b/core/java/android/net/http/X509TrustManagerExtensions.java
index 6729347..87a0b70 100644
--- a/core/java/android/net/http/X509TrustManagerExtensions.java
+++ b/core/java/android/net/http/X509TrustManagerExtensions.java
@@ -44,6 +44,7 @@
private final X509TrustManager mTrustManager;
private final Method mCheckServerTrusted;
private final Method mIsUserAddedCertificate;
+ private final Method mIsSameTrustConfiguration;
/**
* Constructs a new X509TrustManagerExtensions wrapper.
@@ -57,6 +58,7 @@
mTrustManager = null;
mCheckServerTrusted = null;
mIsUserAddedCertificate = null;
+ mIsSameTrustConfiguration = null;
return;
}
// Use duck typing if possible.
@@ -80,6 +82,15 @@
throw new IllegalArgumentException(
"Required method isUserAddedCertificate(X509Certificate) missing");
}
+ // Get the option isSameTrustConfiguration method.
+ Method isSameTrustConfiguration = null;
+ try {
+ isSameTrustConfiguration = tm.getClass().getMethod("isSameTrustConfiguration",
+ String.class,
+ String.class);
+ } catch (ReflectiveOperationException ignored) {
+ }
+ mIsSameTrustConfiguration = isSameTrustConfiguration;
}
/**
@@ -150,6 +161,19 @@
*/
@SystemApi
public boolean isSameTrustConfiguration(String hostname1, String hostname2) {
- return true;
+ if (mIsSameTrustConfiguration == null) {
+ return true;
+ }
+ try {
+ return (Boolean) mIsSameTrustConfiguration.invoke(mTrustManager, hostname1, hostname2);
+ } catch (IllegalAccessException e) {
+ throw new RuntimeException("Failed to call isSameTrustConfiguration", e);
+ } catch (InvocationTargetException e) {
+ if (e.getCause() instanceof RuntimeException) {
+ throw (RuntimeException) e.getCause();
+ } else {
+ throw new RuntimeException("isSameTrustConfiguration failed", e.getCause());
+ }
+ }
}
}
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
index da215c6..0a8fdd9 100644
--- a/core/java/android/os/storage/StorageManager.java
+++ b/core/java/android/os/storage/StorageManager.java
@@ -1062,8 +1062,8 @@
}
/**
- * Return if data stored at the given path will be encrypted while at rest.
- * This can help apps avoid the overhead of double-encrypting data.
+ * Return if data stored at or under the given path will be encrypted while
+ * at rest. This can help apps avoid the overhead of double-encrypting data.
*/
public boolean isEncrypted(File file) {
if (FileUtils.contains(Environment.getDataDirectory(), file)) {
diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java
index 89ac27c9a..de19f81 100644
--- a/core/java/android/provider/MediaStore.java
+++ b/core/java/android/provider/MediaStore.java
@@ -283,7 +283,7 @@
*
* <p>Note: if you app targets {@link android.os.Build.VERSION_CODES#M M} and above
* and declares as using the {@link android.Manifest.permission#CAMERA} permission which
- * is not granted, then atempting to use this action will result in a {@link
+ * is not granted, then attempting to use this action will result in a {@link
* java.lang.SecurityException}.
*
* @see #EXTRA_OUTPUT
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index fdb1cef..db5b07a 100755
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -7795,13 +7795,13 @@
* ShortcutManager specific settings.
* This is encoded as a key=value list, separated by commas. Ex:
*
- * "reset_interval_sec=86400,max_daily_updates=5"
+ * "reset_interval_sec=86400,max_updates_per_interval=1"
*
* The following keys are supported:
*
* <pre>
* reset_interval_sec (long)
- * max_daily_updates (int)
+ * max_updates_per_interval (int)
* max_icon_dimension_dp (int, DP)
* max_icon_dimension_dp_lowram (int, DP)
* max_shortcuts (int)
diff --git a/core/java/android/security/net/config/RootTrustManager.java b/core/java/android/security/net/config/RootTrustManager.java
index 19f6887..859e022 100644
--- a/core/java/android/security/net/config/RootTrustManager.java
+++ b/core/java/android/security/net/config/RootTrustManager.java
@@ -148,4 +148,15 @@
NetworkSecurityConfig config = mConfig.getConfigForHostname("");
return config.getTrustManager().getAcceptedIssuers();
}
+
+ /**
+ * Returns {@code true} if this trust manager uses the same trust configuration for the provided
+ * hostnames.
+ *
+ * <p>This is required by android.net.http.X509TrustManagerExtensions.
+ */
+ public boolean isSameTrustConfiguration(String hostname1, String hostname2) {
+ return mConfig.getConfigForHostname(hostname1)
+ .equals(mConfig.getConfigForHostname(hostname2));
+ }
}
diff --git a/core/java/android/widget/RadialTimePickerView.java b/core/java/android/widget/RadialTimePickerView.java
index 7220256..24d2c8e 100644
--- a/core/java/android/widget/RadialTimePickerView.java
+++ b/core/java/android/widget/RadialTimePickerView.java
@@ -58,8 +58,8 @@
private static final String TAG = "RadialTimePickerView";
- private static final int HOURS = 0;
- private static final int MINUTES = 1;
+ public static final int HOURS = 0;
+ public static final int MINUTES = 1;
private static final int HOURS_INNER = 2;
private static final int SELECTOR_CIRCLE = 0;
diff --git a/core/java/android/widget/TimePickerClockDelegate.java b/core/java/android/widget/TimePickerClockDelegate.java
index 4a24e26..0c3892d 100644
--- a/core/java/android/widget/TimePickerClockDelegate.java
+++ b/core/java/android/widget/TimePickerClockDelegate.java
@@ -58,8 +58,8 @@
private static final long DELAY_COMMIT_MILLIS = 2000;
// Index used by RadialPickerLayout
- private static final int HOUR_INDEX = 0;
- private static final int MINUTE_INDEX = 1;
+ private static final int HOUR_INDEX = RadialTimePickerView.HOURS;
+ private static final int MINUTE_INDEX = RadialTimePickerView.MINUTES;
// NOT a real index for the purpose of what's showing.
private static final int AMPM_INDEX = 2;
@@ -82,6 +82,10 @@
private final Calendar mTempCalendar;
+ // Accessibility strings.
+ private final String mSelectHours;
+ private final String mSelectMinutes;
+
private boolean mIsEnabled = true;
private boolean mAllowAutoAdvance;
private int mInitialHourOfDay;
@@ -89,10 +93,6 @@
private boolean mIs24Hour;
private boolean mIsAmPmAtStart;
- // Accessibility strings.
- private String mSelectHours;
- private String mSelectMinutes;
-
// Localization data.
private boolean mHourFormatShowLeadingZero;
private boolean mHourFormatStartsAtZero;
@@ -520,11 +520,15 @@
} else {
flags |= DateUtils.FORMAT_12HOUR;
}
+
mTempCalendar.set(Calendar.HOUR_OF_DAY, getHour());
mTempCalendar.set(Calendar.MINUTE, getMinute());
- String selectedDate = DateUtils.formatDateTime(mContext,
+
+ final String selectedTime = DateUtils.formatDateTime(mContext,
mTempCalendar.getTimeInMillis(), flags);
- event.getText().add(selectedDate);
+ final String selectionMode = mRadialTimePickerView.getCurrentItemShowing() == HOUR_INDEX ?
+ mSelectHours : mSelectMinutes;
+ event.getText().add(selectedTime + " " + selectionMode);
}
/**
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index 1f2acc9..3fc02a7 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -16,7 +16,9 @@
package com.android.internal.app;
+import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.StringRes;
import android.app.Activity;
import android.app.ActivityThread;
import android.app.VoiceInteractor.PickOptionRequest;
@@ -24,6 +26,7 @@
import android.app.VoiceInteractor.Prompt;
import android.content.pm.ComponentInfo;
import android.os.AsyncTask;
+import android.provider.MediaStore;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Slog;
@@ -119,37 +122,62 @@
}
};
+ /**
+ * Get the string resource to be used as a label for the link to the resolver activity for an
+ * action.
+ *
+ * @param action The action to resolve
+ *
+ * @return The string resource to be used as a label
+ */
+ public static @StringRes int getLabelRes(String action) {
+ return ActionTitle.forAction(action).labelRes;
+ }
+
private enum ActionTitle {
VIEW(Intent.ACTION_VIEW,
com.android.internal.R.string.whichViewApplication,
- com.android.internal.R.string.whichViewApplicationNamed),
+ com.android.internal.R.string.whichViewApplicationNamed,
+ com.android.internal.R.string.whichViewApplicationLabel),
EDIT(Intent.ACTION_EDIT,
com.android.internal.R.string.whichEditApplication,
- com.android.internal.R.string.whichEditApplicationNamed),
+ com.android.internal.R.string.whichEditApplicationNamed,
+ com.android.internal.R.string.whichEditApplicationLabel),
SEND(Intent.ACTION_SEND,
com.android.internal.R.string.whichSendApplication,
- com.android.internal.R.string.whichSendApplicationNamed),
+ com.android.internal.R.string.whichSendApplicationNamed,
+ com.android.internal.R.string.whichSendApplicationLabel),
SENDTO(Intent.ACTION_SENDTO,
com.android.internal.R.string.whichSendToApplication,
- com.android.internal.R.string.whichSendToApplicationNamed),
+ com.android.internal.R.string.whichSendToApplicationNamed,
+ com.android.internal.R.string.whichSendToApplicationLabel),
SEND_MULTIPLE(Intent.ACTION_SEND_MULTIPLE,
com.android.internal.R.string.whichSendApplication,
- com.android.internal.R.string.whichSendApplicationNamed),
+ com.android.internal.R.string.whichSendApplicationNamed,
+ com.android.internal.R.string.whichSendApplicationLabel),
+ CAPTURE_IMAGE(MediaStore.ACTION_IMAGE_CAPTURE,
+ com.android.internal.R.string.whichImageCaptureApplication,
+ com.android.internal.R.string.whichImageCaptureApplicationNamed,
+ com.android.internal.R.string.whichImageCaptureApplicationLabel),
DEFAULT(null,
com.android.internal.R.string.whichApplication,
- com.android.internal.R.string.whichApplicationNamed),
+ com.android.internal.R.string.whichApplicationNamed,
+ com.android.internal.R.string.whichApplicationLabel),
HOME(Intent.ACTION_MAIN,
com.android.internal.R.string.whichHomeApplication,
- com.android.internal.R.string.whichHomeApplicationNamed);
+ com.android.internal.R.string.whichHomeApplicationNamed,
+ com.android.internal.R.string.whichHomeApplicationLabel);
public final String action;
public final int titleRes;
public final int namedTitleRes;
+ public final @StringRes int labelRes;
- ActionTitle(String action, int titleRes, int namedTitleRes) {
+ ActionTitle(String action, int titleRes, int namedTitleRes, @StringRes int labelRes) {
this.action = action;
this.titleRes = titleRes;
this.namedTitleRes = namedTitleRes;
+ this.labelRes = labelRes;
}
public static ActionTitle forAction(String action) {
diff --git a/core/java/com/android/internal/app/procstats/ProcessStats.java b/core/java/com/android/internal/app/procstats/ProcessStats.java
index 06542f7..2f80b86 100644
--- a/core/java/com/android/internal/app/procstats/ProcessStats.java
+++ b/core/java/com/android/internal/app/procstats/ProcessStats.java
@@ -516,7 +516,7 @@
out.writeInt((int)val);
} else {
int top = ~((int)((val>>32)&0x7fffffff));
- int bottom = (int)(val&0xfffffff);
+ int bottom = (int)(val&0x0ffffffffL);
out.writeInt(top);
out.writeInt(bottom);
}
diff --git a/core/java/com/android/internal/app/procstats/SparseMappingTable.java b/core/java/com/android/internal/app/procstats/SparseMappingTable.java
index 76102af..f941836 100644
--- a/core/java/com/android/internal/app/procstats/SparseMappingTable.java
+++ b/core/java/com/android/internal/app/procstats/SparseMappingTable.java
@@ -68,11 +68,8 @@
* A table of data as stored in a SparseMappingTable.
*/
public static class Table {
- // When mSequence is this this our data better be empty
- private static final int UNINITIALIZED_SEQUENCE = -1;
-
private SparseMappingTable mParent;
- private int mSequence = UNINITIALIZED_SEQUENCE;
+ private int mSequence = 1;
private int[] mTable;
private int mSize;
@@ -119,12 +116,6 @@
* but should be considered opaque to the caller.
*/
public int getOrAddKey(byte id, int count) {
- // This is the only place we add data to mParent.mLongs, so this is the time
- // to update our sequence to match there.
- if (mSequence == UNINITIALIZED_SEQUENCE) {
- mSequence = mParent.mSequence;
- }
-
assertConsistency();
final int idx = binarySearch(id);
@@ -311,7 +302,7 @@
// Reset our sequence number. This will make all read/write calls
// start to fail, and then when we re-allocate it will be re-synced
// to that of mParent.
- mSequence = UNINITIALIZED_SEQUENCE;
+ mSequence = mParent.mSequence;
}
/**
@@ -377,27 +368,19 @@
// Original bug: b/27045736
// New bug: b/27960286
if (false) {
- // Assert that our sequence number has been initialized. If it hasn't
- // that means someone tried to read or write data without allocating it
- // since we were created or reset.
- if (mSequence == UNINITIALIZED_SEQUENCE) {
- logOrThrow("mSequence == UNINITIALIZED_SEQUENCE in"
- + " SparseMappingTable.Table. -- "
- + dumpInternalState());
- return;
- }
-
// Assert that our sequence number matches mParent's. If it isn't that means
- // we have been reset and our
+ // we have been reset and our. If our sequence is UNITIALIZED_SEQUENCE, then
+ // it's possible that everything is working fine and we just haven't been
+ // written to since the last resetTable().
if (mSequence != mParent.mSequence) {
if (mSequence < mParent.mSequence) {
- logOrThrow("Sequence mismatch. SparseMappingTable.resetTable()"
+ logOrThrow("Sequence mismatch. SparseMappingTable.reset()"
+ " called but not Table.resetTable() -- "
+ dumpInternalState());
return;
} else if (mSequence > mParent.mSequence) {
logOrThrow("Sequence mismatch. Table.resetTable()"
- + " called but not SparseMappingTable.resetTable() -- "
+ + " called but not SparseMappingTable.reset() -- "
+ dumpInternalState());
return;
}
@@ -494,6 +477,10 @@
}
}
+ public SparseMappingTable() {
+ mLongs.add(new long[ARRAY_SIZE]);
+ }
+
/**
* Wipe out all the data.
*/
@@ -545,6 +532,35 @@
}
/**
+ * Return a string for debugging.
+ */
+ public String dumpInternalState(boolean includeData) {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("SparseMappingTable{");
+ sb.append("mSequence=");
+ sb.append(mSequence);
+ sb.append(" mNextIndex=");
+ sb.append(mNextIndex);
+ sb.append(" mLongs.size=");
+ final int N = mLongs.size();
+ sb.append(N);
+ sb.append("\n");
+ if (includeData) {
+ for (int i=0; i<N; i++) {
+ final long[] array = mLongs.get(i);
+ for (int j=0; j<array.length; j++) {
+ if (i == N-1 && j == mNextIndex) {
+ break;
+ }
+ sb.append(String.format(" %4d %d 0x%016x %-19d\n", i, j, array[j], array[j]));
+ }
+ }
+ }
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
* Write the long array to the parcel in a compacted form. Does not allow negative
* values in the array.
*/
@@ -559,7 +575,7 @@
out.writeInt((int)val);
} else {
int top = ~((int)((val>>32)&0x7fffffff));
- int bottom = (int)(val&0xfffffff);
+ int bottom = (int)(val&0x0ffffffffL);
out.writeInt(top);
out.writeInt(bottom);
}
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 5980ab6..78b5d61 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -43,6 +43,7 @@
import dalvik.system.DexFile;
import dalvik.system.PathClassLoader;
import dalvik.system.VMRuntime;
+import dalvik.system.ZygoteHooks;
import libcore.io.IoUtils;
@@ -597,6 +598,10 @@
}
public static void main(String argv[]) {
+ // Mark zygote start. This ensures that thread creation will throw
+ // an error.
+ ZygoteHooks.startZygoteNoThreadCreation();
+
try {
Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "ZygoteInit");
RuntimeInit.enableDdms();
@@ -648,6 +653,8 @@
// Zygote process unmounts root storage spaces.
Zygote.nativeUnmountStorageOnInit();
+ ZygoteHooks.stopZygoteNoThreadCreation();
+
if (startSystemServer) {
startSystemServer(abiList, socketName);
}
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 96731cf..dd60778 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -2552,21 +2552,29 @@
<!-- Title of intent resolver dialog when selecting an application to run
and a previously used application is known. -->
<string name="whichApplicationNamed">Complete action using %1$s</string>
+ <!-- Generic label for a link to a intent resolver. -->
+ <string name="whichApplicationLabel">Complete action</string>
<!-- Title of intent resolver dialog when selecting a viewer application to run. -->
<string name="whichViewApplication">Open with</string>
<!-- Title of intent resolver dialog when selecting a viewer application to run
and a previously used application is known. -->
<string name="whichViewApplicationNamed">Open with %1$s</string>
+ <!-- Label for a link to a intent resolver dialog to view something -->
+ <string name="whichViewApplicationLabel">Open</string>
<!-- Title of intent resolver dialog when selecting an editor application to run. -->
<string name="whichEditApplication">Edit with</string>
<!-- Title of intent resolver dialog when selecting an editor application to run
and a previously used application is known. -->
<string name="whichEditApplicationNamed">Edit with %1$s</string>
+ <!-- Label for a link to a intent resolver dialog when selecting an editor application -->
+ <string name="whichEditApplicationLabel">Edit</string>
<!-- Title of intent resolver dialog when selecting a sharing application to run. -->
<string name="whichSendApplication">Share with</string>
<!-- Title of intent resolver dialog when selecting a sharing application to run
and a previously used application is known. -->
<string name="whichSendApplicationNamed">Share with %1$s</string>
+ <!-- Label for a link to a intent resolver dialog to sharing something -->
+ <string name="whichSendApplicationLabel">Share</string>
<!-- Title of intent resolver dialog when selecting an application to run to
send content to a specific recipient. Often used for email. -->
<string name="whichSendToApplication">Send using</string>
@@ -2574,11 +2582,23 @@
send content to a specific recipient and a previously used application is known.
Often used for email. -->
<string name="whichSendToApplicationNamed">Send using %1$s</string>
+ <!-- Label for a link to a intent resolver dialog to send content to a specific recipient. -->
+ <string name="whichSendToApplicationLabel">Send</string>
<!-- Title of intent resolver dialog when selecting a HOME application to run. -->
<string name="whichHomeApplication">Select a Home app</string>
<!-- Title of intent resolver dialog when selecting a HOME application to run
and a previously used application is known. -->
<string name="whichHomeApplicationNamed">Use %1$s as Home</string>
+ <!-- Label for a link to a intent resolver dialog when selecting a HOME -->
+ <string name="whichHomeApplicationLabel">Capture image</string>
+ <!-- Option to always use the selected application resolution in the future. See the "Complete action using" dialog title-->
+ <!-- Title of intent resolver dialog when capturing an image. -->
+ <string name="whichImageCaptureApplication">Capture image with</string>
+ <!-- Title of intent resolver dialog when capturing an image
+ and a previously used application is known. -->
+ <string name="whichImageCaptureApplicationNamed">Capture image with %1$s</string>
+ <!-- Label for a link to a intent resolver dialog when capturing an image -->
+ <string name="whichImageCaptureApplicationLabel">Capture image</string>
<!-- Option to always use the selected application resolution in the future. See the "Complete action using" dialog title-->
<string name="alwaysUse">Use by default for this action.</string>
<!-- Title of the list of alternate options to complete an action shown when the
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 03d2192..98661cf 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1386,7 +1386,6 @@
<java-symbol type="xml" name="password_kbd_qwerty" />
<java-symbol type="xml" name="autotext" />
- <java-symbol type="xml" name="eri" />
<java-symbol type="xml" name="password_kbd_numeric" />
<java-symbol type="xml" name="password_kbd_qwerty_shifted" />
<java-symbol type="xml" name="password_kbd_symbols" />
@@ -2199,14 +2198,22 @@
<java-symbol type="attr" name="touchscreenBlocksFocus" />
<java-symbol type="layout" name="resolver_list_with_default" />
<java-symbol type="string" name="whichApplicationNamed" />
+ <java-symbol type="string" name="whichApplicationLabel" />
<java-symbol type="string" name="whichViewApplication" />
<java-symbol type="string" name="whichViewApplicationNamed" />
+ <java-symbol type="string" name="whichViewApplicationLabel" />
<java-symbol type="string" name="whichEditApplication" />
<java-symbol type="string" name="whichEditApplicationNamed" />
+ <java-symbol type="string" name="whichEditApplicationLabel" />
<java-symbol type="string" name="whichSendApplication" />
<java-symbol type="string" name="whichSendApplicationNamed" />
+ <java-symbol type="string" name="whichSendApplicationLabel" />
<java-symbol type="string" name="whichSendToApplication" />
<java-symbol type="string" name="whichSendToApplicationNamed" />
+ <java-symbol type="string" name="whichSendToApplicationLabel" />
+ <java-symbol type="string" name="whichImageCaptureApplication" />
+ <java-symbol type="string" name="whichImageCaptureApplicationNamed" />
+ <java-symbol type="string" name="whichImageCaptureApplicationLabel" />
<java-symbol type="attr" name="lightY" />
<java-symbol type="attr" name="lightZ" />
<java-symbol type="attr" name="lightRadius" />
@@ -2236,6 +2243,7 @@
<java-symbol type="array" name="networks_not_clear_data" />
<java-symbol type="bool" name="config_switch_phone_on_voice_reg_state_change" />
<java-symbol type="string" name="whichHomeApplicationNamed" />
+ <java-symbol type="string" name="whichHomeApplicationLabel" />
<java-symbol type="bool" name="config_sms_force_7bit_encoding" />
<java-symbol type="bool" name="config_defaultWindowFeatureOptionsPanel" />
<java-symbol type="bool" name="config_defaultWindowFeatureContextMenu" />
diff --git a/core/res/res/xml/eri.xml b/core/res/res/xml/eri.xml
deleted file mode 100644
index cd66f14..0000000
--- a/core/res/res/xml/eri.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** 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.
-*/
--->
-
-<!-- Note that IconMode can be only 0, ON or 1, FLASHING
- The icon is turned OFF if then IconIndex = 1 -->
-
-<EriFile VersionNumber="1357"
- NumberOfEriEntries="12"
- EriFileType="1">
-
- <CallPromptId Id="0"
- CallPromptText="CallPromptId0"/>
-
- <CallPromptId Id="1"
- CallPromptText="CallPromptId1"/>
-
- <CallPromptId Id="2"
- CallPromptText="CallPromptId2"/>
-
- <EriInfo RoamingIndicator="64"
- IconIndex="1"
- IconMode="0"
- EriText="T-CDMA 64"
- CallPromptId="0"
- AlertId="0"/>
-
- <EriInfo RoamingIndicator="65"
- IconIndex="65"
- IconMode="0"
- EriText="T-CDMA 65"
- CallPromptId="0"
- AlertId="0"/>
-
- <EriInfo RoamingIndicator="66"
- IconIndex="1"
- IconMode="0"
- EriText="T-CDMA Ext 66"
- CallPromptId="0"
- AlertId="0"/>
-
- <EriInfo RoamingIndicator="67"
- IconIndex="67"
- IconMode="0"
- EriText="T-CDMA Ext 67"
- CallPromptId="0"
- AlertId="0"/>
-
- <EriInfo RoamingIndicator="68"
- IconIndex="68"
- IconMode="0"
- EriText="T-CDMA Roam 68"
- CallPromptId="0"
- AlertId="0"/>
-
- <EriInfo RoamingIndicator="69"
- IconIndex="69"
- IconMode="1"
- EriText="T-CDMA Ext 69"
- CallPromptId="0"
- AlertId="0"/>
-
- <EriInfo RoamingIndicator="70"
- IconIndex="70"
- IconMode="1"
- EriText="T-CDMA Roam 70"
- CallPromptId="0"
- AlertId="0"/>
-
- <EriInfo RoamingIndicator="71"
- IconIndex="1"
- IconMode="0"
- EriText="T-CDMA Ext 71"
- CallPromptId="0"
- AlertId="0"/>
-
- <EriInfo RoamingIndicator="72"
- IconIndex="72"
- IconMode="0"
- EriText="T-CDMA Ext 72"
- CallPromptId="0"
- AlertId="0"/>
-
- <EriInfo RoamingIndicator="73"
- IconIndex="73"
- IconMode="0"
- EriText="T-CDMA Roam 73"
- CallPromptId="0"
- AlertId="0"/>
-
- <EriInfo RoamingIndicator="74"
- IconIndex="74"
- IconMode="1"
- EriText="T-CDMA Ext 74"
- CallPromptId="0"
- AlertId="0"/>
-
- <EriInfo RoamingIndicator="75"
- IconIndex="75"
- IconMode="1"
- EriText="T-CDMA Roam 75"
- CallPromptId="0"
- AlertId="0"/>
-
-</EriFile>
diff --git a/core/tests/coretests/src/com/android/internal/app/procstats/SparseMappingTableTest.java b/core/tests/coretests/src/com/android/internal/app/procstats/SparseMappingTableTest.java
new file mode 100644
index 0000000..fd57baa
--- /dev/null
+++ b/core/tests/coretests/src/com/android/internal/app/procstats/SparseMappingTableTest.java
@@ -0,0 +1,209 @@
+/*
+ * Copyright (C) 2016 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 com.android.internal.app.procstats;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+
+import android.os.BatteryStats;
+import android.os.Parcel;
+import android.test.suitebuilder.annotation.SmallTest;
+import android.util.Log;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.mockito.Mockito;
+
+/**
+ * Provides test cases for SparseMappingTable.
+ */
+public class SparseMappingTableTest extends TestCase {
+ private static final String TAG = "SparseMappingTableTest";
+
+ final byte ID1 = 1;
+ final byte ID2 = 2;
+
+ final long VALUE1 = 100;
+ final long VALUE2 = 10000000000L;
+
+ /**
+ * Test the parceling and unparceling logic when there is no data.
+ */
+ @SmallTest
+ public void testParcelingEmpty() throws Exception {
+ final SparseMappingTable data = new SparseMappingTable();
+ final SparseMappingTable.Table table = new SparseMappingTable.Table(data);
+
+ final Parcel dataParcel = Parcel.obtain();
+ data.writeToParcel(dataParcel);
+
+ final Parcel tableParcel = Parcel.obtain();
+ table.writeToParcel(tableParcel);
+
+ dataParcel.setDataPosition(0);
+ final SparseMappingTable data1 = new SparseMappingTable();
+ data1.readFromParcel(dataParcel);
+ Assert.assertEquals(0, dataParcel.dataAvail());
+ dataParcel.recycle();
+
+ tableParcel.setDataPosition(0);
+ final SparseMappingTable.Table table1 = new SparseMappingTable.Table(data1);
+ table1.readFromParcel(tableParcel);
+ Assert.assertEquals(0, tableParcel.dataAvail());
+ tableParcel.recycle();
+ }
+
+ /**
+ * Test the parceling and unparceling logic.
+ */
+ @SmallTest
+ public void testParceling() throws Exception {
+ int key;
+ final SparseMappingTable data = new SparseMappingTable();
+ final SparseMappingTable.Table table = new SparseMappingTable.Table(data);
+
+ key = table.getOrAddKey(ID1, 1);
+ table.setValue(key, VALUE1);
+
+ key = table.getOrAddKey(ID2, 1);
+ table.setValue(key, VALUE2);
+
+ final Parcel dataParcel = Parcel.obtain();
+ data.writeToParcel(dataParcel);
+
+ final Parcel tableParcel = Parcel.obtain();
+ table.writeToParcel(tableParcel);
+
+ dataParcel.setDataPosition(0);
+ final SparseMappingTable data1 = new SparseMappingTable();
+ data1.readFromParcel(dataParcel);
+ Assert.assertEquals(0, dataParcel.dataAvail());
+ dataParcel.recycle();
+
+ tableParcel.setDataPosition(0);
+ final SparseMappingTable.Table table1 = new SparseMappingTable.Table(data1);
+ table1.readFromParcel(tableParcel);
+ Assert.assertEquals(0, tableParcel.dataAvail());
+ tableParcel.recycle();
+
+ key = table1.getKey(ID1);
+ Assert.assertEquals(VALUE1, table1.getValue(key));
+
+ key = table1.getKey(ID2);
+ Assert.assertEquals(VALUE2, table1.getValue(key));
+ }
+
+
+ /**
+ * Test that after resetting you can still read data, you just get no values.
+ */
+ @SmallTest
+ public void testParcelingWithReset() throws Exception {
+ int key;
+ final SparseMappingTable data = new SparseMappingTable();
+ final SparseMappingTable.Table table = new SparseMappingTable.Table(data);
+
+ key = table.getOrAddKey(ID1, 1);
+ table.setValue(key, VALUE1);
+
+ data.reset();
+ table.resetTable();
+
+ key = table.getOrAddKey(ID2, 1);
+ table.setValue(key, VALUE2);
+
+ Log.d(TAG, "before: " + data.dumpInternalState(true));
+ Log.d(TAG, "before: " + table.dumpInternalState());
+
+ final Parcel dataParcel = Parcel.obtain();
+ data.writeToParcel(dataParcel);
+
+ final Parcel tableParcel = Parcel.obtain();
+ table.writeToParcel(tableParcel);
+
+ dataParcel.setDataPosition(0);
+ final SparseMappingTable data1 = new SparseMappingTable();
+ data1.readFromParcel(dataParcel);
+ Assert.assertEquals(0, dataParcel.dataAvail());
+ dataParcel.recycle();
+
+ tableParcel.setDataPosition(0);
+ final SparseMappingTable.Table table1 = new SparseMappingTable.Table(data1);
+ table1.readFromParcel(tableParcel);
+ Assert.assertEquals(0, tableParcel.dataAvail());
+ tableParcel.recycle();
+
+ key = table1.getKey(ID1);
+ Assert.assertEquals(SparseMappingTable.INVALID_KEY, key);
+
+ key = table1.getKey(ID2);
+ Assert.assertEquals(VALUE2, table1.getValue(key));
+
+ Log.d(TAG, " after: " + data1.dumpInternalState(true));
+ Log.d(TAG, " after: " + table1.dumpInternalState());
+ }
+
+ /**
+ * Test that it fails if you reset the data and not the table.
+ *
+ * Resetting the table and not the data is basically okay. The data in the
+ * SparseMappingTable will be leaked.
+ */
+ @SmallTest
+ public void testResetDataOnlyFails() throws Exception {
+ int key;
+ final SparseMappingTable data = new SparseMappingTable();
+ final SparseMappingTable.Table table = new SparseMappingTable.Table(data);
+
+ key = table.getOrAddKey(ID1, 1);
+ table.setValue(key, VALUE1);
+
+ Assert.assertEquals(VALUE1, table.getValue(key));
+
+ data.reset();
+
+ try {
+ table.getValue(key);
+ throw new Exception("Exception not thrown after mismatched reset calls.");
+ } catch (RuntimeException ex) {
+ // Good
+ }
+ }
+
+ /**
+ * Test that trying to get data that you didn't add fails correctly.
+ */
+ @SmallTest
+ public void testInvalidKey() throws Exception {
+ int key;
+ final SparseMappingTable data = new SparseMappingTable();
+ final SparseMappingTable.Table table = new SparseMappingTable.Table(data);
+
+ key = table.getKey(ID1);
+
+ // The key should be INVALID_KEY
+ Assert.assertEquals(SparseMappingTable.INVALID_KEY, key);
+
+ // If you get the value with getValueForId you get 0.
+ Assert.assertEquals(0, table.getValueForId(ID1));
+ }
+}
+
+
+
diff --git a/data/etc/platform.xml b/data/etc/platform.xml
index d412d7c..8a7d39b 100644
--- a/data/etc/platform.xml
+++ b/data/etc/platform.xml
@@ -111,6 +111,20 @@
<group gid="media" />
</permission>
+ <!-- These are permissions that were mapped to gids but we need
+ to keep them here until an upgrade from L to the current
+ version is to be supported. These permissions are built-in
+ and in L were not stored in packages.xml as a result if they
+ are not defined here while parsing packages.xml we would
+ ignore these permissions being granted to apps and not
+ propagate the granted state. From N we are storing the
+ built-in permissions in packages.xml as the saved storage
+ is negligible (one tag with the permission) compared to
+ the fragility as one can remove a built-in permission which
+ no longer needs to be mapped to gids and break grant propagation. -->
+ <permission name="android.permission.READ_EXTERNAL_STORAGE" />
+ <permission name="android.permission.WRITE_EXTERNAL_STORAGE" />
+
<!-- ================================================================== -->
<!-- ================================================================== -->
<!-- ================================================================== -->
diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java
index f15aff7..2886f0d 100644
--- a/graphics/java/android/graphics/Typeface.java
+++ b/graphics/java/android/graphics/Typeface.java
@@ -19,6 +19,7 @@
import android.content.res.AssetManager;
import android.util.Log;
import android.util.LongSparseArray;
+import android.util.LruCache;
import android.util.SparseArray;
import org.xmlpull.v1.XmlPullParserException;
@@ -63,6 +64,11 @@
private static final LongSparseArray<SparseArray<Typeface>> sTypefaceCache =
new LongSparseArray<SparseArray<Typeface>>(3);
+ /**
+ * Cache for Typeface objects dynamically loaded from assets. Currently max size is 16.
+ */
+ private static final LruCache<String, Typeface> sDynamicTypefaceCache = new LruCache<>(16);
+
static Typeface sDefaultTypeface;
static Map<String, Typeface> sSystemFontMap;
static FontFamily[] sFallbackFonts;
@@ -176,22 +182,50 @@
/**
* Create a new typeface from the specified font data.
- * @param mgr The application's asset manager
- * @param path The file name of the font data in the assets directory
+ *
+ * @param mgr The application's asset manager
+ * @param path The file name of the font data in the assets directory
* @return The new typeface.
*/
public static Typeface createFromAsset(AssetManager mgr, String path) {
if (sFallbackFonts != null) {
- FontFamily fontFamily = new FontFamily();
- if (fontFamily.addFontFromAsset(mgr, path)) {
- FontFamily[] families = { fontFamily };
- return createFromFamiliesWithDefault(families);
+ synchronized (sDynamicTypefaceCache) {
+ final String key = createAssetUid(mgr, path);
+ Typeface typeface = sDynamicTypefaceCache.get(key);
+ if (typeface != null) return typeface;
+
+ FontFamily fontFamily = new FontFamily();
+ if (fontFamily.addFontFromAsset(mgr, path)) {
+ FontFamily[] families = { fontFamily };
+ typeface = createFromFamiliesWithDefault(families);
+ sDynamicTypefaceCache.put(key, typeface);
+ return typeface;
+ }
}
}
throw new RuntimeException("Font asset not found " + path);
}
/**
+ * Creates a unique id for a given AssetManager and asset path.
+ *
+ * @param mgr AssetManager instance
+ * @param path The path for the asset.
+ * @return Unique id for a given AssetManager and asset path.
+ */
+ private static String createAssetUid(final AssetManager mgr, String path) {
+ final SparseArray<String> pkgs = mgr.getAssignedPackageIdentifiers();
+ final StringBuilder builder = new StringBuilder();
+ final int size = pkgs.size();
+ for (int i = 0; i < size; i++) {
+ builder.append(pkgs.valueAt(i));
+ builder.append("-");
+ }
+ builder.append(path);
+ return builder.toString();
+ }
+
+ /**
* Create a new typeface from the specified font file.
*
* @param path The path to the font data.
diff --git a/libs/hwui/JankTracker.cpp b/libs/hwui/JankTracker.cpp
index d1ff670..9d4eccc 100644
--- a/libs/hwui/JankTracker.cpp
+++ b/libs/hwui/JankTracker.cpp
@@ -285,6 +285,7 @@
void JankTracker::reset() {
mData->jankTypeCounts.fill(0);
mData->frameCounts.fill(0);
+ mData->slowFrameCounts.fill(0);
mData->totalFrameCount = 0;
mData->jankFrameCount = 0;
mData->statStartTime = systemTime(CLOCK_MONOTONIC);
diff --git a/media/java/android/media/AudioRecord.java b/media/java/android/media/AudioRecord.java
index a5550ec..4504e69 100644
--- a/media/java/android/media/AudioRecord.java
+++ b/media/java/android/media/AudioRecord.java
@@ -876,22 +876,24 @@
* Calling {@link #startRecording()} following a {@link #stop()} will reset
* the frame count to 0.
*
- * @param timestamp a reference to a non-null AudioTimestamp instance.
+ * @param outTimestamp a caller provided non-null AudioTimestamp instance,
+ * which is updated with the AudioRecord frame delivery information upon success.
* @param timebase one of
* {@link AudioTimestamp#TIMEBASE_BOOTTIME AudioTimestamp.TIMEBASE_BOOTTIME} or
- * {@link AudioTimestamp#TIMEBASE_MONOTONIC AudioTimestamp.TIMEBASE_MONOTONIC}.
+ * {@link AudioTimestamp#TIMEBASE_MONOTONIC AudioTimestamp.TIMEBASE_MONOTONIC},
+ * used to select the clock for the AudioTimestamp time.
* @return {@link #SUCCESS} if a timestamp is available,
* or {@link #ERROR_INVALID_OPERATION} if a timestamp not available.
*/
- public int getTimestamp(@NonNull AudioTimestamp timestamp,
+ public int getTimestamp(@NonNull AudioTimestamp outTimestamp,
@AudioTimestamp.Timebase int timebase)
{
- if (timestamp == null ||
+ if (outTimestamp == null ||
(timebase != AudioTimestamp.TIMEBASE_BOOTTIME
&& timebase != AudioTimestamp.TIMEBASE_MONOTONIC)) {
throw new IllegalArgumentException();
}
- return native_get_timestamp(timestamp, timebase);
+ return native_get_timestamp(outTimestamp, timebase);
}
/**
@@ -1725,7 +1727,7 @@
private native final void native_enableDeviceCallback();
private native final void native_disableDeviceCallback();
- private native final int native_get_timestamp(@NonNull AudioTimestamp timestamp,
+ private native final int native_get_timestamp(@NonNull AudioTimestamp outTimestamp,
@AudioTimestamp.Timebase int timebase);
//---------------------------------------------------------
diff --git a/packages/DocumentsUI/src/com/android/documentsui/QuickViewIntentBuilder.java b/packages/DocumentsUI/src/com/android/documentsui/QuickViewIntentBuilder.java
index 8fcd9d1..babde99 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/QuickViewIntentBuilder.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/QuickViewIntentBuilder.java
@@ -17,7 +17,6 @@
package com.android.documentsui;
import static com.android.documentsui.Shared.DEBUG;
-import static com.android.documentsui.Shared.TAG;
import static com.android.documentsui.model.DocumentInfo.getCursorString;
import android.content.ClipData;
@@ -45,6 +44,8 @@
* Provides support for gather a list of quick-viewable files into a quick view intent.
*/
final class QuickViewIntentBuilder {
+
+ private static final String TAG = "QuickViewIntentBuilder";
private static final int MAX_CLIP_ITEMS = 1000;
private final DocumentInfo mDocument;
@@ -127,8 +128,18 @@
for (int i = 0; i < siblingIds.length; i++) {
cursor = mModel.getItem(siblingIds[i]);
+ if (cursor == null) {
+ if (DEBUG) Log.d(TAG,
+ "Unable to obtain cursor for sibling document, modelId: "
+ + siblingIds[i]);
+ continue;
+ }
+
mimeType = getCursorString(cursor, Document.COLUMN_MIME_TYPE);
if (Document.MIME_TYPE_DIR.equals(mimeType)) {
+ if (DEBUG) Log.d(TAG,
+ "Skipping directory, not supported by quick view. modelId: "
+ + siblingIds[i]);
continue;
}
diff --git a/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java b/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
index aa9f356..5feaf3b 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
@@ -351,7 +351,10 @@
private boolean handleViewItem(String id) {
final Cursor cursor = mModel.getItem(id);
- assert(cursor != null);
+ if (cursor == null) {
+ Log.w(TAG, "Can't view item. Can't obtain cursor for modeId" + id);
+ return false;
+ }
final String docMimeType = getCursorString(cursor, Document.COLUMN_MIME_TYPE);
final int docFlags = getCursorInt(cursor, Document.COLUMN_FLAGS);
@@ -465,11 +468,14 @@
public boolean onBeforeItemStateChange(String modelId, boolean selected) {
if (selected) {
final Cursor cursor = mModel.getItem(modelId);
-
- assert(cursor != null);
+ if (cursor == null) {
+ Log.w(TAG, "Can't obtain cursor for modelId: " + modelId);
+ return false;
+ }
final String docMimeType = getCursorString(cursor, Document.COLUMN_MIME_TYPE);
final int docFlags = getCursorInt(cursor, Document.COLUMN_FLAGS);
+
return mTuner.canSelectType(docMimeType, docFlags);
}
return true;
@@ -479,7 +485,7 @@
public void onItemStateChanged(String modelId, boolean selected) {
final Cursor cursor = mModel.getItem(modelId);
if (cursor == null) {
- Log.e(TAG, "Model returned null cursor for document: " + modelId
+ Log.w(TAG, "Model returned null cursor for document: " + modelId
+ ". Ignoring state changed event.");
return;
}
@@ -1104,6 +1110,10 @@
List<String> enabled = new ArrayList<String>();
for (String id : mAdapter.getModelIds()) {
Cursor cursor = getModel().getItem(id);
+ if (cursor != null) {
+ Log.w(TAG, "Skipping selection. Can't obtain cursor for modeId: " + id);
+ continue;
+ }
String docMimeType = getCursorString(cursor, Document.COLUMN_MIME_TYPE);
int docFlags = getCursorInt(cursor, Document.COLUMN_FLAGS);
if (isDocumentEnabled(docMimeType, docFlags)) {
@@ -1192,7 +1202,10 @@
String id = getModelId(v);
if (id != null) {
Cursor dstCursor = mModel.getItem(id);
- assert(dstCursor != null);
+ if (dstCursor != null) {
+ Log.w(TAG, "Invalid destination. Can't obtain cursor for modelId: " + id);
+ return null;
+ }
return DocumentInfo.fromDirectoryCursor(dstCursor);
}
@@ -1265,8 +1278,10 @@
}
final Cursor cursor = mModel.getItem(modelId);
-
- assert(cursor != null);
+ if (cursor == null) {
+ Log.w(TAG, "Undraggable document. Can't obtain cursor for modelId " + modelId);
+ return Collections.EMPTY_LIST;
+ }
return Lists.newArrayList(
DocumentInfo.fromDirectoryCursor(cursor));
diff --git a/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java b/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java
index ac05c05..f274df3 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java
@@ -20,6 +20,7 @@
import android.annotation.Nullable;
import android.content.Context;
+import android.database.Cursor;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
@@ -476,9 +477,9 @@
List<String> index = new ArrayList<>(itemCount);
for (int i = 0; i < itemCount; i++) {
String modelId = mAdapter.getModelId(i);
- if (modelId != null) {
- String title =
- getCursorString(mModel.getItem(modelId), Document.COLUMN_DISPLAY_NAME);
+ Cursor cursor = mModel.getItem(modelId);
+ if (modelId != null && cursor != null) {
+ String title = getCursorString(cursor, Document.COLUMN_DISPLAY_NAME);
// Perform case-insensitive search.
index.add(title.toLowerCase());
} else {
diff --git a/packages/DocumentsUI/src/com/android/documentsui/dirlist/Model.java b/packages/DocumentsUI/src/com/android/documentsui/dirlist/Model.java
index 3642b01..e2a28ad9a 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/dirlist/Model.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/dirlist/Model.java
@@ -37,6 +37,7 @@
import com.android.documentsui.model.DocumentInfo;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -403,11 +404,18 @@
public @Nullable Cursor getItem(String modelId) {
Integer pos = mPositions.get(modelId);
- if (pos != null) {
- mCursor.moveToPosition(pos);
- return mCursor;
+ if (pos == null) {
+ if (DEBUG) Log.d(TAG, "Unabled to find cursor position for modelId: " + modelId);
+ return null;
}
- return null;
+
+ if (!mCursor.moveToPosition(pos)) {
+ if (DEBUG) Log.d(TAG,
+ "Unabled to move cursor to position " + pos + " for modelId: " + modelId);
+ return null;
+ }
+
+ return mCursor;
}
boolean isEmpty() {
@@ -424,8 +432,11 @@
final List<DocumentInfo> docs = new ArrayList<>(size);
for (String modelId: items.getAll()) {
final Cursor cursor = getItem(modelId);
- assert(cursor != null);
-
+ if (cursor == null) {
+ Log.w(TAG,
+ "Skipping document. Unabled to obtain cursor for modelId: " + modelId);
+ continue;
+ }
docs.add(DocumentInfo.fromDirectoryCursor(cursor));
}
return docs;
diff --git a/packages/DocumentsUI/src/com/android/documentsui/model/DocumentInfo.java b/packages/DocumentsUI/src/com/android/documentsui/model/DocumentInfo.java
index 31ce837..3a86a51 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/model/DocumentInfo.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/model/DocumentInfo.java
@@ -139,11 +139,13 @@
};
public static DocumentInfo fromDirectoryCursor(Cursor cursor) {
+ assert(cursor != null);
final String authority = getCursorString(cursor, RootCursorWrapper.COLUMN_AUTHORITY);
return fromCursor(cursor, authority);
}
public static DocumentInfo fromCursor(Cursor cursor, String authority) {
+ assert(cursor != null);
final DocumentInfo info = new DocumentInfo();
info.updateFromCursor(cursor, authority);
return info;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvActivity.java b/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvActivity.java
index e7e81d6..60a85df 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvActivity.java
@@ -344,6 +344,13 @@
} else {
mRecentsView.getViewTreeObserver().addOnPreDrawListener(this);
}
+ if(mTaskStackHorizontalGridView.getStack().getTaskCount() > 1 && !mLaunchedFromHome) {
+ // If there are 2 or more tasks, and we are not launching from home
+ // set the selected position to the 2nd task to allow for faster app switching
+ mTaskStackHorizontalGridView.setSelectedPosition(1);
+ } else {
+ mTaskStackHorizontalGridView.setSelectedPosition(0);
+ }
// If this is a new instance from a configuration change, then we have to manually trigger
// the enter animation state, or if recents was relaunched by AM, without going through
diff --git a/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvImpl.java b/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvImpl.java
index fd31872..dc0d1f1 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvImpl.java
@@ -75,7 +75,8 @@
if (useThumbnailTransition) {
// Try starting with a thumbnail transition
- ActivityOptions opts = getThumbnailTransitionActivityOptionsForTV(topTask);
+ ActivityOptions opts = getThumbnailTransitionActivityOptionsForTV(topTask,
+ stack.getTaskCount());
if (opts != null) {
startRecentsActivity(topTask, opts, false /* fromHome */, true /* fromThumbnail */);
} else {
@@ -118,8 +119,8 @@
* Creates the activity options for an app->recents transition on TV.
*/
private ActivityOptions getThumbnailTransitionActivityOptionsForTV(
- ActivityManager.RunningTaskInfo topTask) {
- Rect rect = TaskCardView.getStartingCardThumbnailRect(mContext);
+ ActivityManager.RunningTaskInfo topTask, int numTasks) {
+ Rect rect = TaskCardView.getStartingCardThumbnailRect(mContext, numTasks);
SystemServicesProxy ssp = Recents.getSystemServices();
ThumbnailData thumbnailData = ssp.getTaskThumbnail(topTask.id);
if (thumbnailData.thumbnail != null) {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/tv/views/TaskCardView.java b/packages/SystemUI/src/com/android/systemui/recents/tv/views/TaskCardView.java
index 46e7780..d3bc4b6 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/tv/views/TaskCardView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/tv/views/TaskCardView.java
@@ -95,7 +95,38 @@
return r;
}
- public static Rect getStartingCardThumbnailRect(Context context) {
+ public static Rect getStartingCardThumbnailRect(Context context, int numberOfTasks) {
+ if(numberOfTasks > 1) {
+ return getStartingCardThumbnailRectForStartPosition(context);
+ } else {
+ return getStartingCardThumbnailRectForFocusedPosition(context);
+ }
+ }
+
+ private static Rect getStartingCardThumbnailRectForStartPosition(Context context) {
+ Resources res = context.getResources();
+
+ int width = res.getDimensionPixelOffset(R.dimen.recents_tv_card_width);
+ int totalSpacing = res.getDimensionPixelOffset(R.dimen.recents_tv_gird_card_spacing) * 2
+ + res.getDimensionPixelOffset(R.dimen.recents_tv_gird_focused_card_delta);
+ int height = res.getDimensionPixelOffset(R.dimen.recents_tv_screenshot_height);
+ int topMargin = res.getDimensionPixelOffset(R.dimen.recents_tv_gird_row_top_margin);
+ int headerHeight = res.getDimensionPixelOffset(R.dimen.recents_tv_card_extra_badge_size) +
+ res.getDimensionPixelOffset(R.dimen.recents_tv_icon_padding_bottom);
+
+ WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
+ Display display = wm.getDefaultDisplay();
+ Point size = new Point();
+ display.getSize(size);
+ int screenWidth = size.x;
+
+ return new Rect(screenWidth / 2 + width / 2 + totalSpacing,
+ topMargin + headerHeight,
+ screenWidth / 2 + width / 2 + totalSpacing + width,
+ topMargin + headerHeight + height);
+ }
+
+ private static Rect getStartingCardThumbnailRectForFocusedPosition(Context context) {
Resources res = context.getResources();
TypedValue out = new TypedValue();
@@ -127,7 +158,6 @@
Point size = new Point();
display.getSize(size);
int screenWidth = size.x;
- int screenHeight = size.y;
return new Rect(screenWidth / 2 - width / 2 - widthDelta / 2,
topMargin - totalHeightDelta / 2 + (int) (headerHeight * scale),
diff --git a/preloaded-classes b/preloaded-classes
index be645d2..d854769 100644
--- a/preloaded-classes
+++ b/preloaded-classes
@@ -12,6 +12,7 @@
[Landroid.animation.Keyframe;
[Landroid.animation.PropertyValuesHolder;
[Landroid.app.LoaderManagerImpl;
+[Landroid.app.Notification$Action;
[Landroid.content.ContentProviderResult;
[Landroid.content.ContentValues;
[Landroid.content.Intent;
@@ -29,7 +30,6 @@
[Landroid.content.res.Configuration;
[Landroid.content.res.StringBlock;
[Landroid.content.res.XmlBlock;
-[Landroid.database.Cursor;
[Landroid.database.CursorWindow;
[Landroid.database.sqlite.SQLiteConnection$Operation;
[Landroid.database.sqlite.SQLiteConnectionPool$AcquiredConnectionStatus;
@@ -54,7 +54,6 @@
[Landroid.graphics.drawable.GradientDrawable$Orientation;
[Landroid.graphics.drawable.LayerDrawable$ChildDrawable;
[Landroid.graphics.drawable.RippleForeground;
-[Landroid.hardware.display.WifiDisplay;
[Landroid.hardware.soundtrigger.SoundTrigger$ConfidenceLevel;
[Landroid.hardware.soundtrigger.SoundTrigger$Keyphrase;
[Landroid.hardware.soundtrigger.SoundTrigger$KeyphraseRecognitionExtra;
@@ -83,6 +82,10 @@
[Landroid.icu.util.ULocale$Category;
[Landroid.icu.util.ULocale;
[Landroid.media.AudioGain;
+[Landroid.media.MediaCodecInfo$CodecCapabilities;
+[Landroid.media.MediaCodecInfo$CodecProfileLevel;
+[Landroid.media.MediaCodecInfo$Feature;
+[Landroid.media.MediaCodecInfo;
[Landroid.net.Network;
[Landroid.net.NetworkInfo$DetailedState;
[Landroid.net.NetworkInfo$State;
@@ -109,7 +112,6 @@
[Landroid.text.method.TextKeyListener;
[Landroid.text.style.AlignmentSpan;
[Landroid.text.style.CharacterStyle;
-[Landroid.text.style.ClickableSpan;
[Landroid.text.style.LeadingMarginSpan;
[Landroid.text.style.LineBackgroundSpan;
[Landroid.text.style.LineHeightSpan;
@@ -122,12 +124,11 @@
[Landroid.text.style.URLSpan;
[Landroid.text.style.WrapTogetherSpan;
[Landroid.util.LongSparseArray;
-[Landroid.util.Pair;
+[Landroid.util.Range;
[Landroid.util.Rational;
[Landroid.view.Choreographer$CallbackQueue;
[Landroid.view.Display$ColorTransform;
[Landroid.view.Display$Mode;
-[Landroid.view.Display;
[Landroid.view.HandlerActionQueue$HandlerAction;
[Landroid.view.MenuItem;
[Landroid.view.View;
@@ -198,11 +199,13 @@
[Ljava.text.DateFormat$Field;
[Ljava.text.Normalizer$Form;
[Ljava.util.ArrayList;
+[Ljava.util.Comparators$NaturalOrderComparator;
[Ljava.util.Enumeration;
[Ljava.util.Formatter$Flags;
[Ljava.util.Formatter$FormatString;
[Ljava.util.HashMap$HashMapEntry;
[Ljava.util.Hashtable$HashtableEntry;
+[Ljava.util.List;
[Ljava.util.Locale$Category;
[Ljava.util.Locale;
[Ljava.util.Map$Entry;
@@ -216,11 +219,8 @@
[Ljava.util.regex.Pattern;
[Ljavax.crypto.Cipher$InitType;
[Ljavax.crypto.Cipher$NeedToSet;
-[Ljavax.microedition.khronos.egl.EGLConfig;
[Ljavax.net.ssl.KeyManager;
-[Ljavax.net.ssl.SSLSession;
[Ljavax.net.ssl.TrustManager;
-[Ljavax.security.auth.x500.X500Principal;
[Ljavax.security.cert.X509Certificate;
[Llibcore.io.ClassPathURLStreamHandler;
[Llibcore.reflect.AnnotationMember$DefaultValues;
@@ -307,12 +307,10 @@
android.animation.PathKeyframes$1
android.animation.PathKeyframes$2
android.animation.PathKeyframes$FloatKeyframesBase
-android.animation.PathKeyframes$IntKeyframesBase
android.animation.PathKeyframes$SimpleKeyframes
android.animation.PropertyValuesHolder
android.animation.PropertyValuesHolder$FloatPropertyValuesHolder
android.animation.PropertyValuesHolder$IntPropertyValuesHolder
-android.animation.PropertyValuesHolder$PropertyValues
android.animation.RectEvaluator
android.animation.StateListAnimator
android.animation.StateListAnimator$1
@@ -328,7 +326,6 @@
android.app.Activity$HostCallbacks
android.app.ActivityManager
android.app.ActivityManager$MemoryInfo
-android.app.ActivityManager$RecentTaskInfo
android.app.ActivityManager$RunningAppProcessInfo
android.app.ActivityManager$RunningAppProcessInfo$1
android.app.ActivityManager$StackId
@@ -348,7 +345,6 @@
android.app.ActivityThread$ApplicationThread
android.app.ActivityThread$BindServiceData
android.app.ActivityThread$ContextCleanupInfo
-android.app.ActivityThread$CreateBackupAgentData
android.app.ActivityThread$CreateServiceData
android.app.ActivityThread$DropBoxReporter
android.app.ActivityThread$EventLoggingReporter
@@ -381,7 +377,7 @@
android.app.ContextImpl
android.app.ContextImpl$ApplicationContentResolver
android.app.Dialog
-android.app.Dialog$1
+android.app.Dialog$-void__init__android_content_Context_context_int_themeResId_boolean_createContextThemeWrapper_LambdaImpl0
android.app.Dialog$ListenersHandler
android.app.DialogFragment
android.app.DownloadManager
@@ -402,8 +398,6 @@
android.app.IAlarmManager$Stub
android.app.IAlarmManager$Stub$Proxy
android.app.IApplicationThread
-android.app.IBackupAgent
-android.app.IBackupAgent$Stub
android.app.IInstrumentationWatcher
android.app.IInstrumentationWatcher$Stub
android.app.INotificationManager
@@ -415,6 +409,9 @@
android.app.ITransientNotification$Stub
android.app.IUiAutomationConnection
android.app.IUiAutomationConnection$Stub
+android.app.IUiModeManager
+android.app.IUiModeManager$Stub
+android.app.IUiModeManager$Stub$Proxy
android.app.Instrumentation
android.app.IntentReceiverLeaked
android.app.IntentService
@@ -437,16 +434,21 @@
android.app.Notification
android.app.Notification$1
android.app.Notification$Action
+android.app.Notification$Action$1
android.app.Notification$BigTextStyle
android.app.Notification$Builder
+android.app.Notification$BuilderRemoteViews
android.app.Notification$Style
android.app.NotificationManager
+android.app.OnActivityPausedListener
android.app.PendingIntent
android.app.PendingIntent$1
android.app.PendingIntent$CanceledException
android.app.QueuedWork
android.app.ReceiverRestrictedContext
android.app.ResourcesManager
+android.app.ResourcesManager$1
+android.app.ResourcesManager$ActivityResources
android.app.ResultInfo
android.app.ResultInfo$1
android.app.Service
@@ -530,11 +532,15 @@
android.app.SystemServiceRegistry$69
android.app.SystemServiceRegistry$7
android.app.SystemServiceRegistry$70
+android.app.SystemServiceRegistry$71
+android.app.SystemServiceRegistry$72
+android.app.SystemServiceRegistry$73
+android.app.SystemServiceRegistry$74
android.app.SystemServiceRegistry$8
android.app.SystemServiceRegistry$9
android.app.SystemServiceRegistry$CachedServiceFetcher
android.app.SystemServiceRegistry$ServiceFetcher
-android.app.SystemServiceRegistry$StaticOuterContextServiceFetcher
+android.app.SystemServiceRegistry$StaticApplicationContextServiceFetcher
android.app.SystemServiceRegistry$StaticServiceFetcher
android.app.UiModeManager
android.app.WallpaperManager
@@ -542,10 +548,9 @@
android.app.admin.IDevicePolicyManager
android.app.admin.IDevicePolicyManager$Stub
android.app.admin.IDevicePolicyManager$Stub$Proxy
-android.app.backup.BackupAgent
-android.app.backup.BackupAgent$BackupServiceBinder
-android.app.backup.BackupAgent$SharedPrefsSynchronizer
-android.app.backup.BackupAgentHelper
+android.app.admin.SecurityLog
+android.app.admin.SecurityLog$SecurityEvent
+android.app.admin.SecurityLog$SecurityEvent$1
android.app.backup.BackupDataInput
android.app.backup.BackupDataInput$EntityHeader
android.app.backup.BackupDataOutput
@@ -554,9 +559,6 @@
android.app.backup.FileBackupHelperBase
android.app.backup.FullBackup
android.app.backup.FullBackupDataOutput
-android.app.backup.IBackupManager
-android.app.backup.IBackupManager$Stub
-android.app.backup.IBackupManager$Stub$Proxy
android.app.job.JobScheduler
android.app.trust.ITrustManager
android.app.trust.ITrustManager$Stub
@@ -566,9 +568,6 @@
android.app.usage.UsageStatsManager
android.appwidget.AppWidgetManager
android.appwidget.AppWidgetProvider
-android.auditing.SecurityLog
-android.auditing.SecurityLog$SecurityEvent
-android.auditing.SecurityLog$SecurityEvent$1
android.bluetooth.BluetoothAdapter
android.bluetooth.BluetoothAdapter$1
android.bluetooth.BluetoothManager
@@ -585,6 +584,7 @@
android.content.ActivityNotFoundException
android.content.BroadcastReceiver
android.content.BroadcastReceiver$PendingResult
+android.content.BroadcastReceiver$PendingResult$1
android.content.ClipData
android.content.ClipData$1
android.content.ClipData$Item
@@ -600,7 +600,6 @@
android.content.ContentProviderClient
android.content.ContentProviderNative
android.content.ContentProviderOperation
-android.content.ContentProviderOperation$Builder
android.content.ContentProviderProxy
android.content.ContentProviderResult
android.content.ContentResolver
@@ -637,7 +636,6 @@
android.content.IntentSender
android.content.IntentSender$SendIntentException
android.content.OperationApplicationException
-android.content.PeriodicSync
android.content.RestrictionsManager
android.content.ServiceConnection
android.content.SharedPreferences
@@ -646,7 +644,6 @@
android.content.SyncContext
android.content.SyncRequest
android.content.SyncRequest$1
-android.content.SyncRequest$Builder
android.content.SyncResult
android.content.SyncResult$1
android.content.SyncStats
@@ -693,6 +690,7 @@
android.content.pm.ResolveInfo$1
android.content.pm.ServiceInfo
android.content.pm.ServiceInfo$1
+android.content.pm.ShortcutManager
android.content.pm.Signature
android.content.pm.Signature$1
android.content.pm.UserInfo
@@ -721,6 +719,8 @@
android.content.res.Resources$NotFoundException
android.content.res.Resources$Theme
android.content.res.Resources$ThemeKey
+android.content.res.ResourcesImpl
+android.content.res.ResourcesImpl$ThemeImpl
android.content.res.ResourcesKey
android.content.res.StringBlock
android.content.res.StringBlock$StyleIDs
@@ -762,7 +762,6 @@
android.database.IContentObserver$Stub$Proxy
android.database.MatrixCursor
android.database.MatrixCursor$RowBuilder
-android.database.MergeCursor
android.database.Observable
android.database.SQLException
android.database.sqlite.DatabaseObjectNotClosedException
@@ -775,7 +774,6 @@
android.database.sqlite.SQLiteConnectionPool
android.database.sqlite.SQLiteConnectionPool$AcquiredConnectionStatus
android.database.sqlite.SQLiteConnectionPool$ConnectionWaiter
-android.database.sqlite.SQLiteConstraintException
android.database.sqlite.SQLiteCursor
android.database.sqlite.SQLiteCursorDriver
android.database.sqlite.SQLiteCustomFunction
@@ -807,7 +805,6 @@
android.ddm.DdmHandleThread
android.ddm.DdmHandleViewDebug
android.ddm.DdmRegister
-android.graphics.AvoidXfermode
android.graphics.Bitmap
android.graphics.Bitmap$1
android.graphics.Bitmap$CompressFormat
@@ -820,10 +817,10 @@
android.graphics.Camera
android.graphics.Canvas
android.graphics.Canvas$EdgeType
+android.graphics.Canvas$NoImagePreloadHolder
android.graphics.CanvasProperty
android.graphics.Color
android.graphics.ColorFilter
-android.graphics.ColorMatrix
android.graphics.ColorMatrixColorFilter
android.graphics.ComposePathEffect
android.graphics.ComposeShader
@@ -859,6 +856,7 @@
android.graphics.Paint$FontMetrics
android.graphics.Paint$FontMetricsInt
android.graphics.Paint$Join
+android.graphics.Paint$NoImagePreloadHolder
android.graphics.Paint$Style
android.graphics.PaintFlagsDrawFilter
android.graphics.Path
@@ -869,7 +867,6 @@
android.graphics.PathMeasure
android.graphics.Picture
android.graphics.PixelFormat
-android.graphics.PixelXorXfermode
android.graphics.Point
android.graphics.Point$1
android.graphics.PointF
@@ -903,11 +900,14 @@
android.graphics.drawable.Animatable2
android.graphics.drawable.AnimatedStateListDrawable
android.graphics.drawable.AnimatedStateListDrawable$AnimatedStateListState
+android.graphics.drawable.AnimatedStateListDrawable$Transition
android.graphics.drawable.AnimatedVectorDrawable
android.graphics.drawable.AnimatedVectorDrawable$1
android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState
android.graphics.drawable.AnimatedVectorDrawable$AnimatedVectorDrawableState$PendingAnimator
+android.graphics.drawable.AnimatedVectorDrawable$VectorDrawableAnimator
android.graphics.drawable.AnimatedVectorDrawable$VectorDrawableAnimatorRT
+android.graphics.drawable.AnimatedVectorDrawable$VectorDrawableAnimatorUI
android.graphics.drawable.AnimationDrawable
android.graphics.drawable.AnimationDrawable$AnimationState
android.graphics.drawable.BitmapDrawable
@@ -976,12 +976,14 @@
android.hardware.Camera$Face
android.hardware.ConsumerIrManager
android.hardware.Sensor
+android.hardware.SensorEvent
android.hardware.SensorEventListener
android.hardware.SensorManager
android.hardware.SerialManager
android.hardware.SerialPort
android.hardware.SystemSensorManager
android.hardware.SystemSensorManager$BaseEventQueue
+android.hardware.SystemSensorManager$SensorEventQueue
android.hardware.camera2.CameraCharacteristics$Key
android.hardware.camera2.CameraManager
android.hardware.camera2.CaptureRequest$Key
@@ -1000,12 +1002,6 @@
android.hardware.display.IDisplayManager$Stub$Proxy
android.hardware.display.IDisplayManagerCallback
android.hardware.display.IDisplayManagerCallback$Stub
-android.hardware.display.WifiDisplay
-android.hardware.display.WifiDisplay$1
-android.hardware.display.WifiDisplaySessionInfo
-android.hardware.display.WifiDisplaySessionInfo$1
-android.hardware.display.WifiDisplayStatus
-android.hardware.display.WifiDisplayStatus$1
android.hardware.fingerprint.FingerprintManager
android.hardware.hdmi.HdmiControlManager
android.hardware.input.IInputDevicesChangedListener
@@ -1021,6 +1017,10 @@
# android.hardware.location.ActivityRecognitionHardware
# android.hardware.location.IActivityRecognitionHardware
# android.hardware.location.IActivityRecognitionHardware$Stub
+android.hardware.location.ContextHubManager
+android.hardware.location.ContextHubService
+android.hardware.location.IContextHubService
+android.hardware.location.IContextHubService$Stub
android.hardware.radio.RadioManager
android.hardware.radio.RadioManager$AmBandConfig
android.hardware.radio.RadioManager$AmBandConfig$1
@@ -1046,6 +1046,7 @@
android.hardware.soundtrigger.SoundTrigger$ConfidenceLevel
android.hardware.soundtrigger.SoundTrigger$ConfidenceLevel$1
android.hardware.soundtrigger.SoundTrigger$GenericRecognitionEvent
+android.hardware.soundtrigger.SoundTrigger$GenericRecognitionEvent$1
android.hardware.soundtrigger.SoundTrigger$GenericSoundModel
android.hardware.soundtrigger.SoundTrigger$Keyphrase
android.hardware.soundtrigger.SoundTrigger$Keyphrase$1
@@ -1070,7 +1071,6 @@
android.hardware.usb.IUsbManager$Stub$Proxy
android.hardware.usb.UsbDevice
android.hardware.usb.UsbDeviceConnection
-android.hardware.usb.UsbInterface
android.hardware.usb.UsbManager
android.hardware.usb.UsbRequest
android.icu.impl.BMPSet
@@ -1396,6 +1396,7 @@
android.media.AudioDevicePort
android.media.AudioDevicePortConfig
android.media.AudioFormat
+android.media.AudioFormat$1
android.media.AudioGain
android.media.AudioGainConfig
android.media.AudioHandle
@@ -1412,8 +1413,6 @@
android.media.AudioPortConfig
android.media.AudioPortEventHandler
android.media.AudioRecord
-android.media.AudioRoutesInfo
-android.media.AudioRoutesInfo$1
android.media.AudioRouting
android.media.AudioSystem
android.media.AudioTimestamp
@@ -1425,21 +1424,13 @@
android.media.ExifInterface
android.media.IAudioFocusDispatcher
android.media.IAudioFocusDispatcher$Stub
-android.media.IAudioRoutesObserver
-android.media.IAudioRoutesObserver$Stub
android.media.IAudioService
android.media.IAudioService$Stub
android.media.IAudioService$Stub$Proxy
android.media.IMediaHTTPConnection
android.media.IMediaHTTPConnection$Stub
-android.media.IMediaRouterClient
-android.media.IMediaRouterClient$Stub
-android.media.IMediaRouterService
-android.media.IMediaRouterService$Stub
android.media.IRecordingConfigDispatcher
android.media.IRecordingConfigDispatcher$Stub
-android.media.IRemoteVolumeObserver
-android.media.IRemoteVolumeObserver$Stub
android.media.Image
android.media.ImageReader
android.media.ImageReader$SurfaceImage
@@ -1447,10 +1438,18 @@
android.media.ImageWriter$WriterSurfaceImage
android.media.JetPlayer
android.media.MediaCodec
+android.media.MediaCodecInfo
+android.media.MediaCodecInfo$AudioCapabilities
+android.media.MediaCodecInfo$CodecCapabilities
+android.media.MediaCodecInfo$CodecProfileLevel
+android.media.MediaCodecInfo$EncoderCapabilities
+android.media.MediaCodecInfo$Feature
+android.media.MediaCodecInfo$VideoCapabilities
android.media.MediaCodecList
android.media.MediaCrypto
android.media.MediaDrm
android.media.MediaExtractor
+android.media.MediaFormat
android.media.MediaHTTPConnection
android.media.MediaMetadataRetriever
android.media.MediaMuxer
@@ -1461,17 +1460,6 @@
android.media.MediaPlayer$OnSeekCompleteListener
android.media.MediaRecorder
android.media.MediaRouter
-android.media.MediaRouter$Callback
-android.media.MediaRouter$RouteCategory
-android.media.MediaRouter$RouteInfo
-android.media.MediaRouter$RouteInfo$1
-android.media.MediaRouter$Static
-android.media.MediaRouter$Static$1
-android.media.MediaRouter$Static$Client
-android.media.MediaRouter$VolumeChangeReceiver
-android.media.MediaRouter$WifiDisplayStatusChangedReceiver
-android.media.MediaRouterClientState
-android.media.MediaRouterClientState$1
android.media.MediaScanner
android.media.MediaSync
android.media.PlaybackParams
@@ -1479,9 +1467,10 @@
android.media.RemoteDisplay
android.media.ResampleInputStream
android.media.SubtitleController$Listener
-android.media.ThumbnailUtils
android.media.ToneGenerator
-android.media.audiofx.AcousticEchoCanceler
+android.media.Utils
+android.media.Utils$1
+android.media.Utils$2
android.media.audiofx.AudioEffect
android.media.audiopolicy.AudioMix
android.media.audiopolicy.AudioMixingRule
@@ -1504,13 +1493,13 @@
android.net.ConnectivityManager
android.net.ConnectivityManager$CallbackHandler
android.net.ConnectivityManager$NetworkCallback
+android.net.ConnectivityThread
android.net.Credentials
-android.net.DhcpResults
-android.net.DhcpResults$1
android.net.EthernetManager
android.net.IConnectivityManager
android.net.IConnectivityManager$Stub
android.net.IConnectivityManager$Stub$Proxy
+android.net.INetworkPolicyManager
android.net.IpPrefix
android.net.IpPrefix$1
android.net.LinkAddress
@@ -1545,8 +1534,6 @@
android.net.SSLCertificateSocketFactory
android.net.SSLCertificateSocketFactory$1
android.net.SSLSessionCache
-android.net.StaticIpConfiguration
-android.net.StaticIpConfiguration$1
android.net.TrafficStats
android.net.Uri
android.net.Uri$1
@@ -1584,10 +1571,16 @@
android.nfc.INfcAdapter$Stub$Proxy
android.nfc.INfcCardEmulation
android.nfc.INfcCardEmulation$Stub
+android.nfc.INfcCardEmulation$Stub$Proxy
android.nfc.INfcFCardEmulation
android.nfc.INfcFCardEmulation$Stub
+android.nfc.INfcFCardEmulation$Stub$Proxy
android.nfc.INfcTag
android.nfc.INfcTag$Stub
+android.nfc.INfcTag$Stub$Proxy
+android.nfc.NfcActivityManager
+android.nfc.NfcAdapter
+android.nfc.NfcAdapter$1
android.nfc.NfcManager
android.opengl.EGL14
android.opengl.EGLConfig
@@ -1631,9 +1624,8 @@
android.os.CancellationSignal$OnCancelListener
android.os.CancellationSignal$Transport
android.os.ConditionVariable
-android.os.CpuUsageInfo
-android.os.CpuUsageInfo$1
android.os.DeadObjectException
+android.os.DeadSystemException
android.os.Debug
android.os.Debug$MemoryInfo
android.os.Debug$MemoryInfo$1
@@ -1665,6 +1657,8 @@
android.os.IUserManager
android.os.IUserManager$Stub
android.os.IUserManager$Stub$Proxy
+android.os.IVibratorService
+android.os.IVibratorService$Stub
android.os.Looper
android.os.MemoryFile
android.os.Message
@@ -1679,10 +1673,13 @@
android.os.ParcelFileDescriptor
android.os.ParcelFileDescriptor$1
android.os.ParcelFileDescriptor$AutoCloseInputStream
+android.os.ParcelFileDescriptor$AutoCloseOutputStream
android.os.ParcelUuid
android.os.Parcelable
android.os.Parcelable$ClassLoaderCreator
android.os.Parcelable$Creator
+android.os.ParcelableParcel
+android.os.ParcelableParcel$1
android.os.PatternMatcher
android.os.PatternMatcher$1
android.os.PersistableBundle
@@ -1691,6 +1688,7 @@
android.os.PowerManager$WakeLock
android.os.PowerManager$WakeLock$1
android.os.Process
+android.os.RecoverySystem
android.os.RemoteException
android.os.ResultReceiver
android.os.SELinux
@@ -1726,24 +1724,26 @@
android.os.StrictMode$VmPolicy$Builder
android.os.SystemClock
android.os.SystemProperties
+android.os.SystemVibrator
android.os.Trace
android.os.Trace$1
-android.os.TransactionTooLargeException
android.os.UEventObserver
android.os.UserHandle
android.os.UserHandle$1
android.os.UserManager
android.os.Vibrator
android.os.ZygoteStartFailedEx
+android.os.health.SystemHealthManager
android.os.storage.IMountService
android.os.storage.IMountService$Stub
android.os.storage.IMountService$Stub$Proxy
+android.os.storage.IObbActionListener
+android.os.storage.IObbActionListener$Stub
android.os.storage.StorageManager
+android.os.storage.StorageManager$ObbActionListener
android.os.storage.StorageVolume
android.os.storage.StorageVolume$1
-android.preference.Preference$OnPreferenceChangeListener
android.preference.PreferenceActivity
-android.preference.PreferenceFragment
android.preference.PreferenceFragment$OnPreferenceStartFragmentCallback
android.preference.PreferenceManager
android.preference.PreferenceManager$OnPreferenceTreeClickListener
@@ -1836,7 +1836,6 @@
android.system.UnixSocketAddress
android.telecom.TelecomManager
android.telephony.CarrierConfigManager
-android.telephony.PhoneNumberUtils
android.telephony.Rlog
android.telephony.SubscriptionManager
android.telephony.TelephonyManager
@@ -1852,12 +1851,15 @@
android.text.GetChars
android.text.GraphicsOperations
android.text.Html
+android.text.Html$HtmlParser
+android.text.HtmlToSpannedConverter
android.text.Hyphenator
android.text.InputFilter
android.text.InputType
android.text.Layout
android.text.Layout$Alignment
android.text.Layout$Directions
+android.text.Layout$Ellipsizer
android.text.MeasuredText
android.text.NoCopySpan
android.text.NoCopySpan$Concrete
@@ -1916,7 +1918,6 @@
android.text.method.SingleLineTransformationMethod
android.text.method.TextKeyListener
android.text.method.TextKeyListener$Capitalize
-android.text.method.Touch
android.text.method.TransformationMethod
android.text.method.TransformationMethod2
android.text.style.AlignmentSpan
@@ -1937,6 +1938,7 @@
android.text.style.StyleSpan
android.text.style.SuggestionSpan
android.text.style.TabStopSpan
+android.text.style.TextAppearanceSpan
android.text.style.URLSpan
android.text.style.UnderlineSpan
android.text.style.UpdateAppearance
@@ -1985,7 +1987,6 @@
android.util.EventLog$Event
android.util.FloatProperty
android.util.IntProperty
-android.util.JsonReader
android.util.LocaleList
android.util.LocaleList$1
android.util.Log
@@ -1993,7 +1994,6 @@
android.util.Log$ImmediateLogWriter
android.util.Log$TerribleFailureHandler
android.util.LogPrinter
-android.util.LongArray
android.util.LongSparseArray
android.util.LongSparseLongArray
android.util.LruCache
@@ -2006,15 +2006,16 @@
android.util.Pair
android.util.PathParser
android.util.PathParser$PathData
-android.util.Patterns
android.util.Pools$Pool
android.util.Pools$SimplePool
android.util.Pools$SynchronizedPool
android.util.Printer
android.util.Property
+android.util.Range
android.util.Rational
android.util.Singleton
android.util.Size
+android.util.SizeF
android.util.Slog
android.util.SparseArray
android.util.SparseBooleanArray
@@ -2031,6 +2032,7 @@
android.view.AbsSavedState$2
android.view.ActionMode
android.view.ActionMode$Callback
+android.view.ActionMode$Callback2
android.view.ActionProvider
android.view.ActionProvider$SubUiVisibilityListener
android.view.Choreographer
@@ -2135,7 +2137,6 @@
android.view.RenderNode
android.view.RenderNodeAnimator
android.view.RenderNodeAnimator$1
-android.view.RenderNodeAnimatorSetHelper
android.view.SearchEvent
android.view.SoundEffectConstants
android.view.SubMenu
@@ -2151,6 +2152,7 @@
android.view.SurfaceSession
android.view.SurfaceView
android.view.TextureView
+android.view.TextureView$SurfaceTextureListener
android.view.ThreadedRenderer
android.view.ThreadedRenderer$HardwareDrawCallbacks
android.view.ThreadedRenderer$ProcessInitializer
@@ -2174,6 +2176,7 @@
android.view.View$AttachInfo$Callbacks
android.view.View$BaseSavedState
android.view.View$BaseSavedState$1
+android.view.View$CheckForLongPress
android.view.View$CheckForTap
android.view.View$ForegroundInfo
android.view.View$ListenerInfo
@@ -2258,10 +2261,10 @@
android.view.WindowCallbacks
android.view.WindowContentFrameStats
android.view.WindowContentFrameStats$1
-android.view.WindowId
android.view.WindowInsets
android.view.WindowLeaked
android.view.WindowManager
+android.view.WindowManager$BadTokenException
android.view.WindowManager$LayoutParams
android.view.WindowManager$LayoutParams$1
android.view.WindowManagerGlobal
@@ -2280,6 +2283,7 @@
android.view.accessibility.AccessibilityRecord
android.view.accessibility.CaptioningManager
android.view.accessibility.CaptioningManager$1
+android.view.accessibility.CaptioningManager$CaptionStyle
android.view.accessibility.CaptioningManager$CaptioningChangeListener
android.view.accessibility.CaptioningManager$MyContentObserver
android.view.accessibility.IAccessibilityManager
@@ -2295,6 +2299,7 @@
android.view.animation.Animation$2
android.view.animation.Animation$3
android.view.animation.Animation$AnimationListener
+android.view.animation.Animation$Description
android.view.animation.AnimationSet
android.view.animation.AnimationUtils
android.view.animation.BaseInterpolator
@@ -2316,6 +2321,7 @@
android.view.inputmethod.ExtractedText
android.view.inputmethod.ExtractedText$1
android.view.inputmethod.InputConnection
+android.view.inputmethod.InputConnectionInspector
android.view.inputmethod.InputMethodManager
android.view.inputmethod.InputMethodManager$1
android.view.inputmethod.InputMethodManager$ControlledInputConnectionWrapper
@@ -2323,15 +2329,17 @@
android.view.inputmethod.InputMethodManager$H
android.view.inputmethod.InputMethodManager$ImeInputEventSender
android.view.inputmethod.InputMethodManager$PendingEvent
-android.view.inputmethod.InputMethodSubtype
android.view.textservice.SpellCheckerSession$SpellCheckerSessionListener
android.view.textservice.SpellCheckerSubtype
android.view.textservice.SpellCheckerSubtype$1
android.view.textservice.TextServicesManager
+android.webkit.IWebViewUpdateService
+android.webkit.IWebViewUpdateService$Stub
android.webkit.MimeTypeMap
android.webkit.URLUtil
android.webkit.WebSettings
android.webkit.WebView
+android.webkit.WebViewClient
android.webkit.WebViewFactory
android.webkit.WebViewFactory$MissingWebViewPackageException
android.widget.AbsListView
@@ -2348,6 +2356,7 @@
android.widget.AbsListView$WindowRunnnable
android.widget.AbsSeekBar
android.widget.AbsSpinner
+android.widget.AbsSpinner$RecycleBin
android.widget.AbsoluteLayout
android.widget.ActionMenuPresenter
android.widget.ActionMenuPresenter$1
@@ -2362,13 +2371,9 @@
android.widget.AdapterView
android.widget.AdapterView$AdapterDataSetObserver
android.widget.AdapterView$OnItemClickListener
-android.widget.AdapterView$OnItemLongClickListener
android.widget.AdapterView$OnItemSelectedListener
android.widget.ArrayAdapter
android.widget.AutoCompleteTextView
-android.widget.AutoCompleteTextView$DropDownItemClickListener
-android.widget.AutoCompleteTextView$MyWatcher
-android.widget.AutoCompleteTextView$PassThroughClickListener
android.widget.BaseAdapter
android.widget.Button
android.widget.CheckBox
@@ -2381,15 +2386,17 @@
android.widget.Editor
android.widget.Editor$1
android.widget.Editor$2
-android.widget.Editor$3
android.widget.Editor$Blink
android.widget.Editor$CursorAnchorInfoNotifier
+android.widget.Editor$CursorController
android.widget.Editor$EditOperation
android.widget.Editor$EditOperation$1
android.widget.Editor$InputContentType
android.widget.Editor$InputMethodState
+android.widget.Editor$InsertionPointCursorController
android.widget.Editor$PositionListener
android.widget.Editor$ProcessTextIntentActionsHandler
+android.widget.Editor$SelectionModifierCursorController
android.widget.Editor$SpanController
android.widget.Editor$SuggestionHelper
android.widget.Editor$SuggestionHelper$SuggestionSpanComparator
@@ -2439,6 +2446,19 @@
android.widget.RelativeLayout$DependencyGraph$Node
android.widget.RelativeLayout$LayoutParams
android.widget.RemoteViews
+android.widget.RemoteViews$1
+android.widget.RemoteViews$2
+android.widget.RemoteViews$3
+android.widget.RemoteViews$Action
+android.widget.RemoteViews$ActionException
+android.widget.RemoteViews$BitmapCache
+android.widget.RemoteViews$LayoutParamAction
+android.widget.RemoteViews$MemoryUsageCounter
+android.widget.RemoteViews$MutablePair
+android.widget.RemoteViews$OnClickHandler
+android.widget.RemoteViews$ReflectionAction
+android.widget.RemoteViews$RuntimeAction
+android.widget.RemoteViews$SetDrawableParameters
android.widget.RemoteViewsAdapter$RemoteAdapterConnectionCallback
android.widget.RtlSpacingHelper
android.widget.ScrollBarDrawable
@@ -2451,7 +2471,10 @@
android.widget.SpellChecker
android.widget.SpellChecker$SpellParser
android.widget.Spinner
+android.widget.Spinner$SpinnerPopup
android.widget.SpinnerAdapter
+android.widget.Switch
+android.widget.Switch$1
android.widget.TextView
android.widget.TextView$3
android.widget.TextView$BufferType
@@ -2460,6 +2483,7 @@
android.widget.TextView$Drawables
android.widget.TextView$OnEditorActionListener
android.widget.TextView$SavedState
+android.widget.TextView$SavedState$1
android.widget.ThemedSpinnerAdapter
android.widget.Toast
android.widget.Toast$TN
@@ -2470,7 +2494,6 @@
android.widget.Toolbar$2
android.widget.Toolbar$ExpandedActionViewMenuPresenter
android.widget.Toolbar$LayoutParams
-android.widget.ViewAnimator
android.widget.WrapperListAdapter
com.android.dex.Annotation
com.android.dex.ClassData
@@ -2511,9 +2534,10 @@
com.android.internal.app.IAppOpsService
com.android.internal.app.IAppOpsService$Stub
com.android.internal.app.IAppOpsService$Stub$Proxy
+com.android.internal.app.IBatteryStats
+com.android.internal.app.IBatteryStats$Stub
com.android.internal.app.IVoiceInteractor
com.android.internal.app.IVoiceInteractor$Stub
-com.android.internal.app.WindowDecorActionBar
com.android.internal.appwidget.IAppWidgetService
com.android.internal.appwidget.IAppWidgetService$Stub
com.android.internal.appwidget.IAppWidgetService$Stub$Proxy
@@ -2521,6 +2545,8 @@
com.android.internal.content.ReferrerIntent
com.android.internal.content.ReferrerIntent$1
com.android.internal.inputmethod.InputMethodUtils
+com.android.internal.inputmethod.InputMethodUtils$1
+com.android.internal.inputmethod.LocaleUtils$LocaleExtractor
com.android.internal.logging.AndroidConfig
com.android.internal.logging.AndroidHandler
com.android.internal.logging.AndroidHandler$1
@@ -2575,6 +2601,9 @@
com.android.internal.util.FastXmlSerializer
com.android.internal.util.GrowingArrayUtils
com.android.internal.util.LineBreakBufferedWriter
+com.android.internal.util.MessageUtils
+com.android.internal.util.NotificationColorUtil
+com.android.internal.util.NotificationColorUtil$ColorUtilsFromCompat
com.android.internal.util.Preconditions
com.android.internal.util.VirtualRefBasePtr
com.android.internal.util.XmlUtils
@@ -2613,13 +2642,9 @@
com.android.internal.view.menu.MenuPresenter$Callback
com.android.internal.view.menu.MenuView
com.android.internal.view.menu.ShowableListMenu
-com.android.internal.widget.ActionBarOverlayLayout$ActionBarVisibilityCallback
-com.android.internal.widget.AlertDialogLayout
com.android.internal.widget.BackgroundFallback
-com.android.internal.widget.ButtonBarLayout
com.android.internal.widget.DecorContentParent
com.android.internal.widget.DecorToolbar
-com.android.internal.widget.DialogTitle
com.android.internal.widget.EditableInputConnection
com.android.internal.widget.ScrollBarUtils
com.android.internal.widget.ToolbarWidgetWrapper
@@ -2884,7 +2909,6 @@
dalvik.system.CloseGuard$DefaultReporter
dalvik.system.CloseGuard$Reporter
dalvik.system.DalvikLogHandler
-dalvik.system.DalvikLogging
dalvik.system.DexClassLoader
dalvik.system.DexFile
dalvik.system.DexFile$DFEnum
@@ -2911,6 +2935,7 @@
java.io.ByteArrayOutputStream
java.io.CharArrayWriter
java.io.Closeable
+java.io.Console
java.io.DataInput
java.io.DataInputStream
java.io.DataOutput
@@ -2922,15 +2947,14 @@
java.io.Externalizable
java.io.File
java.io.File$PathStatus
-java.io.File$TempDirectory
java.io.FileDescriptor
+java.io.FileFilter
java.io.FileInputStream
java.io.FileInputStream$UseManualSkipException
java.io.FileNotFoundException
java.io.FileOutputStream
java.io.FileReader
java.io.FileSystem
-java.io.FileWriter
java.io.FilenameFilter
java.io.FilterInputStream
java.io.FilterOutputStream
@@ -2941,7 +2965,6 @@
java.io.InputStreamReader
java.io.InterruptedIOException
java.io.InvalidObjectException
-java.io.NotSerializableException
java.io.ObjectInput
java.io.ObjectInputStream
java.io.ObjectInputStream$BlockDataInputStream
@@ -3013,6 +3036,7 @@
java.lang.EnumConstantNotPresentException
java.lang.Error
java.lang.Exception
+java.lang.ExceptionInInitializerError
java.lang.Float
java.lang.FloatingDecimal
java.lang.FloatingDecimal$1
@@ -3056,7 +3080,6 @@
java.lang.RuntimeException
java.lang.RuntimePermission
java.lang.SecurityException
-java.lang.SecurityManager
java.lang.Short
java.lang.Short$ShortCache
java.lang.Shutdown
@@ -3133,7 +3156,6 @@
java.math.BigInt
java.math.BigInteger
java.math.BitLevel
-java.math.Multiplication
java.math.NativeBN
java.math.RoundingMode
java.net.AbstractPlainDatagramSocketImpl
@@ -3260,22 +3282,18 @@
java.security.AlgorithmParameters
java.security.AlgorithmParametersSpi
java.security.BasicPermission
-java.security.BasicPermissionCollection
java.security.CryptoPrimitive
java.security.GeneralSecurityException
java.security.Guard
java.security.InvalidAlgorithmParameterException
java.security.InvalidKeyException
-java.security.InvalidParameterException
java.security.Key
java.security.KeyException
java.security.KeyFactory
java.security.KeyFactorySpi
java.security.KeyManagementException
-java.security.KeyPair
java.security.KeyStore
java.security.KeyStore$1
-java.security.KeyStore$LoadStoreParameter
java.security.KeyStoreException
java.security.KeyStoreSpi
java.security.MessageDigest
@@ -3285,6 +3303,7 @@
java.security.NoSuchProviderException
java.security.Permission
java.security.PermissionCollection
+java.security.Permissions
java.security.Principal
java.security.PrivateKey
java.security.PrivilegedAction
@@ -3332,7 +3351,6 @@
java.security.cert.PKIXRevocationChecker
java.security.cert.PolicyNode
java.security.cert.TrustAnchor
-java.security.cert.X509CRL
java.security.cert.X509CertSelector
java.security.cert.X509Certificate
java.security.cert.X509Extension
@@ -3342,7 +3360,6 @@
java.security.interfaces.ECPrivateKey
java.security.interfaces.ECPublicKey
java.security.interfaces.RSAKey
-java.security.interfaces.RSAPrivateCrtKey
java.security.interfaces.RSAPrivateKey
java.security.interfaces.RSAPublicKey
java.security.spec.AlgorithmParameterSpec
@@ -3351,19 +3368,14 @@
java.security.spec.ECFieldFp
java.security.spec.ECParameterSpec
java.security.spec.ECPoint
-java.security.spec.ECPrivateKeySpec
java.security.spec.ECPublicKeySpec
java.security.spec.EllipticCurve
java.security.spec.EncodedKeySpec
java.security.spec.InvalidKeySpecException
java.security.spec.InvalidParameterSpecException
java.security.spec.KeySpec
-java.security.spec.PKCS8EncodedKeySpec
-java.security.spec.RSAPrivateCrtKeySpec
-java.security.spec.RSAPrivateKeySpec
java.security.spec.RSAPublicKeySpec
java.security.spec.X509EncodedKeySpec
-java.sql.Timestamp
java.text.AttributedCharacterIterator$Attribute
java.text.CalendarBuilder
java.text.Collator
@@ -3401,7 +3413,9 @@
java.util.AbstractSequentialList
java.util.AbstractSet
java.util.ArrayDeque
+java.util.ArrayDeque$DeqIterator
java.util.ArrayList
+java.util.ArrayList$ArrayListSpliterator
java.util.ArrayList$Itr
java.util.ArrayList$ListItr
java.util.ArrayList$SubList
@@ -3414,6 +3428,7 @@
java.util.Collections
java.util.Collections$1
java.util.Collections$2
+java.util.Collections$3
java.util.Collections$AsLIFOQueue
java.util.Collections$CheckedCollection
java.util.Collections$CheckedList
@@ -3456,6 +3471,14 @@
java.util.Collections$UnmodifiableSortedSet
java.util.ComparableTimSort
java.util.Comparator
+java.util.Comparator$-java_util_Comparator_comparingDouble_java_util_function_ToDoubleFunction_keyExtractor_LambdaImpl0
+java.util.Comparator$-java_util_Comparator_comparingInt_java_util_function_ToIntFunction_keyExtractor_LambdaImpl0
+java.util.Comparator$-java_util_Comparator_comparingLong_java_util_function_ToLongFunction_keyExtractor_LambdaImpl0
+java.util.Comparator$-java_util_Comparator_comparing_java_util_function_Function_keyExtractor_LambdaImpl0
+java.util.Comparator$-java_util_Comparator_comparing_java_util_function_Function_keyExtractor_java_util_Comparator_keyComparator_LambdaImpl0
+java.util.Comparator$-java_util_Comparator_thenComparing_java_util_Comparator_other_LambdaImpl0
+java.util.Comparators$NaturalOrderComparator
+java.util.Comparators$NullComparator
java.util.ConcurrentModificationException
java.util.Currency
java.util.Date
@@ -3464,7 +3487,6 @@
java.util.DualPivotQuicksort
java.util.EnumMap
java.util.EnumMap$1
-java.util.EnumMap$EnumMapIterator
java.util.EnumSet
java.util.Enumeration
java.util.EventListener
@@ -3497,8 +3519,6 @@
java.util.Hashtable$KeySet
java.util.Hashtable$ValueCollection
java.util.IdentityHashMap
-java.util.IdentityHashMap$EntryIterator
-java.util.IdentityHashMap$EntrySet
java.util.IdentityHashMap$IdentityHashMapIterator
java.util.IdentityHashMap$KeySet
java.util.IllegalFormatException
@@ -3538,7 +3558,6 @@
java.util.RandomAccess
java.util.RandomAccessSubList
java.util.RegularEnumSet
-java.util.RegularEnumSet$EnumSetIterator
java.util.ResourceBundle
java.util.ResourceBundle$1
java.util.ResourceBundle$BundleReference
@@ -3550,7 +3569,6 @@
java.util.ResourceBundle$LoaderReference
java.util.ResourceBundle$RBClassLoader
java.util.ResourceBundle$RBClassLoader$1
-java.util.Scanner
java.util.ServiceLoader
java.util.ServiceLoader$1
java.util.ServiceLoader$LazyIterator
@@ -3558,6 +3576,17 @@
java.util.SimpleTimeZone
java.util.SortedMap
java.util.SortedSet
+java.util.Spliterator
+java.util.Spliterator$OfDouble
+java.util.Spliterator$OfInt
+java.util.Spliterator$OfLong
+java.util.Spliterator$OfPrimitive
+java.util.Spliterators
+java.util.Spliterators$EmptySpliterator
+java.util.Spliterators$EmptySpliterator$OfDouble
+java.util.Spliterators$EmptySpliterator$OfInt
+java.util.Spliterators$EmptySpliterator$OfLong
+java.util.Spliterators$EmptySpliterator$OfRef
java.util.Stack
java.util.StringTokenizer
java.util.SubList
@@ -3569,12 +3598,10 @@
java.util.TimerTask
java.util.TimerThread
java.util.TreeMap
-java.util.TreeMap$AscendingSubMap
java.util.TreeMap$EntryIterator
java.util.TreeMap$EntrySet
java.util.TreeMap$KeyIterator
java.util.TreeMap$KeySet
-java.util.TreeMap$NavigableSubMap
java.util.TreeMap$PrivateEntryIterator
java.util.TreeMap$TreeMapEntry
java.util.TreeMap$ValueIterator
@@ -3595,14 +3622,12 @@
java.util.WeakHashMap$Values
java.util.XMLUtils
java.util.concurrent.AbstractExecutorService
-java.util.concurrent.ArrayBlockingQueue
java.util.concurrent.BlockingQueue
java.util.concurrent.Callable
java.util.concurrent.CancellationException
java.util.concurrent.ConcurrentHashMap
java.util.concurrent.ConcurrentHashMap$BaseIterator
java.util.concurrent.ConcurrentHashMap$CollectionView
-java.util.concurrent.ConcurrentHashMap$CounterCell
java.util.concurrent.ConcurrentHashMap$ForwardingNode
java.util.concurrent.ConcurrentHashMap$KeyIterator
java.util.concurrent.ConcurrentHashMap$KeySetView
@@ -3611,8 +3636,6 @@
java.util.concurrent.ConcurrentHashMap$Traverser
java.util.concurrent.ConcurrentHashMap$TreeBin
java.util.concurrent.ConcurrentHashMap$TreeNode
-java.util.concurrent.ConcurrentHashMap$ValueIterator
-java.util.concurrent.ConcurrentHashMap$ValuesView
java.util.concurrent.ConcurrentLinkedQueue
java.util.concurrent.ConcurrentLinkedQueue$Node
java.util.concurrent.ConcurrentMap
@@ -3689,6 +3712,16 @@
java.util.concurrent.locks.ReentrantReadWriteLock$Sync
java.util.concurrent.locks.ReentrantReadWriteLock$Sync$ThreadLocalHoldCounter
java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock
+java.util.function.BiConsumer
+java.util.function.BiFunction
+java.util.function.Consumer
+java.util.function.Function
+java.util.function.Predicate
+java.util.function.Supplier
+java.util.function.ToDoubleFunction
+java.util.function.ToIntFunction
+java.util.function.ToLongFunction
+java.util.function.UnaryOperator
java.util.jar.JarEntry
java.util.jar.JarFile
java.util.jar.JarFile$1
@@ -3709,15 +3742,19 @@
java.util.logging.LogManager$LoggerWeakRef
java.util.logging.LogManager$RootLogger
java.util.logging.LogManager$SystemLoggerContext
-java.util.logging.LogRecord
java.util.logging.Logger
java.util.logging.LoggingPermission
java.util.logging.LoggingProxyImpl
+java.util.prefs.AbstractPreferences
+java.util.prefs.Preferences
java.util.regex.MatchResult
java.util.regex.Matcher
java.util.regex.Pattern
java.util.regex.PatternSyntaxException
java.util.spi.LocaleServiceProvider
+java.util.stream.BaseStream
+java.util.stream.Stream
+java.util.stream.StreamSupport
java.util.zip.Adler32
java.util.zip.CRC32
java.util.zip.CheckedInputStream
@@ -3748,7 +3785,6 @@
javax.crypto.CipherSpi
javax.crypto.IllegalBlockSizeException
javax.crypto.JceSecurity
-javax.crypto.Mac
javax.crypto.NoSuchPaddingException
javax.crypto.NullCipher
javax.crypto.SecretKey
@@ -3757,10 +3793,6 @@
javax.crypto.spec.SecretKeySpec
javax.microedition.khronos.egl.EGL
javax.microedition.khronos.egl.EGL10
-javax.microedition.khronos.egl.EGLConfig
-javax.microedition.khronos.egl.EGLContext
-javax.microedition.khronos.egl.EGLDisplay
-javax.microedition.khronos.egl.EGLSurface
javax.microedition.khronos.opengles.GL
javax.microedition.khronos.opengles.GL10
javax.microedition.khronos.opengles.GL10Ext
@@ -3771,7 +3803,6 @@
javax.net.ServerSocketFactory
javax.net.SocketFactory
javax.net.ssl.ExtendedSSLSession
-javax.net.ssl.HandshakeCompletedEvent
javax.net.ssl.HandshakeCompletedListener
javax.net.ssl.HostnameVerifier
javax.net.ssl.HttpsURLConnection
@@ -3779,23 +3810,20 @@
javax.net.ssl.KeyManagerFactory
javax.net.ssl.KeyManagerFactory$1
javax.net.ssl.KeyManagerFactorySpi
+javax.net.ssl.SNIHostName
+javax.net.ssl.SNIServerName
javax.net.ssl.SSLContext
javax.net.ssl.SSLContextSpi
javax.net.ssl.SSLEngine
javax.net.ssl.SSLException
-javax.net.ssl.SSLHandshakeException
javax.net.ssl.SSLParameters
javax.net.ssl.SSLPeerUnverifiedException
javax.net.ssl.SSLProtocolException
-javax.net.ssl.SSLServerSocket
javax.net.ssl.SSLServerSocketFactory
javax.net.ssl.SSLSession
-javax.net.ssl.SSLSessionBindingEvent
-javax.net.ssl.SSLSessionBindingListener
javax.net.ssl.SSLSessionContext
javax.net.ssl.SSLSocket
javax.net.ssl.SSLSocketFactory
-javax.net.ssl.SSLSocketFactory$1
javax.net.ssl.TrustManager
javax.net.ssl.TrustManagerFactory
javax.net.ssl.TrustManagerFactory$1
@@ -3841,7 +3869,6 @@
libcore.io.NioBufferIterator
libcore.io.Os
libcore.io.Posix
-libcore.math.MathUtils
libcore.net.NetworkSecurityPolicy
libcore.net.NetworkSecurityPolicy$DefaultNetworkSecurityPolicy
libcore.net.UriCodec
@@ -3857,7 +3884,6 @@
libcore.reflect.ListOfTypes
libcore.reflect.ListOfVariables
libcore.reflect.ParameterizedTypeImpl
-libcore.reflect.TypeVariableImpl
libcore.reflect.Types
libcore.util.BasicLruCache
libcore.util.CharsetUtils
@@ -3866,7 +3892,6 @@
libcore.util.NativeAllocationRegistry
libcore.util.NativeAllocationRegistry$CleanerRunner
libcore.util.NativeAllocationRegistry$CleanerThunk
-libcore.util.Objects
libcore.util.ZoneInfo
libcore.util.ZoneInfo$CheckedArithmeticException
libcore.util.ZoneInfo$WallTime
@@ -3892,11 +3917,8 @@
org.apache.http.HttpResponse
org.apache.http.HttpVersion
org.apache.http.NameValuePair
-org.apache.http.ProtocolException
org.apache.http.ProtocolVersion
-org.apache.http.ReasonPhraseCatalog
org.apache.http.StatusLine
-org.apache.http.client.ClientProtocolException
org.apache.http.client.HttpClient
org.apache.http.client.ResponseHandler
org.apache.http.client.methods.AbortableHttpRequest
@@ -3905,26 +3927,15 @@
org.apache.http.client.methods.HttpPost
org.apache.http.client.methods.HttpRequestBase
org.apache.http.client.methods.HttpUriRequest
-org.apache.http.client.utils.URLEncodedUtils
org.apache.http.conn.ClientConnectionManager
org.apache.http.conn.ConnectTimeoutException
-org.apache.http.conn.params.ConnManagerPNames
-org.apache.http.conn.params.ConnManagerParams
-org.apache.http.conn.params.ConnManagerParams$1
-org.apache.http.conn.params.ConnPerRoute
-org.apache.http.conn.scheme.LayeredSocketFactory
-org.apache.http.conn.scheme.SocketFactory
org.apache.http.entity.AbstractHttpEntity
-org.apache.http.entity.BasicHttpEntity
org.apache.http.entity.ByteArrayEntity
-org.apache.http.impl.client.EntityEnclosingRequestWrapper
-org.apache.http.impl.client.RequestWrapper
org.apache.http.impl.cookie.DateParseException
org.apache.http.impl.cookie.DateUtils
org.apache.http.message.AbstractHttpMessage
org.apache.http.message.BasicHeader
org.apache.http.message.BasicHttpResponse
-org.apache.http.message.BasicNameValuePair
org.apache.http.message.BasicStatusLine
org.apache.http.message.HeaderGroup
org.apache.http.params.AbstractHttpParams
@@ -3933,6 +3944,18 @@
org.apache.http.params.HttpConnectionParams
org.apache.http.params.HttpParams
org.apache.http.protocol.HttpContext
+org.ccil.cowan.tagsoup.AttributesImpl
+org.ccil.cowan.tagsoup.AutoDetector
+org.ccil.cowan.tagsoup.Element
+org.ccil.cowan.tagsoup.ElementType
+org.ccil.cowan.tagsoup.HTMLModels
+org.ccil.cowan.tagsoup.HTMLScanner
+org.ccil.cowan.tagsoup.HTMLSchema
+org.ccil.cowan.tagsoup.Parser
+org.ccil.cowan.tagsoup.Parser$1
+org.ccil.cowan.tagsoup.ScanHandler
+org.ccil.cowan.tagsoup.Scanner
+org.ccil.cowan.tagsoup.Schema
org.json.JSON
org.json.JSONArray
org.json.JSONException
@@ -3954,6 +3977,7 @@
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
org.xml.sax.XMLReader
+org.xml.sax.ext.LexicalHandler
org.xml.sax.helpers.DefaultHandler
org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserException
diff --git a/rs/java/android/renderscript/Allocation.java b/rs/java/android/renderscript/Allocation.java
index 9ec6e8d..04ea8e5 100644
--- a/rs/java/android/renderscript/Allocation.java
+++ b/rs/java/android/renderscript/Allocation.java
@@ -58,6 +58,7 @@
private static final int MAX_NUMBER_IO_INPUT_ALLOC = 16;
Type mType;
+ boolean mOwningType = false;
Bitmap mBitmap;
int mUsage;
Allocation mAdaptedAllocation;
@@ -383,13 +384,16 @@
guard.open("destroy");
}
- Allocation(long id, RenderScript rs, Type t, int usage, MipmapControl mips) {
+ Allocation(long id, RenderScript rs, Type t, boolean owningType, int usage, MipmapControl mips) {
this(id, rs, t, usage);
+ mOwningType = owningType;
mMipmapControl = mips;
}
protected void finalize() throws Throwable {
RenderScript.registerNativeFree.invoke(RenderScript.sRuntime, mSize);
+ // Set mType null to avoid double-destroying it in case its finalizer races ahead
+ mType = null;
super.finalize();
}
@@ -1578,6 +1582,9 @@
mRS.finish(); // Necessary because resize is fifoed and update is async.
long typeID = mRS.nAllocationGetType(getID(mRS));
+ // Sets zero the mID so that the finalizer of the old mType value won't
+ // destroy the native object that is being reused.
+ mType.setID(0);
mType = new Type(typeID, mRS);
mType.updateFromNative();
updateCacheInfo(mType);
@@ -1921,7 +1928,7 @@
if (id == 0) {
throw new RSRuntimeException("Allocation creation failed.");
}
- return new Allocation(id, rs, type, usage, mips);
+ return new Allocation(id, rs, type, false, usage, mips);
} finally {
Trace.traceEnd(RenderScript.TRACE_TAG);
}
@@ -1979,7 +1986,7 @@
if (id == 0) {
throw new RSRuntimeException("Allocation creation failed.");
}
- return new Allocation(id, rs, t, usage, MipmapControl.MIPMAP_NONE);
+ return new Allocation(id, rs, t, true, usage, MipmapControl.MIPMAP_NONE);
} finally {
Trace.traceEnd(RenderScript.TRACE_TAG);
}
@@ -2068,7 +2075,7 @@
}
// keep a reference to the Bitmap around to prevent GC
- Allocation alloc = new Allocation(id, rs, t, usage, mips);
+ Allocation alloc = new Allocation(id, rs, t, true, usage, mips);
alloc.setBitmap(b);
return alloc;
}
@@ -2078,7 +2085,7 @@
if (id == 0) {
throw new RSRuntimeException("Load failed.");
}
- return new Allocation(id, rs, t, usage, mips);
+ return new Allocation(id, rs, t, true, usage, mips);
} finally {
Trace.traceEnd(RenderScript.TRACE_TAG);
}
@@ -2150,7 +2157,7 @@
}
for (int i=1; i<numAlloc; i++) {
- mAllocationArray[i] = createFromAllcation(rs, mAllocationArray[0]);
+ mAllocationArray[i] = createFromAllocation(rs, mAllocationArray[0]);
}
return mAllocationArray;
} finally {
@@ -2169,7 +2176,7 @@
* @param alloc RenderScript Allocation describing data layout.
* @return Allocation sharing the same data structure.
*/
- static Allocation createFromAllcation(RenderScript rs, Allocation alloc) {
+ static Allocation createFromAllocation(RenderScript rs, Allocation alloc) {
try {
Trace.traceBegin(RenderScript.TRACE_TAG, "createFromAllcation");
rs.validate();
@@ -2184,7 +2191,7 @@
if (id == 0) {
throw new RSRuntimeException("Allocation creation failed.");
}
- Allocation outAlloc = new Allocation(id, rs, type, usage, mips);
+ Allocation outAlloc = new Allocation(id, rs, type, false, usage, mips);
if ((usage & USAGE_IO_INPUT) != 0) {
outAlloc.shareBufferQueue(alloc);
}
@@ -2360,7 +2367,7 @@
if(id == 0) {
throw new RSRuntimeException("Load failed for bitmap " + b + " element " + e);
}
- return new Allocation(id, rs, t, usage, mips);
+ return new Allocation(id, rs, t, true, usage, mips);
}
/**
@@ -2605,6 +2612,13 @@
if((mUsage & USAGE_IO_OUTPUT) != 0) {
setSurface(null);
}
+
+ if (mType != null && mOwningType) {
+ mType.destroy();
+ mType = null;
+ }
+
super.destroy();
}
+
}
diff --git a/services/core/java/com/android/server/location/GnssLocationProvider.java b/services/core/java/com/android/server/location/GnssLocationProvider.java
index d80dc3b..6b916be 100644
--- a/services/core/java/com/android/server/location/GnssLocationProvider.java
+++ b/services/core/java/com/android/server/location/GnssLocationProvider.java
@@ -40,7 +40,6 @@
import android.location.IGnssStatusProvider;
import android.location.GnssMeasurementsEvent;
import android.location.GnssNavigationMessage;
-import android.location.GnssNavigationMessageEvent;
import android.location.IGpsGeofenceHardware;
import android.location.ILocationManager;
import android.location.INetInitiatedListener;
@@ -1668,16 +1667,6 @@
}
/**
- * called from native code - GPS navigation message callback
- */
- private void reportNavigationMessage(GnssNavigationMessageEvent event) {
- if (event != null) {
- mGnssNavigationMessageProvider
- .onNavigationMessageAvailable(event.getNavigationMessage());
- }
- }
-
- /**
* called from native code to inform us what the GPS engine capabilities are
*/
private void setEngineCapabilities(int capabilities) {
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 3b07fe1..1b3e07c 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -4922,6 +4922,7 @@
}
ri = new ResolveInfo(mResolveInfo);
ri.activityInfo = new ActivityInfo(ri.activityInfo);
+ ri.activityInfo.labelRes = ResolverActivity.getLabelRes(intent.getAction());
ri.activityInfo.applicationInfo = new ApplicationInfo(
ri.activityInfo.applicationInfo);
if (userId != 0) {
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index 847f993..7debf9b 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -2686,7 +2686,7 @@
void writePermissionLPr(XmlSerializer serializer, BasePermission bp)
throws XmlPullParserException, java.io.IOException {
- if (bp.type != BasePermission.TYPE_BUILTIN && bp.sourcePackage != null) {
+ if (bp.sourcePackage != null) {
serializer.startTag(null, TAG_ITEM);
serializer.attribute(null, ATTR_NAME, bp.name);
serializer.attribute(null, "package", bp.sourcePackage);
@@ -3348,8 +3348,12 @@
final String ptype = parser.getAttributeValue(null, "type");
if (name != null && sourcePackage != null) {
final boolean dynamic = "dynamic".equals(ptype);
- final BasePermission bp = new BasePermission(name.intern(), sourcePackage,
- dynamic ? BasePermission.TYPE_DYNAMIC : BasePermission.TYPE_NORMAL);
+ BasePermission bp = out.get(name);
+ // If the permission is builtin, do not clobber it.
+ if (bp == null || bp.type != BasePermission.TYPE_BUILTIN) {
+ bp = new BasePermission(name.intern(), sourcePackage,
+ dynamic ? BasePermission.TYPE_DYNAMIC : BasePermission.TYPE_NORMAL);
+ }
bp.protectionLevel = readInt(parser, null, "protection",
PermissionInfo.PROTECTION_NORMAL);
bp.protectionLevel = PermissionInfo.fixProtectionLevel(bp.protectionLevel);
diff --git a/services/core/java/com/android/server/pm/ShortcutPackage.java b/services/core/java/com/android/server/pm/ShortcutPackage.java
index 58559a5..b9b65eb 100644
--- a/services/core/java/com/android/server/pm/ShortcutPackage.java
+++ b/services/core/java/com/android/server/pm/ShortcutPackage.java
@@ -28,6 +28,7 @@
import android.util.Slog;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.XmlUtils;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -37,7 +38,7 @@
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
-import java.util.Collection;
+import java.util.Arrays;
import java.util.List;
import java.util.function.Predicate;
@@ -51,6 +52,7 @@
private static final String TAG_INTENT_EXTRAS = "intent-extras";
private static final String TAG_EXTRAS = "extras";
private static final String TAG_SHORTCUT = "shortcut";
+ private static final String TAG_CATEGORIES = "categories";
private static final String ATTR_NAME = "name";
private static final String ATTR_DYNAMIC_COUNT = "dynamic-count";
@@ -67,6 +69,11 @@
private static final String ATTR_ICON_RES = "icon-res";
private static final String ATTR_BITMAP_PATH = "bitmap-path";
+ private static final String NAME_CATEGORIES = "categories";
+
+ private static final String TAG_STRING_ARRAY_XMLUTILS = "string-array";
+ private static final String ATTR_NAME_XMLUTILS = "name";
+
/**
* All the shortcuts from the package, keyed on IDs.
*/
@@ -305,7 +312,7 @@
* and return true. Otherwise just return false.
*/
public boolean tryApiCall(@NonNull ShortcutService s) {
- if (getApiCallCount(s) >= s.mMaxDailyUpdates) {
+ if (getApiCallCount(s) >= s.mMaxUpdatesPerInterval) {
return false;
}
mApiCallCount++;
@@ -485,6 +492,16 @@
ShortcutService.writeAttr(out, ATTR_BITMAP_PATH, si.getBitmapPath());
}
+ {
+ final List<String> cat = si.getCategories();
+ if (cat != null && cat.size() > 0) {
+ out.startTag(null, TAG_CATEGORIES);
+ XmlUtils.writeStringArrayXml(cat.toArray(new String[cat.size()]),
+ NAME_CATEGORIES, out);
+ out.endTag(null, TAG_CATEGORIES);
+ }
+ }
+
ShortcutService.writeTagExtra(out, TAG_INTENT_EXTRAS,
si.getIntentPersistableExtras());
ShortcutService.writeTagExtra(out, TAG_EXTRAS, si.getExtras());
@@ -550,6 +567,7 @@
int flags;
int iconRes;
String bitmapPath;
+ String[] categories = null;
id = ShortcutService.parseStringAttribute(parser, ATTR_ID);
activityComponent = ShortcutService.parseComponentNameAttribute(parser,
@@ -583,11 +601,21 @@
case TAG_EXTRAS:
extras = PersistableBundle.restoreFromXml(parser);
continue;
+ case TAG_CATEGORIES:
+ // This just contains string-array.
+ continue;
+ case TAG_STRING_ARRAY_XMLUTILS:
+ if (NAME_CATEGORIES.equals(ShortcutService.parseStringAttribute(parser,
+ ATTR_NAME_XMLUTILS))) {
+ categories = XmlUtils.readThisStringArrayXml(parser, TAG_STRING_ARRAY_XMLUTILS, null);
+ }
+ continue;
}
throw ShortcutService.throwForInvalidTag(depth, tag);
}
return new ShortcutInfo(
- userId, id, packageName, activityComponent, /* icon =*/ null, title, text, intent,
+ userId, id, packageName, activityComponent, /* icon =*/ null, title, text,
+ (categories == null ? null : Arrays.asList(categories)), intent,
intentPersistableExtras, weight, extras, lastChangedTimestamp, flags,
iconRes, bitmapPath);
}
diff --git a/services/core/java/com/android/server/pm/ShortcutService.java b/services/core/java/com/android/server/pm/ShortcutService.java
index 1641e1d..ac6510a 100644
--- a/services/core/java/com/android/server/pm/ShortcutService.java
+++ b/services/core/java/com/android/server/pm/ShortcutService.java
@@ -126,10 +126,10 @@
static final boolean DEBUG_LOAD = false; // STOPSHIP if true
@VisibleForTesting
- static final long DEFAULT_RESET_INTERVAL_SEC = 24 * 60 * 60; // 1 day
+ static final long DEFAULT_RESET_INTERVAL_SEC = 60 * 60; // 1 hour
@VisibleForTesting
- static final int DEFAULT_MAX_DAILY_UPDATES = 10;
+ static final int DEFAULT_MAX_UPDATES_PER_INTERVAL = 2;
@VisibleForTesting
static final int DEFAULT_MAX_SHORTCUTS_PER_APP = 5;
@@ -180,7 +180,7 @@
/**
* Key name for the max number of modifying API calls per app for every interval. (int)
*/
- String KEY_MAX_DAILY_UPDATES = "max_daily_updates";
+ String KEY_MAX_UPDATES_PER_INTERVAL = "max_updates_per_interval";
/**
* Key name for the max icon dimensions in DP, for non-low-memory devices.
@@ -232,9 +232,9 @@
private int mMaxDynamicShortcuts;
/**
- * Max number of updating API calls that each application can make a day.
+ * Max number of updating API calls that each application can make during the interval.
*/
- int mMaxDailyUpdates;
+ int mMaxUpdatesPerInterval;
/**
* Actual throttling-reset interval. By default it's a day.
@@ -426,8 +426,8 @@
ConfigConstants.KEY_RESET_INTERVAL_SEC, DEFAULT_RESET_INTERVAL_SEC)
* 1000L);
- mMaxDailyUpdates = Math.max(0, (int) parser.getLong(
- ConfigConstants.KEY_MAX_DAILY_UPDATES, DEFAULT_MAX_DAILY_UPDATES));
+ mMaxUpdatesPerInterval = Math.max(0, (int) parser.getLong(
+ ConfigConstants.KEY_MAX_UPDATES_PER_INTERVAL, DEFAULT_MAX_UPDATES_PER_INTERVAL));
mMaxDynamicShortcuts = Math.max(0, (int) parser.getLong(
ConfigConstants.KEY_MAX_SHORTCUTS, DEFAULT_MAX_SHORTCUTS_PER_APP));
@@ -1319,10 +1319,13 @@
}
@Override
- public boolean addDynamicShortcut(String packageName, ShortcutInfo newShortcut,
+ public boolean addDynamicShortcuts(String packageName, ParceledListSlice shortcutInfoList,
@UserIdInt int userId) {
verifyCaller(packageName, userId);
+ final List<ShortcutInfo> newShortcuts = (List<ShortcutInfo>) shortcutInfoList.getList();
+ final int size = newShortcuts.size();
+
synchronized (mLock) {
final ShortcutPackage ps = getPackageShortcutsLocked(packageName, userId);
@@ -1330,12 +1333,15 @@
if (!ps.tryApiCall(this)) {
return false;
}
+ for (int i = 0; i < size; i++) {
+ final ShortcutInfo newShortcut = newShortcuts.get(i);
- // Validate the shortcut.
- fixUpIncomingShortcutInfo(newShortcut, /* forUpdate= */ false);
+ // Validate the shortcut.
+ fixUpIncomingShortcutInfo(newShortcut, /* forUpdate= */ false);
- // Add it.
- ps.addDynamicShortcut(this, newShortcut);
+ // Add it.
+ ps.addDynamicShortcut(this, newShortcut);
+ }
}
userPackageChanged(packageName, userId);
@@ -1343,19 +1349,22 @@
}
@Override
- public void deleteDynamicShortcut(String packageName, String shortcutId,
+ public void removeDynamicShortcuts(String packageName, List shortcutIds,
@UserIdInt int userId) {
verifyCaller(packageName, userId);
- Preconditions.checkStringNotEmpty(shortcutId, "shortcutId must be provided");
+ Preconditions.checkNotNull(shortcutIds, "shortcutIds must be provided");
synchronized (mLock) {
- getPackageShortcutsLocked(packageName, userId).deleteDynamicWithId(this, shortcutId);
+ for (int i = shortcutIds.size() - 1; i >= 0; i--) {
+ getPackageShortcutsLocked(packageName, userId).deleteDynamicWithId(this,
+ Preconditions.checkStringNotEmpty((String) shortcutIds.get(i)));
+ }
}
userPackageChanged(packageName, userId);
}
@Override
- public void deleteAllDynamicShortcuts(String packageName, @UserIdInt int userId) {
+ public void removeAllDynamicShortcuts(String packageName, @UserIdInt int userId) {
verifyCaller(packageName, userId);
synchronized (mLock) {
@@ -1409,7 +1418,7 @@
verifyCaller(packageName, userId);
synchronized (mLock) {
- return mMaxDailyUpdates
+ return mMaxUpdatesPerInterval
- getPackageShortcutsLocked(packageName, userId).getApiCallCount(this);
}
}
@@ -2079,8 +2088,8 @@
pw.println(mSaveDelayMillis);
pw.print(" resetInterval:");
pw.println(mResetInterval);
- pw.print(" maxDailyUpdates:");
- pw.println(mMaxDailyUpdates);
+ pw.print(" maxUpdatesPerInterval:");
+ pw.println(mMaxUpdatesPerInterval);
pw.print(" maxDynamicShortcuts:");
pw.println(mMaxDynamicShortcuts);
pw.println();
@@ -2423,8 +2432,8 @@
}
@VisibleForTesting
- int getMaxDailyUpdatesForTest() {
- return mMaxDailyUpdates;
+ int getMaxUpdatesPerIntervalForTest() {
+ return mMaxUpdatesPerInterval;
}
@VisibleForTesting
diff --git a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
index 78b0844..93eb82f 100644
--- a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
+++ b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
@@ -562,7 +562,7 @@
method_reportNavigationMessages = env->GetMethodID(
clazz,
"reportNavigationMessage",
- "(Landroid/location/GnssNavigationMessageEvent;)V");
+ "(Landroid/location/GnssNavigationMessage;)V");
err = hw_get_module(GPS_HARDWARE_MODULE_ID, (hw_module_t const**)&module);
if (err == 0) {
@@ -1486,26 +1486,6 @@
return object.get();
}
-static void set_navigation_message(jobject navigationMessage) {
- JNIEnv* env = AndroidRuntime::getJNIEnv();
- jclass navigationMessageEventClass =
- env->FindClass("android/location/GnssNavigationMessageEvent");
- jmethodID navigationMessageEventCtor = env->GetMethodID(
- navigationMessageEventClass,
- "<init>",
- "(Landroid/location/GnssNavigationMessage;)V");
- jobject navigationMessageEvent = env->NewObject(
- navigationMessageEventClass,
- navigationMessageEventCtor,
- navigationMessage);
- env->CallVoidMethod(mCallbacksObj,
- method_reportNavigationMessages,
- navigationMessageEvent);
- checkAndClearExceptionFromCallback(env, __FUNCTION__);
- env->DeleteLocalRef(navigationMessageEventClass);
- env->DeleteLocalRef(navigationMessageEvent);
-}
-
static void navigation_message_callback(GpsNavigationMessage* message) {
if (message == NULL) {
ALOGE("Invalid Navigation Message provided to callback");
@@ -1517,7 +1497,9 @@
}
JNIEnv* env = AndroidRuntime::getJNIEnv();
jobject navigationMessage = translate_gps_navigation_message(env, message);
- set_navigation_message(navigationMessage);
+ env->CallVoidMethod(mCallbacksObj,
+ method_reportNavigationMessages,
+ navigationMessage);
env->DeleteLocalRef(navigationMessage);
}
@@ -1532,7 +1514,9 @@
}
JNIEnv* env = AndroidRuntime::getJNIEnv();
jobject navigationMessage = translate_gnss_navigation_message(env, message);
- set_navigation_message(navigationMessage);
+ env->CallVoidMethod(mCallbacksObj,
+ method_reportNavigationMessages,
+ navigationMessage);
env->DeleteLocalRef(navigationMessage);
}
diff --git a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest.java b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest.java
index 2fd11da..ce02a79 100644
--- a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest.java
@@ -216,7 +216,8 @@
String injectShortcutManagerConstants() {
return ConfigConstants.KEY_RESET_INTERVAL_SEC + "=" + (INTERVAL / 1000) + ","
+ ConfigConstants.KEY_MAX_SHORTCUTS + "=" + MAX_SHORTCUTS + ","
- + ConfigConstants.KEY_MAX_DAILY_UPDATES + "=" + MAX_DAILY_UPDATES + ","
+ + ConfigConstants.KEY_MAX_UPDATES_PER_INTERVAL + "="
+ + MAX_UPDATES_PER_INTERVAL + ","
+ ConfigConstants.KEY_MAX_ICON_DIMENSION_DP + "=" + MAX_ICON_DIMENSION + ","
+ ConfigConstants.KEY_MAX_ICON_DIMENSION_DP_LOWRAM + "="
+ MAX_ICON_DIMENSION_LOWRAM + ","
@@ -465,7 +466,7 @@
private static final int MAX_SHORTCUTS = 10;
- private static final int MAX_DAILY_UPDATES = 3;
+ private static final int MAX_UPDATES_PER_INTERVAL = 3;
private static final int MAX_ICON_DIMENSION = 128;
@@ -1074,7 +1075,7 @@
assertResetTimes(START_TIME + INTERVAL, START_TIME + 2 * INTERVAL);
- // Advance further; 4 days since start.
+ // Advance further; 4 hours since start.
mInjectedCurrentTimeLillis = START_TIME + 4 * INTERVAL + 50;
assertResetTimes(START_TIME + 4 * INTERVAL, START_TIME + 5 * INTERVAL);
@@ -1111,14 +1112,14 @@
mService.updateConfigurationLocked(
ConfigConstants.KEY_RESET_INTERVAL_SEC + "=123,"
+ ConfigConstants.KEY_MAX_SHORTCUTS + "=4,"
- + ConfigConstants.KEY_MAX_DAILY_UPDATES + "=5,"
+ + ConfigConstants.KEY_MAX_UPDATES_PER_INTERVAL + "=5,"
+ ConfigConstants.KEY_MAX_ICON_DIMENSION_DP + "=100,"
+ ConfigConstants.KEY_MAX_ICON_DIMENSION_DP_LOWRAM + "=50,"
+ ConfigConstants.KEY_ICON_FORMAT + "=WEBP,"
+ ConfigConstants.KEY_ICON_QUALITY + "=75");
assertEquals(123000, mService.getResetIntervalForTest());
assertEquals(4, mService.getMaxDynamicShortcutsForTest());
- assertEquals(5, mService.getMaxDailyUpdatesForTest());
+ assertEquals(5, mService.getMaxUpdatesPerIntervalForTest());
assertEquals(100, mService.getMaxIconDimensionForTest());
assertEquals(CompressFormat.WEBP, mService.getIconPersistFormatForTest());
assertEquals(75, mService.getIconPersistQualityForTest());
@@ -1134,8 +1135,8 @@
assertEquals(ShortcutService.DEFAULT_MAX_SHORTCUTS_PER_APP,
mService.getMaxDynamicShortcutsForTest());
- assertEquals(ShortcutService.DEFAULT_MAX_DAILY_UPDATES,
- mService.getMaxDailyUpdatesForTest());
+ assertEquals(ShortcutService.DEFAULT_MAX_UPDATES_PER_INTERVAL,
+ mService.getMaxUpdatesPerIntervalForTest());
assertEquals(50, mService.getMaxIconDimensionForTest());
@@ -1154,7 +1155,7 @@
/** Test for {@link android.content.pm.ShortcutManager#getRemainingCallCount()} */
public void testGetRemainingCallCount() {
- assertEquals(MAX_DAILY_UPDATES, mManager.getRemainingCallCount());
+ assertEquals(MAX_UPDATES_PER_INTERVAL, mManager.getRemainingCallCount());
}
/** Test for {@link android.content.pm.ShortcutManager#getRateLimitResetTime()} */
@@ -1241,61 +1242,71 @@
mManager.getDynamicShortcuts()),
"shortcut1");
- assertTrue(mManager.addDynamicShortcut(si2));
+ assertTrue(mManager.addDynamicShortcuts(list(si2, si3)));
assertEquals(1, mManager.getRemainingCallCount());
assertShortcutIds(assertAllNotKeyFieldsOnly(
mManager.getDynamicShortcuts()),
- "shortcut1", "shortcut2");
+ "shortcut1", "shortcut2", "shortcut3");
- // Add with the same ID
- assertTrue(mManager.addDynamicShortcut(makeShortcut("shortcut1")));
+ // This should not crash. It'll still consume the quota.
+ assertTrue(mManager.addDynamicShortcuts(list()));
assertEquals(0, mManager.getRemainingCallCount());
assertShortcutIds(assertAllNotKeyFieldsOnly(
mManager.getDynamicShortcuts()),
- "shortcut1", "shortcut2");
+ "shortcut1", "shortcut2", "shortcut3");
+
+ mInjectedCurrentTimeLillis += INTERVAL; // reset
+
+ // Add with the same ID
+ assertTrue(mManager.addDynamicShortcuts(list(makeShortcut("shortcut1"))));
+ assertEquals(2, mManager.getRemainingCallCount());
+ assertShortcutIds(assertAllNotKeyFieldsOnly(
+ mManager.getDynamicShortcuts()),
+ "shortcut1", "shortcut2", "shortcut3");
// TODO Check max number
// TODO Check fields.
runWithCaller(CALLING_PACKAGE_2, USER_10, () -> {
- assertTrue(mManager.addDynamicShortcut(makeShortcut("s1")));
+ assertTrue(mManager.addDynamicShortcuts(list(makeShortcut("s1"))));
});
}
- public void testDeleteDynamicShortcut() {
+ public void testDeleteDynamicShortcuts() {
final ShortcutInfo si1 = makeShortcut("shortcut1");
final ShortcutInfo si2 = makeShortcut("shortcut2");
final ShortcutInfo si3 = makeShortcut("shortcut3");
+ final ShortcutInfo si4 = makeShortcut("shortcut4");
- assertTrue(mManager.setDynamicShortcuts(list(si1, si2, si3)));
+ assertTrue(mManager.setDynamicShortcuts(list(si1, si2, si3, si4)));
assertShortcutIds(assertAllNotKeyFieldsOnly(
mManager.getDynamicShortcuts()),
- "shortcut1", "shortcut2", "shortcut3");
+ "shortcut1", "shortcut2", "shortcut3", "shortcut4");
assertEquals(2, mManager.getRemainingCallCount());
- mManager.deleteDynamicShortcut("shortcut1");
+ mManager.removeDynamicShortcuts(list("shortcut1"));
assertShortcutIds(assertAllNotKeyFieldsOnly(
mManager.getDynamicShortcuts()),
- "shortcut2", "shortcut3");
+ "shortcut2", "shortcut3", "shortcut4");
- mManager.deleteDynamicShortcut("shortcut1");
+ mManager.removeDynamicShortcuts(list("shortcut1"));
assertShortcutIds(assertAllNotKeyFieldsOnly(
mManager.getDynamicShortcuts()),
- "shortcut2", "shortcut3");
+ "shortcut2", "shortcut3", "shortcut4");
- mManager.deleteDynamicShortcut("shortcutXXX");
+ mManager.removeDynamicShortcuts(list("shortcutXXX"));
assertShortcutIds(assertAllNotKeyFieldsOnly(
mManager.getDynamicShortcuts()),
- "shortcut2", "shortcut3");
+ "shortcut2", "shortcut3", "shortcut4");
- mManager.deleteDynamicShortcut("shortcut2");
+ mManager.removeDynamicShortcuts(list("shortcut2", "shortcut4"));
assertShortcutIds(assertAllNotKeyFieldsOnly(
mManager.getDynamicShortcuts()),
"shortcut3");
- mManager.deleteDynamicShortcut("shortcut3");
+ mManager.removeDynamicShortcuts(list("shortcut3"));
assertShortcutIds(assertAllNotKeyFieldsOnly(
mManager.getDynamicShortcuts()));
@@ -1315,7 +1326,7 @@
assertEquals(2, mManager.getRemainingCallCount());
- mManager.deleteAllDynamicShortcuts();
+ mManager.removeAllDynamicShortcuts();
assertEquals(0, mManager.getDynamicShortcuts().size());
assertEquals(2, mManager.getRemainingCallCount());
@@ -1383,7 +1394,7 @@
assertEquals(0, mManager.getRemainingCallCount());
assertEquals(START_TIME + INTERVAL * 2, mManager.getRateLimitResetTime());
- // 4 days later...
+ // 4 hours later...
mInjectedCurrentTimeLillis = START_TIME + 4 * INTERVAL;
assertTrue(mManager.setDynamicShortcuts(list(si1)));
assertEquals(2, mManager.getRemainingCallCount());
@@ -1791,13 +1802,13 @@
getCallingUser());
});
runWithCaller(CALLING_PACKAGE_1, UserHandle.USER_SYSTEM, () -> {
- mManager.deleteDynamicShortcut("s1");
- mManager.deleteDynamicShortcut("s2");
+ mManager.removeDynamicShortcuts(list("s1"));
+ mManager.removeDynamicShortcuts(list("s2"));
});
runWithCaller(CALLING_PACKAGE_2, UserHandle.USER_SYSTEM, () -> {
- mManager.deleteDynamicShortcut("s1");
- mManager.deleteDynamicShortcut("s3");
- mManager.deleteDynamicShortcut("s5");
+ mManager.removeDynamicShortcuts(list("s1"));
+ mManager.removeDynamicShortcuts(list("s3"));
+ mManager.removeDynamicShortcuts(list("s5"));
});
runWithCaller(CALLING_PACKAGE_1, UserHandle.USER_SYSTEM, () -> {
assertShortcutIds(assertAllDynamic(
@@ -2089,7 +2100,7 @@
// Delete some.
setCaller(CALLING_PACKAGE_1);
assertShortcutIds(mManager.getPinnedShortcuts(), "s2");
- mManager.deleteDynamicShortcut("s2");
+ mManager.removeDynamicShortcuts(list("s2"));
assertShortcutIds(mManager.getPinnedShortcuts(), "s2");
dumpsysOnLogcat();
@@ -2154,19 +2165,19 @@
// Delete some.
runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
assertShortcutIds(mManager.getPinnedShortcuts(), "s2");
- mManager.deleteDynamicShortcut("s2");
+ mManager.removeDynamicShortcuts(list("s2"));
assertShortcutIds(mManager.getPinnedShortcuts(), "s2");
});
runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
assertShortcutIds(mManager.getPinnedShortcuts(), "s3", "s4");
- mManager.deleteDynamicShortcut("s3");
+ mManager.removeDynamicShortcuts(list("s3"));
assertShortcutIds(mManager.getPinnedShortcuts(), "s3", "s4");
});
runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
assertShortcutIds(mManager.getPinnedShortcuts() /* none */);
- mManager.deleteDynamicShortcut("s2");
+ mManager.removeDynamicShortcuts(list("s2"));
assertShortcutIds(mManager.getPinnedShortcuts() /* none */);
});
@@ -2218,7 +2229,7 @@
// Delete some.
runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
assertShortcutIds(mManager.getPinnedShortcuts(), "s3");
- mManager.deleteDynamicShortcut("s3");
+ mManager.removeDynamicShortcuts(list("s3"));
assertShortcutIds(mManager.getPinnedShortcuts(), "s3");
});
@@ -2226,8 +2237,8 @@
runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
assertShortcutIds(mManager.getPinnedShortcuts(), "s1", "s2");
- mManager.deleteDynamicShortcut("s1");
- mManager.deleteDynamicShortcut("s3");
+ mManager.removeDynamicShortcuts(list("s1"));
+ mManager.removeDynamicShortcuts(list("s3"));
assertShortcutIds(mManager.getPinnedShortcuts(), "s1", "s2");
});
@@ -2336,13 +2347,13 @@
// Delete all dynamic.
runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
- mManager.deleteAllDynamicShortcuts();
+ mManager.removeAllDynamicShortcuts();
assertEquals(0, mManager.getDynamicShortcuts().size());
assertShortcutIds(assertAllPinned(mManager.getPinnedShortcuts()), "s1", "s2", "s3");
});
runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
- mManager.deleteAllDynamicShortcuts();
+ mManager.removeAllDynamicShortcuts();
assertEquals(0, mManager.getDynamicShortcuts().size());
assertShortcutIds(assertAllPinned(mManager.getPinnedShortcuts()), "s2", "s1");
@@ -2377,7 +2388,7 @@
});
// Re-publish s1.
runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
- assertTrue(mManager.addDynamicShortcut(makeShortcut("s1")));
+ assertTrue(mManager.addDynamicShortcuts(list(makeShortcut("s1"))));
assertShortcutIds(assertAllDynamic(mManager.getDynamicShortcuts()), "s1");
assertShortcutIds(assertAllPinned(mManager.getPinnedShortcuts()), "s1", "s2", "s3");
@@ -2979,7 +2990,7 @@
// Just to make it complicated, delete some.
setCaller(CALLING_PACKAGE_1);
- mManager.deleteDynamicShortcut("s2");
+ mManager.removeDynamicShortcuts(list("s2"));
// intent and check.
setCaller(LAUNCHER_1);
@@ -3051,11 +3062,11 @@
any(UserHandle.class)
);
- // Test for addDynamicShortcut.
+ // Test for addDynamicShortcuts.
reset(c0);
runWithCaller(CALLING_PACKAGE_1, UserHandle.USER_SYSTEM, () -> {
- dumpsysOnLogcat("before addDynamicShortcut");
- assertTrue(mManager.addDynamicShortcut(makeShortcut("s4")));
+ dumpsysOnLogcat("before addDynamicShortcuts");
+ assertTrue(mManager.addDynamicShortcuts(list(makeShortcut("s4"))));
});
waitOnMainThread();
@@ -3071,7 +3082,7 @@
// Test for remove
reset(c0);
runWithCaller(CALLING_PACKAGE_1, UserHandle.USER_SYSTEM, () -> {
- mManager.deleteDynamicShortcut("s1");
+ mManager.removeDynamicShortcuts(list("s1"));
});
waitOnMainThread();
@@ -3104,7 +3115,7 @@
// Test for deleteAll
reset(c0);
runWithCaller(CALLING_PACKAGE_1, UserHandle.USER_SYSTEM, () -> {
- mManager.deleteAllDynamicShortcuts();
+ mManager.removeAllDynamicShortcuts();
});
waitOnMainThread();
@@ -3178,7 +3189,7 @@
resetAll(all);
runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
- mManager.deleteDynamicShortcut("x");
+ mManager.removeDynamicShortcuts(list());
});
waitOnMainThread();
@@ -3195,7 +3206,7 @@
resetAll(all);
runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
- mManager.deleteDynamicShortcut("x");
+ mManager.removeDynamicShortcuts(list());
});
waitOnMainThread();
@@ -3213,7 +3224,7 @@
resetAll(all);
runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
- mManager.deleteDynamicShortcut("x");
+ mManager.removeDynamicShortcuts(list());
});
waitOnMainThread();
@@ -3233,7 +3244,7 @@
resetAll(all);
runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
- mManager.deleteDynamicShortcut("x");
+ mManager.removeDynamicShortcuts(list());
});
waitOnMainThread();
@@ -3253,7 +3264,7 @@
resetAll(all);
runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
- mManager.deleteDynamicShortcut("x");
+ mManager.removeDynamicShortcuts(list());
});
waitOnMainThread();
@@ -3477,16 +3488,16 @@
// Remove all dynamic shortcuts; now all shortcuts are just pinned.
runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
- mManager.deleteAllDynamicShortcuts();
+ mManager.removeAllDynamicShortcuts();
});
runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
- mManager.deleteAllDynamicShortcuts();
+ mManager.removeAllDynamicShortcuts();
});
runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
- mManager.deleteAllDynamicShortcuts();
+ mManager.removeAllDynamicShortcuts();
});
runWithCaller(CALLING_PACKAGE_2, USER_10, () -> {
- mManager.deleteAllDynamicShortcuts();
+ mManager.removeAllDynamicShortcuts();
});
@@ -4009,22 +4020,22 @@
public void testHandlePackageDelete() {
setCaller(CALLING_PACKAGE_1, USER_0);
- assertTrue(mManager.addDynamicShortcut(makeShortcut("s1")));
+ assertTrue(mManager.addDynamicShortcuts(list(makeShortcut("s1"))));
setCaller(CALLING_PACKAGE_2, USER_0);
- assertTrue(mManager.addDynamicShortcut(makeShortcut("s1")));
+ assertTrue(mManager.addDynamicShortcuts(list(makeShortcut("s1"))));
setCaller(CALLING_PACKAGE_3, USER_0);
- assertTrue(mManager.addDynamicShortcut(makeShortcut("s1")));
+ assertTrue(mManager.addDynamicShortcuts(list(makeShortcut("s1"))));
setCaller(CALLING_PACKAGE_1, USER_10);
- assertTrue(mManager.addDynamicShortcut(makeShortcut("s1")));
+ assertTrue(mManager.addDynamicShortcuts(list(makeShortcut("s1"))));
setCaller(CALLING_PACKAGE_2, USER_10);
- assertTrue(mManager.addDynamicShortcut(makeShortcut("s1")));
+ assertTrue(mManager.addDynamicShortcuts(list(makeShortcut("s1"))));
setCaller(CALLING_PACKAGE_3, USER_10);
- assertTrue(mManager.addDynamicShortcut(makeShortcut("s1")));
+ assertTrue(mManager.addDynamicShortcuts(list(makeShortcut("s1"))));
assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_0));
assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_0));
@@ -4980,6 +4991,7 @@
.setTitle("title")
.setText("text")
.setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+ .setCategories(list(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
.setWeight(123)
.setExtras(pb)
.build();
@@ -4995,6 +5007,7 @@
assertEquals("content://a.b.c/", si.getIcon().getUriString());
assertEquals("title", si.getTitle());
assertEquals("text", si.getText());
+ assertEquals(list(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
assertEquals("action", si.getIntent().getAction());
assertEquals("val", si.getIntent().getStringExtra("key"));
assertEquals(123, si.getWeight());
@@ -5016,6 +5029,7 @@
.setIcon(Icon.createWithContentUri("content://a.b.c/"))
.setTitle("title")
.setText("text")
+ .setCategories(list(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
.setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
.setWeight(123)
.setExtras(pb)
@@ -5034,6 +5048,7 @@
assertEquals("content://a.b.c/", si.getIcon().getUriString());
assertEquals("title", si.getTitle());
assertEquals("text", si.getText());
+ assertEquals(list(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
assertEquals("action", si.getIntent().getAction());
assertEquals("val", si.getIntent().getStringExtra("key"));
assertEquals(123, si.getWeight());
@@ -5051,6 +5066,7 @@
assertEquals(null, si.getIcon());
assertEquals("title", si.getTitle());
assertEquals("text", si.getText());
+ assertEquals(list(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
assertEquals("action", si.getIntent().getAction());
assertEquals("val", si.getIntent().getStringExtra("key"));
assertEquals(123, si.getWeight());
@@ -5058,7 +5074,8 @@
assertEquals(ShortcutInfo.FLAG_PINNED, si.getFlags());
assertEquals(null, si.getBitmapPath());
- assertEquals(0, si.getIconResourceId());
+
+ assertEquals(456, si.getIconResourceId());
si = sorig.clone(ShortcutInfo.CLONE_REMOVE_FOR_LAUNCHER);
@@ -5068,13 +5085,15 @@
assertEquals(null, si.getIcon());
assertEquals("title", si.getTitle());
assertEquals("text", si.getText());
+ assertEquals(list(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
assertEquals(null, si.getIntent());
assertEquals(123, si.getWeight());
assertEquals(1, si.getExtras().getInt("k"));
assertEquals(ShortcutInfo.FLAG_PINNED, si.getFlags());
assertEquals(null, si.getBitmapPath());
- assertEquals(0, si.getIconResourceId());
+
+ assertEquals(456, si.getIconResourceId());
si = sorig.clone(ShortcutInfo.CLONE_REMOVE_NON_KEY_INFO);
@@ -5084,13 +5103,56 @@
assertEquals(null, si.getIcon());
assertEquals(null, si.getTitle());
assertEquals(null, si.getText());
+ assertEquals(null, si.getCategories());
assertEquals(null, si.getIntent());
assertEquals(0, si.getWeight());
assertEquals(null, si.getExtras());
assertEquals(ShortcutInfo.FLAG_PINNED | ShortcutInfo.FLAG_KEY_FIELDS_ONLY, si.getFlags());
assertEquals(null, si.getBitmapPath());
- assertEquals(0, si.getIconResourceId());
+
+ assertEquals(456, si.getIconResourceId());
+ }
+
+ public void testShortcutInfoClone_minimum() {
+ PersistableBundle pb = new PersistableBundle();
+ pb.putInt("k", 1);
+ ShortcutInfo sorig = new ShortcutInfo.Builder(getTestContext())
+ .setId("id")
+ .setTitle("title")
+ .setIntent(makeIntent("action", ShortcutActivity.class))
+ .build();
+ ShortcutInfo si = sorig.clone(/* clone flags*/ 0);
+
+ assertEquals(getTestContext().getPackageName(), si.getPackageName());
+ assertEquals("id", si.getId());
+ assertEquals("title", si.getTitle());
+ assertEquals("action", si.getIntent().getAction());
+ assertEquals(null, si.getCategories());
+
+ si = sorig.clone(ShortcutInfo.CLONE_REMOVE_FOR_CREATOR);
+
+ assertEquals(getTestContext().getPackageName(), si.getPackageName());
+ assertEquals("id", si.getId());
+ assertEquals("title", si.getTitle());
+ assertEquals("action", si.getIntent().getAction());
+ assertEquals(null, si.getCategories());
+
+ si = sorig.clone(ShortcutInfo.CLONE_REMOVE_FOR_LAUNCHER);
+
+ assertEquals(getTestContext().getPackageName(), si.getPackageName());
+ assertEquals("id", si.getId());
+ assertEquals("title", si.getTitle());
+ assertEquals(null, si.getIntent());
+ assertEquals(null, si.getCategories());
+
+ si = sorig.clone(ShortcutInfo.CLONE_REMOVE_NON_KEY_INFO);
+
+ assertEquals(getTestContext().getPackageName(), si.getPackageName());
+ assertEquals("id", si.getId());
+ assertEquals(null, si.getTitle());
+ assertEquals(null, si.getIntent());
+ assertEquals(null, si.getCategories());
}
public void testShortcutInfoCopyNonNullFieldsFrom() throws InterruptedException {
@@ -5102,6 +5164,7 @@
.setIcon(Icon.createWithContentUri("content://a.b.c/"))
.setTitle("title")
.setText("text")
+ .setCategories(list(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
.setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
.setWeight(123)
.setExtras(pb)
@@ -5115,38 +5178,57 @@
si = sorig.clone(/* flags=*/ 0);
si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
.setActivityComponent(new ComponentName("x", "y")).build());
+ assertEquals("text", si.getText());
assertEquals(new ComponentName("x", "y"), si.getActivityComponent());
si = sorig.clone(/* flags=*/ 0);
si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
.setIcon(Icon.createWithContentUri("content://x.y.z/")).build());
+ assertEquals("text", si.getText());
assertEquals("content://x.y.z/", si.getIcon().getUriString());
si = sorig.clone(/* flags=*/ 0);
si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
.setTitle("xyz").build());
+ assertEquals("text", si.getText());
assertEquals("xyz", si.getTitle());
si = sorig.clone(/* flags=*/ 0);
si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
.setText("xxx").build());
+ assertEquals(123, si.getWeight());
assertEquals("xxx", si.getText());
si = sorig.clone(/* flags=*/ 0);
si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+ .setCategories(list()).build());
+ assertEquals("text", si.getText());
+ assertEquals(list(), si.getCategories());
+
+ si = sorig.clone(/* flags=*/ 0);
+ si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+ .setCategories(list("x")).build());
+ assertEquals("text", si.getText());
+ assertEquals(list("x"), si.getCategories());
+
+ si = sorig.clone(/* flags=*/ 0);
+ si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
.setIntent(makeIntent("action2", ShortcutActivity.class)).build());
+ assertEquals("text", si.getText());
assertEquals("action2", si.getIntent().getAction());
assertEquals(null, si.getIntent().getStringExtra("key"));
si = sorig.clone(/* flags=*/ 0);
si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
.setIntent(makeIntent("action3", ShortcutActivity.class, "key", "x")).build());
+ assertEquals("text", si.getText());
assertEquals("action3", si.getIntent().getAction());
assertEquals("x", si.getIntent().getStringExtra("key"));
si = sorig.clone(/* flags=*/ 0);
si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
.setWeight(999).build());
+ assertEquals("text", si.getText());
assertEquals(999, si.getWeight());
@@ -5156,8 +5238,11 @@
si = sorig.clone(/* flags=*/ 0);
si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
.setExtras(pb2).build());
+ assertEquals("text", si.getText());
assertEquals(99, si.getExtras().getInt("x"));
+ // Make sure the timestamp gets updated too.
+
final long timestamp = si.getLastChangedTimestamp();
Thread.sleep(2);
@@ -5181,12 +5266,13 @@
.setIcon(bmp32x32)
.setTitle("title")
.setText("text")
+ .setCategories(list(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
.setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
.setWeight(123)
.setExtras(pb)
.build();
- mManager.addDynamicShortcut(sorig);
+ mManager.addDynamicShortcuts(list(sorig));
Thread.sleep(2);
final long now = System.currentTimeMillis();
@@ -5207,6 +5293,7 @@
assertEquals(null, si.getIcon());
assertEquals("title", si.getTitle());
assertEquals("text", si.getText());
+ assertEquals(list(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
assertEquals("action", si.getIntent().getAction());
assertEquals("val", si.getIntent().getStringExtra("key"));
assertEquals(123, si.getWeight());
@@ -5232,12 +5319,13 @@
.setIcon(bmp32x32)
.setTitle("title")
.setText("text")
+ .setCategories(list(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
.setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
.setWeight(123)
.setExtras(pb)
.build();
- mManager.addDynamicShortcut(sorig);
+ mManager.addDynamicShortcuts(list(sorig));
// Dynamic shortcuts won't be backed up, so we need to pin it.
setCaller(LAUNCHER_1, USER_0);
@@ -5246,6 +5334,8 @@
// Do backup & restore.
backupAndRestore();
+ mService.handleUnlockUser(USER_0); // Load user-0.
+
ShortcutInfo si;
si = mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "id", USER_0);
@@ -5255,6 +5345,7 @@
assertEquals(null, si.getIcon());
assertEquals("title", si.getTitle());
assertEquals("text", si.getText());
+ assertEquals(list(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
assertEquals("action", si.getIntent().getAction());
assertEquals("val", si.getIntent().getStringExtra("key"));
assertEquals(123, si.getWeight());
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index adc7c21..c18c13c 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -426,6 +426,13 @@
public static final String KEY_CARRIER_METERED_APN_TYPES_STRINGS =
"carrier_metered_apn_types_strings";
+ /**
+ * CDMA carrier ERI (Enhanced Roaming Indicator) file name
+ * @hide
+ */
+ public static final String KEY_CARRIER_ERI_FILE_NAME_STRING =
+ "carrier_eri_file_name_string";
+
/* The following 3 fields are related to carrier visual voicemail. */
/**
@@ -705,6 +712,7 @@
"max_retries=3, 5000, 5000, 5000");
sDefaults.putLong(KEY_CARRIER_DATA_CALL_APN_DELAY_DEFAULT_LONG, 20000);
sDefaults.putLong(KEY_CARRIER_DATA_CALL_APN_DELAY_FASTER_LONG, 3000);
+ sDefaults.putString(KEY_CARRIER_ERI_FILE_NAME_STRING, "eri.xml");
sDefaults.putInt(KEY_DURATION_BLOCKING_DISABLED_AFTER_EMERGENCY_INT, 7200);
sDefaults.putStringArray(KEY_CARRIER_METERED_APN_TYPES_STRINGS,
new String[]{"default", "mms", "dun", "supl"});