Merge "Move from GROUP_ID to LIBRARY_GROUP annotations" into nyc-support-25.1-dev
diff --git a/compat/api23/android/support/v4/hardware/fingerprint/FingerprintManagerCompatApi23.java b/compat/api23/android/support/v4/hardware/fingerprint/FingerprintManagerCompatApi23.java
index 7143850..aa6b9ae 100644
--- a/compat/api23/android/support/v4/hardware/fingerprint/FingerprintManagerCompatApi23.java
+++ b/compat/api23/android/support/v4/hardware/fingerprint/FingerprintManagerCompatApi23.java
@@ -16,6 +16,8 @@
package android.support.v4.hardware.fingerprint;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.content.Context;
import android.hardware.fingerprint.FingerprintManager;
@@ -28,15 +30,13 @@
import javax.crypto.Cipher;
import javax.crypto.Mac;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Actual FingerprintManagerCompat implementation for API level 23 and later.
* @hide
*/
@RequiresApi(23)
@TargetApi(23)
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public final class FingerprintManagerCompatApi23 {
private static FingerprintManager getFingerprintManager(Context ctx) {
diff --git a/compat/api24/android/support/v4/net/TrafficStatsCompatApi24.java b/compat/api24/android/support/v4/net/TrafficStatsCompatApi24.java
index b2ebec4..834c6ad 100644
--- a/compat/api24/android/support/v4/net/TrafficStatsCompatApi24.java
+++ b/compat/api24/android/support/v4/net/TrafficStatsCompatApi24.java
@@ -16,6 +16,8 @@
package android.support.v4.net;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.net.TrafficStats;
import android.support.annotation.RequiresApi;
@@ -24,12 +26,10 @@
import java.net.DatagramSocket;
import java.net.SocketException;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/** @hide */
@RequiresApi(24)
@TargetApi(24)
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class TrafficStatsCompatApi24 {
public static void tagDatagramSocket(DatagramSocket socket) throws SocketException {
TrafficStats.tagDatagramSocket(socket);
diff --git a/compat/api24/android/support/v4/os/UserManagerCompatApi24.java b/compat/api24/android/support/v4/os/UserManagerCompatApi24.java
index 0d96ae0..ab6f91d 100644
--- a/compat/api24/android/support/v4/os/UserManagerCompatApi24.java
+++ b/compat/api24/android/support/v4/os/UserManagerCompatApi24.java
@@ -16,18 +16,18 @@
package android.support.v4.os;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.content.Context;
import android.os.UserManager;
import android.support.annotation.RequiresApi;
import android.support.annotation.RestrictTo;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/** @hide */
@RequiresApi(24)
@TargetApi(24)
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class UserManagerCompatApi24 {
public static boolean isUserUnlocked(Context context) {
return context.getSystemService(UserManager.class).isUserUnlocked();
diff --git a/compat/gingerbread/android/support/v4/animation/AnimatorListenerCompat.java b/compat/gingerbread/android/support/v4/animation/AnimatorListenerCompat.java
index d59ca7d..a2c043f 100644
--- a/compat/gingerbread/android/support/v4/animation/AnimatorListenerCompat.java
+++ b/compat/gingerbread/android/support/v4/animation/AnimatorListenerCompat.java
@@ -16,9 +16,9 @@
package android.support.v4.animation;
-import android.support.annotation.RestrictTo;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import android.support.annotation.RestrictTo;
/**
* <p>An animation listener that receives notifications from an animation.
@@ -27,7 +27,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface AnimatorListenerCompat {
/**
diff --git a/compat/gingerbread/android/support/v4/animation/AnimatorUpdateListenerCompat.java b/compat/gingerbread/android/support/v4/animation/AnimatorUpdateListenerCompat.java
index ccfbbe2..2cf3fbd 100644
--- a/compat/gingerbread/android/support/v4/animation/AnimatorUpdateListenerCompat.java
+++ b/compat/gingerbread/android/support/v4/animation/AnimatorUpdateListenerCompat.java
@@ -16,9 +16,9 @@
package android.support.v4.animation;
-import android.support.annotation.RestrictTo;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import android.support.annotation.RestrictTo;
/**
* Implementors of this interface can add themselves as update listeners
@@ -28,7 +28,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface AnimatorUpdateListenerCompat {
/**
diff --git a/compat/gingerbread/android/support/v4/animation/ValueAnimatorCompat.java b/compat/gingerbread/android/support/v4/animation/ValueAnimatorCompat.java
index eceeeb7..b064030 100644
--- a/compat/gingerbread/android/support/v4/animation/ValueAnimatorCompat.java
+++ b/compat/gingerbread/android/support/v4/animation/ValueAnimatorCompat.java
@@ -16,17 +16,17 @@
package android.support.v4.animation;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.RestrictTo;
import android.view.View;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Compatibility implementation for {@code android.animation.ValueAnimator}.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface ValueAnimatorCompat {
public void setTarget(View view);
diff --git a/compat/gingerbread/android/support/v4/app/NotificationCompatBase.java b/compat/gingerbread/android/support/v4/app/NotificationCompatBase.java
index 5f1d8fb..33447cc 100644
--- a/compat/gingerbread/android/support/v4/app/NotificationCompatBase.java
+++ b/compat/gingerbread/android/support/v4/app/NotificationCompatBase.java
@@ -16,7 +16,7 @@
package android.support.v4.app;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.annotation.TargetApi;
import android.app.Notification;
@@ -32,7 +32,7 @@
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
@RequiresApi(9)
@TargetApi(9)
public class NotificationCompatBase {
diff --git a/compat/gingerbread/android/support/v4/graphics/drawable/DrawableWrapper.java b/compat/gingerbread/android/support/v4/graphics/drawable/DrawableWrapper.java
index 94307dd..1574b36 100644
--- a/compat/gingerbread/android/support/v4/graphics/drawable/DrawableWrapper.java
+++ b/compat/gingerbread/android/support/v4/graphics/drawable/DrawableWrapper.java
@@ -16,18 +16,18 @@
package android.support.v4.graphics.drawable;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.graphics.drawable.Drawable;
import android.support.annotation.RestrictTo;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Interface which allows a {@link android.graphics.drawable.Drawable} to get/set wrapped
* drawables from {@code DrawableCompat}.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface DrawableWrapper {
Drawable getWrappedDrawable();
void setWrappedDrawable(Drawable drawable);
diff --git a/compat/gingerbread/android/support/v4/graphics/drawable/TintAwareDrawable.java b/compat/gingerbread/android/support/v4/graphics/drawable/TintAwareDrawable.java
index d51fe8a..81bed7b 100644
--- a/compat/gingerbread/android/support/v4/graphics/drawable/TintAwareDrawable.java
+++ b/compat/gingerbread/android/support/v4/graphics/drawable/TintAwareDrawable.java
@@ -16,21 +16,20 @@
package android.support.v4.graphics.drawable;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
-import android.graphics.drawable.Drawable;
import android.support.annotation.ColorInt;
import android.support.annotation.RestrictTo;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Interface which allows a {@link android.graphics.drawable.Drawable} to receive tinting calls
* from {@code DrawableCompat}.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface TintAwareDrawable {
void setTint(@ColorInt int tint);
void setTintList(ColorStateList tint);
diff --git a/compat/honeycomb/android/support/v4/app/NotificationBuilderWithBuilderAccessor.java b/compat/honeycomb/android/support/v4/app/NotificationBuilderWithBuilderAccessor.java
index 2d364e1..c75e6a2 100644
--- a/compat/honeycomb/android/support/v4/app/NotificationBuilderWithBuilderAccessor.java
+++ b/compat/honeycomb/android/support/v4/app/NotificationBuilderWithBuilderAccessor.java
@@ -16,13 +16,13 @@
package android.support.v4.app;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.app.Notification;
import android.support.annotation.RequiresApi;
import android.support.annotation.RestrictTo;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Interface implemented by notification compat builders that support
* an accessor for {@link Notification.Builder}. {@link Notification.Builder}
@@ -32,7 +32,7 @@
*/
@RequiresApi(11)
@TargetApi(11)
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface NotificationBuilderWithBuilderAccessor {
public Notification.Builder getBuilder();
public Notification build();
diff --git a/compat/java/android/support/v4/animation/AnimatorCompatHelper.java b/compat/java/android/support/v4/animation/AnimatorCompatHelper.java
index 201268a..46b5b15 100644
--- a/compat/java/android/support/v4/animation/AnimatorCompatHelper.java
+++ b/compat/java/android/support/v4/animation/AnimatorCompatHelper.java
@@ -16,16 +16,16 @@
package android.support.v4.animation;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.os.Build;
import android.support.annotation.RestrictTo;
import android.view.View;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public final class AnimatorCompatHelper {
private final static AnimatorProvider IMPL;
diff --git a/compat/java/android/support/v4/app/NotificationCompat.java b/compat/java/android/support/v4/app/NotificationCompat.java
index 41f4832..49bbf9a 100644
--- a/compat/java/android/support/v4/app/NotificationCompat.java
+++ b/compat/java/android/support/v4/app/NotificationCompat.java
@@ -16,6 +16,8 @@
package android.support.v4.app;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.app.Activity;
import android.app.Notification;
import android.app.PendingIntent;
@@ -40,8 +42,6 @@
import java.util.Collections;
import java.util.List;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Helper for accessing features in {@link android.app.Notification}
* introduced after API level 4 in a backwards compatible fashion.
@@ -515,7 +515,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected static class BuilderExtender {
public Notification build(Builder b, NotificationBuilderWithBuilderAccessor builder) {
Notification n = builder.build();
@@ -990,40 +990,40 @@
// extender.
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public Context mContext;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public CharSequence mContentTitle;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public CharSequence mContentText;
PendingIntent mContentIntent;
PendingIntent mFullScreenIntent;
RemoteViews mTickerView;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public Bitmap mLargeIcon;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public CharSequence mContentInfo;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public int mNumber;
int mPriority;
boolean mShowWhen = true;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean mUseChronometer;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public Style mStyle;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public CharSequence mSubText;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public CharSequence[] mRemoteInputHistory;
int mProgressMax;
int mProgress;
@@ -1032,7 +1032,7 @@
boolean mGroupSummary;
String mSortKey;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public ArrayList<Action> mActions = new ArrayList<Action>();
boolean mLocalOnly = false;
String mCategory;
@@ -1045,7 +1045,7 @@
RemoteViews mHeadsUpContentView;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public Notification mNotification = new Notification();
public ArrayList<String> mPeople;
@@ -1748,7 +1748,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected BuilderExtender getExtender() {
return new BuilderExtender();
}
@@ -1764,7 +1764,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public RemoteViews getContentView() {
return mContentView;
}
@@ -1772,7 +1772,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public RemoteViews getBigContentView() {
return mBigContentView;
}
@@ -1780,7 +1780,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public RemoteViews getHeadsUpContentView() {
return mHeadsUpContentView;
}
@@ -1790,7 +1790,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public long getWhenIfShowing() {
return mShowWhen ? mNotification.when : 0;
}
@@ -1800,7 +1800,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public int getPriority() {
return mPriority;
}
@@ -1810,7 +1810,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public int getColor() {
return mColor;
}
@@ -1821,7 +1821,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected CharSequence resolveText() {
return mContentText;
}
@@ -1831,7 +1831,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected CharSequence resolveTitle() {
return mContentTitle;
}
@@ -1870,7 +1870,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
// TODO: implement for all styles
public void addCompatExtras(Bundle extras) {
}
@@ -1878,7 +1878,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
// TODO: implement for all styles
protected void restoreFromCompatExtras(Bundle extras) {
}
@@ -2169,7 +2169,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
protected void restoreFromCompatExtras(Bundle extras) {
mMessages.clear();
@@ -2862,7 +2862,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static final Factory FACTORY = new Factory() {
@Override
public NotificationCompatBase.Action build(int icon, CharSequence title,
diff --git a/compat/java/android/support/v4/app/RemoteInput.java b/compat/java/android/support/v4/app/RemoteInput.java
index 9208cf6..1f69520 100644
--- a/compat/java/android/support/v4/app/RemoteInput.java
+++ b/compat/java/android/support/v4/app/RemoteInput.java
@@ -16,14 +16,14 @@
package android.support.v4.app;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.RestrictTo;
import android.util.Log;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Helper for using the {@link android.app.RemoteInput} API
* introduced after API level 4 in a backwards compatible fashion.
@@ -268,7 +268,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static final Factory FACTORY = new Factory() {
@Override
public RemoteInput build(String resultKey,
diff --git a/compat/java/android/support/v4/app/ServiceCompat.java b/compat/java/android/support/v4/app/ServiceCompat.java
index 37b7ab9..3fc6ae8 100644
--- a/compat/java/android/support/v4/app/ServiceCompat.java
+++ b/compat/java/android/support/v4/app/ServiceCompat.java
@@ -16,6 +16,8 @@
package android.support.v4.app;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.app.Notification;
import android.app.Service;
import android.support.annotation.IntDef;
@@ -25,8 +27,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Helper for accessing features in {@link android.app.Service}
* introduced after API level 9 in a backwards compatible fashion.
@@ -77,7 +77,7 @@
public static final int STOP_FOREGROUND_DETACH = 1<<1;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef(flag = true,
value = {
STOP_FOREGROUND_REMOVE,
diff --git a/compat/java/android/support/v4/app/SupportActivity.java b/compat/java/android/support/v4/app/SupportActivity.java
index ec753f0..2072506 100644
--- a/compat/java/android/support/v4/app/SupportActivity.java
+++ b/compat/java/android/support/v4/app/SupportActivity.java
@@ -16,7 +16,7 @@
package android.support.v4.app;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.app.Activity;
import android.support.annotation.RestrictTo;
@@ -27,7 +27,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class SupportActivity extends Activity {
/**
* Storage for {@link ExtraData} instances.
@@ -46,7 +46,7 @@
* @see #getExtraData
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void putExtraData(ExtraData extraData) {
mExtraDataMap.put(extraData.getClass(), extraData);
}
@@ -57,7 +57,7 @@
* @see #putExtraData
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public <T extends ExtraData> T getExtraData(Class<T> extraDataClass) {
return (T) mExtraDataMap.get(extraDataClass);
}
@@ -65,7 +65,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static class ExtraData {
}
}
diff --git a/compat/java/android/support/v4/content/ModernAsyncTask.java b/compat/java/android/support/v4/content/ModernAsyncTask.java
index 7e95da6..306d334 100644
--- a/compat/java/android/support/v4/content/ModernAsyncTask.java
+++ b/compat/java/android/support/v4/content/ModernAsyncTask.java
@@ -16,7 +16,7 @@
package android.support.v4.content;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.os.Binder;
import android.os.Handler;
@@ -118,7 +118,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static void setDefaultExecutor(Executor exec) {
sDefaultExecutor = exec;
}
diff --git a/compat/java/android/support/v4/content/SharedPreferencesCompat.java b/compat/java/android/support/v4/content/SharedPreferencesCompat.java
index 25c65b0..7d51fed 100644
--- a/compat/java/android/support/v4/content/SharedPreferencesCompat.java
+++ b/compat/java/android/support/v4/content/SharedPreferencesCompat.java
@@ -17,7 +17,6 @@
package android.support.v4.content;
import android.content.SharedPreferences;
-import android.os.Build;
import android.support.annotation.NonNull;
public final class SharedPreferencesCompat {
diff --git a/compat/java/android/support/v4/internal/package-info.java b/compat/java/android/support/v4/internal/package-info.java
index 4efb10a..d2d2d2f 100644
--- a/compat/java/android/support/v4/internal/package-info.java
+++ b/compat/java/android/support/v4/internal/package-info.java
@@ -1,9 +1,9 @@
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
package android.support.v4.internal;
-import android.support.annotation.RestrictTo;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
\ No newline at end of file
+import android.support.annotation.RestrictTo;
\ No newline at end of file
diff --git a/compat/java/android/support/v4/internal/view/SupportMenu.java b/compat/java/android/support/v4/internal/view/SupportMenu.java
index 6a3b126..55b8a95 100644
--- a/compat/java/android/support/v4/internal/view/SupportMenu.java
+++ b/compat/java/android/support/v4/internal/view/SupportMenu.java
@@ -16,9 +16,9 @@
package android.support.v4.internal.view;
-import android.support.annotation.RestrictTo;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import android.support.annotation.RestrictTo;
/**
* Interface for managing the items in a menu.
@@ -29,7 +29,7 @@
* @see android.view.Menu
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface SupportMenu extends android.view.Menu {
/**
diff --git a/compat/java/android/support/v4/internal/view/SupportMenuItem.java b/compat/java/android/support/v4/internal/view/SupportMenuItem.java
index 3e3ac1a..a72ae21 100644
--- a/compat/java/android/support/v4/internal/view/SupportMenuItem.java
+++ b/compat/java/android/support/v4/internal/view/SupportMenuItem.java
@@ -16,14 +16,14 @@
package android.support.v4.internal.view;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.RestrictTo;
import android.support.v4.view.ActionProvider;
import android.support.v4.view.MenuItemCompat;
import android.view.MenuItem;
import android.view.View;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Interface for direct access to a previously created menu item.
*
@@ -33,7 +33,7 @@
* @see android.view.MenuItem
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface SupportMenuItem extends android.view.MenuItem {
/*
* These should be kept in sync with attrs.xml enum constants for showAsAction
diff --git a/compat/java/android/support/v4/internal/view/SupportSubMenu.java b/compat/java/android/support/v4/internal/view/SupportSubMenu.java
index 3a26e70..08b3a33 100644
--- a/compat/java/android/support/v4/internal/view/SupportSubMenu.java
+++ b/compat/java/android/support/v4/internal/view/SupportSubMenu.java
@@ -16,9 +16,9 @@
package android.support.v4.internal.view;
-import android.support.annotation.RestrictTo;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import android.support.annotation.RestrictTo;
/**
* Subclass of {@link SupportMenu} for sub menus.
@@ -29,6 +29,6 @@
* @see android.view.SubMenu
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface SupportSubMenu extends SupportMenu, android.view.SubMenu {
}
diff --git a/compat/java/android/support/v4/net/ConnectivityManagerCompat.java b/compat/java/android/support/v4/net/ConnectivityManagerCompat.java
index 3a85f2e..f9ff971 100644
--- a/compat/java/android/support/v4/net/ConnectivityManagerCompat.java
+++ b/compat/java/android/support/v4/net/ConnectivityManagerCompat.java
@@ -16,6 +16,15 @@
package android.support.v4.net;
+import static android.net.ConnectivityManager.TYPE_MOBILE;
+import static android.net.ConnectivityManager.TYPE_MOBILE_DUN;
+import static android.net.ConnectivityManager.TYPE_MOBILE_HIPRI;
+import static android.net.ConnectivityManager.TYPE_MOBILE_MMS;
+import static android.net.ConnectivityManager.TYPE_MOBILE_SUPL;
+import static android.net.ConnectivityManager.TYPE_WIFI;
+import static android.net.ConnectivityManager.TYPE_WIMAX;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
@@ -26,15 +35,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import static android.net.ConnectivityManager.TYPE_MOBILE;
-import static android.net.ConnectivityManager.TYPE_MOBILE_DUN;
-import static android.net.ConnectivityManager.TYPE_MOBILE_HIPRI;
-import static android.net.ConnectivityManager.TYPE_MOBILE_MMS;
-import static android.net.ConnectivityManager.TYPE_MOBILE_SUPL;
-import static android.net.ConnectivityManager.TYPE_WIFI;
-import static android.net.ConnectivityManager.TYPE_WIMAX;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Helper for accessing features in {@link ConnectivityManager} introduced after
* API level 16 in a backwards compatible fashion.
@@ -49,7 +49,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Retention(RetentionPolicy.SOURCE)
@IntDef(flag = false, value = {
RESTRICT_BACKGROUND_STATUS_DISABLED,
diff --git a/compat/java/android/support/v4/os/ResultReceiver.java b/compat/java/android/support/v4/os/ResultReceiver.java
index 7a34e8a..7c0230a 100644
--- a/compat/java/android/support/v4/os/ResultReceiver.java
+++ b/compat/java/android/support/v4/os/ResultReceiver.java
@@ -16,15 +16,14 @@
package android.support.v4.os;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.os.Bundle;
import android.os.Handler;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import android.support.annotation.RestrictTo;
-import android.support.v4.os.IResultReceiver;
-
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
/**
* Generic interface for receiving a callback result from someone. Use this
@@ -40,28 +39,28 @@
* break if your process goes away for any reason, etc.</p>
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ResultReceiver implements Parcelable {
final boolean mLocal;
final Handler mHandler;
-
+
IResultReceiver mReceiver;
-
+
class MyRunnable implements Runnable {
final int mResultCode;
final Bundle mResultData;
-
+
MyRunnable(int resultCode, Bundle resultData) {
mResultCode = resultCode;
mResultData = resultData;
}
-
+
@Override
public void run() {
onReceiveResult(mResultCode, mResultData);
}
}
-
+
class MyResultReceiver extends IResultReceiver.Stub {
@Override
public void send(int resultCode, Bundle resultData) {
@@ -72,7 +71,7 @@
}
}
}
-
+
/**
* Create a new ResultReceive to receive results. Your
* {@link #onReceiveResult} method will be called from the thread running
@@ -82,7 +81,7 @@
mLocal = true;
mHandler = handler;
}
-
+
/**
* Deliver a result to this receiver. Will call {@link #onReceiveResult},
* always asynchronously if the receiver has supplied a Handler in which
@@ -99,7 +98,7 @@
}
return;
}
-
+
if (mReceiver != null) {
try {
mReceiver.send(resultCode, resultData);
@@ -107,17 +106,17 @@
}
}
}
-
+
/**
* Override to receive results delivered to this object.
- *
+ *
* @param resultCode Arbitrary result code delivered by the sender, as
* defined by the sender.
* @param resultData Any additional data provided by the sender.
*/
protected void onReceiveResult(int resultCode, Bundle resultData) {
}
-
+
@Override
public int describeContents() {
return 0;
@@ -138,7 +137,7 @@
mHandler = null;
mReceiver = IResultReceiver.Stub.asInterface(in.readStrongBinder());
}
-
+
public static final Creator<ResultReceiver> CREATOR
= new Creator<ResultReceiver>() {
@Override
diff --git a/compat/java/android/support/v4/util/DebugUtils.java b/compat/java/android/support/v4/util/DebugUtils.java
index 4f1e95a..8937b7e 100644
--- a/compat/java/android/support/v4/util/DebugUtils.java
+++ b/compat/java/android/support/v4/util/DebugUtils.java
@@ -16,9 +16,9 @@
package android.support.v4.util;
-import android.support.annotation.RestrictTo;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import android.support.annotation.RestrictTo;
/**
* Helper for accessing features in {@link android.util.DebugUtils}
@@ -26,7 +26,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class DebugUtils {
public static void buildShortClassTag(Object cls, StringBuilder out) {
diff --git a/compat/java/android/support/v4/util/LogWriter.java b/compat/java/android/support/v4/util/LogWriter.java
index a250ce4..2889f4d 100644
--- a/compat/java/android/support/v4/util/LogWriter.java
+++ b/compat/java/android/support/v4/util/LogWriter.java
@@ -16,20 +16,20 @@
package android.support.v4.util;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.RestrictTo;
import android.util.Log;
import java.io.Writer;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Helper for accessing features in {@link android.util.LogWriter}
* introduced after API level 4 in a backwards compatible fashion.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class LogWriter extends Writer {
private final String mTag;
private StringBuilder mBuilder = new StringBuilder(128);
diff --git a/compat/java/android/support/v4/util/PatternsCompat.java b/compat/java/android/support/v4/util/PatternsCompat.java
index f09f199..2985481 100644
--- a/compat/java/android/support/v4/util/PatternsCompat.java
+++ b/compat/java/android/support/v4/util/PatternsCompat.java
@@ -16,13 +16,12 @@
package android.support.v4.util;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.RestrictTo;
-import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Commonly used regular expression patterns.
*/
@@ -300,7 +299,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static final Pattern AUTOLINK_WEB_URL = Pattern.compile(
"(" + WEB_URL_WITH_PROTOCOL + "|" + WEB_URL_WITHOUT_PROTOCOL + ")");
@@ -329,7 +328,7 @@
* and the special characters #&~!^`{}/=$*?| that are included in RFC5321.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static final Pattern AUTOLINK_EMAIL_ADDRESS = Pattern.compile("(" + WORD_BOUNDARY +
"(?:" + EMAIL_ADDRESS_LOCAL_PART + "@" + EMAIL_ADDRESS_DOMAIN + ")" +
WORD_BOUNDARY + ")"
diff --git a/compat/java/android/support/v4/util/TimeUtils.java b/compat/java/android/support/v4/util/TimeUtils.java
index 3de970f..de75846 100644
--- a/compat/java/android/support/v4/util/TimeUtils.java
+++ b/compat/java/android/support/v4/util/TimeUtils.java
@@ -16,30 +16,30 @@
package android.support.v4.util;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.RestrictTo;
import java.io.PrintWriter;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Helper for accessing features in {@link android.util.TimeUtils}
* introduced after API level 4 in a backwards compatible fashion.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public final class TimeUtils {
/** @hide Field length that can hold 999 days of time */
public static final int HUNDRED_DAY_FIELD_LEN = 19;
-
+
private static final int SECONDS_PER_MINUTE = 60;
private static final int SECONDS_PER_HOUR = 60 * 60;
private static final int SECONDS_PER_DAY = 24 * 60 * 60;
private static final Object sFormatSync = new Object();
private static char[] sFormatStr = new char[HUNDRED_DAY_FIELD_LEN+5];
-
+
static private int accumField(int amt, int suffix, boolean always, int zeropad) {
if (amt > 99 || (always && zeropad >= 3)) {
return 3+suffix;
@@ -52,7 +52,7 @@
}
return 0;
}
-
+
static private int printField(char[] formatStr, int amt, char suffix, int pos,
boolean always, int zeropad) {
if (always || amt > 0) {
@@ -76,14 +76,14 @@
}
return pos;
}
-
+
private static int formatDurationLocked(long duration, int fieldLen) {
if (sFormatStr.length < fieldLen) {
sFormatStr = new char[fieldLen];
}
-
+
char[] formatStr = sFormatStr;
-
+
if (duration == 0) {
int pos = 0;
fieldLen -= 1;
@@ -93,7 +93,7 @@
formatStr[pos] = '0';
return pos+1;
}
-
+
char prefix;
if (duration > 0) {
prefix = '+';
@@ -120,7 +120,7 @@
}
int pos = 0;
-
+
if (fieldLen != 0) {
int myLen = accumField(days, 1, false, 0);
myLen += accumField(hours, 1, myLen > 0, 2);
@@ -133,10 +133,10 @@
myLen++;
}
}
-
+
formatStr[pos] = prefix;
pos++;
-
+
int start = pos;
boolean zeropad = fieldLen != 0;
pos = printField(formatStr, days, 'd', pos, false, 0);
@@ -147,7 +147,7 @@
formatStr[pos] = 's';
return pos + 1;
}
-
+
/** @hide Just for debugging; not internationalized. */
public static void formatDuration(long duration, StringBuilder builder) {
synchronized (sFormatSync) {
@@ -168,7 +168,7 @@
public static void formatDuration(long duration, PrintWriter pw) {
formatDuration(duration, pw, 0);
}
-
+
/** @hide Just for debugging; not internationalized. */
public static void formatDuration(long time, long now, PrintWriter pw) {
if (time == 0) {
diff --git a/compat/java/android/support/v4/view/ActionProvider.java b/compat/java/android/support/v4/view/ActionProvider.java
index fcde05e..e6ffd98 100644
--- a/compat/java/android/support/v4/view/ActionProvider.java
+++ b/compat/java/android/support/v4/view/ActionProvider.java
@@ -16,6 +16,8 @@
package android.support.v4.view;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.util.Log;
@@ -23,8 +25,6 @@
import android.view.SubMenu;
import android.view.View;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* This class is a mediator for accomplishing a given task, for example sharing a file. It is
* responsible for creating a view that performs an action that accomplishes the task. This class
@@ -273,7 +273,7 @@
*
* @hide Pending future API approval
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void subUiVisibilityChanged(boolean isVisible) {
if (mSubUiVisibilityListener != null) {
mSubUiVisibilityListener.onSubUiVisibilityChanged(isVisible);
@@ -283,7 +283,7 @@
/**
* @hide Internal use only
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setSubUiVisibilityListener(SubUiVisibilityListener listener) {
mSubUiVisibilityListener = listener;
}
@@ -306,7 +306,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void reset() {
mVisibilityListener = null;
mSubUiVisibilityListener = null;
@@ -315,7 +315,7 @@
/**
* @hide Internal use only
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public interface SubUiVisibilityListener {
public void onSubUiVisibilityChanged(boolean isVisible);
diff --git a/compat/java/android/support/v4/view/PointerIconCompat.java b/compat/java/android/support/v4/view/PointerIconCompat.java
index 809c891..cea4dfb 100644
--- a/compat/java/android/support/v4/view/PointerIconCompat.java
+++ b/compat/java/android/support/v4/view/PointerIconCompat.java
@@ -16,14 +16,14 @@
package android.support.v4.view;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.support.annotation.RestrictTo;
import android.support.v4.os.BuildCompat;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Helper for accessing features in {@link android.view.PointerIcon} introduced after API
* level 4 in a backwards compatible fashion.
@@ -108,7 +108,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public Object getPointerIcon() {
return mPointerIcon;
}
diff --git a/compat/java/android/support/v4/view/ViewCompat.java b/compat/java/android/support/v4/view/ViewCompat.java
index af621f5..434b850 100644
--- a/compat/java/android/support/v4/view/ViewCompat.java
+++ b/compat/java/android/support/v4/view/ViewCompat.java
@@ -16,6 +16,8 @@
package android.support.v4.view;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.res.ColorStateList;
import android.graphics.Matrix;
import android.graphics.Paint;
@@ -49,8 +51,6 @@
import java.lang.reflect.Method;
import java.util.WeakHashMap;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Helper for accessing features in {@link View} introduced after API
* level 4 in a backwards compatible fashion.
@@ -59,20 +59,20 @@
private static final String TAG = "ViewCompat";
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({View.FOCUS_LEFT, View.FOCUS_UP, View.FOCUS_RIGHT, View.FOCUS_DOWN,
View.FOCUS_FORWARD, View.FOCUS_BACKWARD})
@Retention(RetentionPolicy.SOURCE)
public @interface FocusDirection {}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({View.FOCUS_LEFT, View.FOCUS_UP, View.FOCUS_RIGHT, View.FOCUS_DOWN})
@Retention(RetentionPolicy.SOURCE)
public @interface FocusRealDirection {}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({View.FOCUS_FORWARD, View.FOCUS_BACKWARD})
@Retention(RetentionPolicy.SOURCE)
public @interface FocusRelativeDirection {}
diff --git a/core-ui/java/android/support/v4/widget/CursorAdapter.java b/core-ui/java/android/support/v4/widget/CursorAdapter.java
index 249f21c..e68229e 100644
--- a/core-ui/java/android/support/v4/widget/CursorAdapter.java
+++ b/core-ui/java/android/support/v4/widget/CursorAdapter.java
@@ -16,6 +16,8 @@
package android.support.v4.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.database.ContentObserver;
import android.database.Cursor;
@@ -30,8 +32,6 @@
import android.widget.FilterQueryProvider;
import android.widget.Filterable;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Static library support version of the framework's {@link android.widget.CursorAdapter}.
* Used to write apps that run on platforms prior to Android 3.0. When running
@@ -45,55 +45,55 @@
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected boolean mDataValid;
/**
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected boolean mAutoRequery;
/**
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected Cursor mCursor;
/**
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected Context mContext;
/**
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected int mRowIDColumn;
/**
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected ChangeObserver mChangeObserver;
/**
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected DataSetObserver mDataSetObserver;
/**
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected CursorFilter mCursorFilter;
/**
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected FilterQueryProvider mFilterQueryProvider;
/**
diff --git a/core-ui/java/android/support/v4/widget/NestedScrollView.java b/core-ui/java/android/support/v4/widget/NestedScrollView.java
index 53e971f..44cc043 100644
--- a/core-ui/java/android/support/v4/widget/NestedScrollView.java
+++ b/core-ui/java/android/support/v4/widget/NestedScrollView.java
@@ -17,6 +17,8 @@
package android.support.v4.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -56,8 +58,6 @@
import java.util.List;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* NestedScrollView is just like {@link android.widget.ScrollView}, but it supports acting
* as both a nested scrolling parent and child on both new and old versions of Android.
@@ -1334,7 +1334,7 @@
* children.</p>
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public int computeVerticalScrollRange() {
final int count = getChildCount();
@@ -1356,35 +1356,35 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public int computeVerticalScrollOffset() {
return Math.max(0, super.computeVerticalScrollOffset());
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public int computeVerticalScrollExtent() {
return super.computeVerticalScrollExtent();
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public int computeHorizontalScrollRange() {
return super.computeHorizontalScrollRange();
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public int computeHorizontalScrollOffset() {
return super.computeHorizontalScrollOffset();
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public int computeHorizontalScrollExtent() {
return super.computeHorizontalScrollExtent();
diff --git a/core-ui/java/android/support/v4/widget/SimpleCursorAdapter.java b/core-ui/java/android/support/v4/widget/SimpleCursorAdapter.java
index 7050734..291f9e1 100644
--- a/core-ui/java/android/support/v4/widget/SimpleCursorAdapter.java
+++ b/core-ui/java/android/support/v4/widget/SimpleCursorAdapter.java
@@ -16,6 +16,8 @@
package android.support.v4.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
@@ -24,8 +26,6 @@
import android.widget.ImageView;
import android.widget.TextView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Static library support version of the framework's {@link android.widget.SimpleCursorAdapter}.
* Used to write apps that run on platforms prior to Android 3.0. When running
@@ -39,14 +39,14 @@
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected int[] mFrom;
/**
* A list of View ids representing the views to which the data must be bound.
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected int[] mTo;
private int mStringConversionColumn = -1;
diff --git a/core-utils/java/android/support/v4/content/AsyncTaskLoader.java b/core-utils/java/android/support/v4/content/AsyncTaskLoader.java
index da24c7f..c31a8cd 100644
--- a/core-utils/java/android/support/v4/content/AsyncTaskLoader.java
+++ b/core-utils/java/android/support/v4/content/AsyncTaskLoader.java
@@ -16,6 +16,8 @@
package android.support.v4.content;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.os.Handler;
import android.os.SystemClock;
@@ -29,8 +31,6 @@
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Static library support version of the framework's {@link android.content.AsyncTaskLoader}.
* Used to write apps that run on platforms prior to Android 3.0. When running
@@ -334,7 +334,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void waitForLoader() {
LoadTask task = mTask;
if (task != null) {
diff --git a/core-utils/java/android/support/v4/content/res/TypedArrayUtils.java b/core-utils/java/android/support/v4/content/res/TypedArrayUtils.java
index 894c708..be4ff11 100644
--- a/core-utils/java/android/support/v4/content/res/TypedArrayUtils.java
+++ b/core-utils/java/android/support/v4/content/res/TypedArrayUtils.java
@@ -15,6 +15,8 @@
*/
package android.support.v4.content.res;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
@@ -23,14 +25,12 @@
import android.support.annotation.StyleableRes;
import android.util.TypedValue;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Compat methods for accessing TypedArray values.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class TypedArrayUtils {
public static boolean getBoolean(TypedArray a, @StyleableRes int index,
@StyleableRes int fallbackIndex, boolean defaultValue) {
diff --git a/customtabs/src/android/support/customtabs/CustomTabsClient.java b/customtabs/src/android/support/customtabs/CustomTabsClient.java
index 73f17a2..548c152 100644
--- a/customtabs/src/android/support/customtabs/CustomTabsClient.java
+++ b/customtabs/src/android/support/customtabs/CustomTabsClient.java
@@ -16,6 +16,8 @@
package android.support.customtabs;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -32,8 +34,6 @@
import java.util.ArrayList;
import java.util.List;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Class to communicate with a {@link CustomTabsService} and create
* {@link CustomTabsSession} from it.
@@ -43,7 +43,7 @@
private final ComponentName mServiceComponentName;
/**@hide*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
CustomTabsClient(ICustomTabsService service, ComponentName componentName) {
mService = service;
mServiceComponentName = componentName;
diff --git a/design/src/android/support/design/internal/BottomNavigationItemView.java b/design/src/android/support/design/internal/BottomNavigationItemView.java
index 88784cb..44db0ea 100644
--- a/design/src/android/support/design/internal/BottomNavigationItemView.java
+++ b/design/src/android/support/design/internal/BottomNavigationItemView.java
@@ -16,7 +16,7 @@
package android.support.design.internal;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.content.Context;
import android.content.res.ColorStateList;
@@ -41,7 +41,7 @@
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class BottomNavigationItemView extends FrameLayout implements MenuView.ItemView {
public static final int INVALID_ITEM_POSITION = -1;
diff --git a/design/src/android/support/design/internal/BottomNavigationMenu.java b/design/src/android/support/design/internal/BottomNavigationMenu.java
index 9862175..a86d2ad 100644
--- a/design/src/android/support/design/internal/BottomNavigationMenu.java
+++ b/design/src/android/support/design/internal/BottomNavigationMenu.java
@@ -16,7 +16,7 @@
package android.support.design.internal;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.content.Context;
import android.support.annotation.RestrictTo;
@@ -28,7 +28,7 @@
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public final class BottomNavigationMenu extends MenuBuilder {
public static final int MAX_ITEM_COUNT = 5;
diff --git a/design/src/android/support/design/internal/BottomNavigationMenuView.java b/design/src/android/support/design/internal/BottomNavigationMenuView.java
index ba43b5b..bc73970 100644
--- a/design/src/android/support/design/internal/BottomNavigationMenuView.java
+++ b/design/src/android/support/design/internal/BottomNavigationMenuView.java
@@ -16,7 +16,7 @@
package android.support.design.internal;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.content.Context;
import android.content.res.ColorStateList;
@@ -37,7 +37,7 @@
/**
* @hide For internal use only.
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class BottomNavigationMenuView extends ViewGroup implements MenuView {
private final int mInactiveItemMaxWidth;
private final int mInactiveItemMinWidth;
diff --git a/design/src/android/support/design/internal/BottomNavigationPresenter.java b/design/src/android/support/design/internal/BottomNavigationPresenter.java
index 07e52e3..832e936 100644
--- a/design/src/android/support/design/internal/BottomNavigationPresenter.java
+++ b/design/src/android/support/design/internal/BottomNavigationPresenter.java
@@ -16,6 +16,8 @@
package android.support.design.internal;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.os.Parcelable;
import android.support.annotation.RestrictTo;
@@ -26,12 +28,10 @@
import android.support.v7.view.menu.SubMenuBuilder;
import android.view.ViewGroup;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class BottomNavigationPresenter implements MenuPresenter {
private MenuBuilder mMenu;
private BottomNavigationMenuView mMenuView;
diff --git a/design/src/android/support/design/internal/ForegroundLinearLayout.java b/design/src/android/support/design/internal/ForegroundLinearLayout.java
index 9e690d2..c75603b 100644
--- a/design/src/android/support/design/internal/ForegroundLinearLayout.java
+++ b/design/src/android/support/design/internal/ForegroundLinearLayout.java
@@ -16,6 +16,8 @@
package android.support.design.internal;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
@@ -30,12 +32,10 @@
import android.util.AttributeSet;
import android.view.Gravity;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ForegroundLinearLayout extends LinearLayoutCompat {
private Drawable mForeground;
diff --git a/design/src/android/support/design/internal/NavigationMenu.java b/design/src/android/support/design/internal/NavigationMenu.java
index f0931b0..a0ec5e0 100644
--- a/design/src/android/support/design/internal/NavigationMenu.java
+++ b/design/src/android/support/design/internal/NavigationMenu.java
@@ -16,6 +16,8 @@
package android.support.design.internal;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.support.v7.view.menu.MenuBuilder;
@@ -23,15 +25,13 @@
import android.support.v7.view.menu.SubMenuBuilder;
import android.view.SubMenu;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* This is a {@link MenuBuilder} that returns an instance of {@link NavigationSubMenu} instead of
* {@link SubMenuBuilder} when a sub menu is created.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class NavigationMenu extends MenuBuilder {
public NavigationMenu(Context context) {
diff --git a/design/src/android/support/design/internal/NavigationMenuItemView.java b/design/src/android/support/design/internal/NavigationMenuItemView.java
index 195791d..8bece63 100644
--- a/design/src/android/support/design/internal/NavigationMenuItemView.java
+++ b/design/src/android/support/design/internal/NavigationMenuItemView.java
@@ -16,6 +16,8 @@
package android.support.design.internal;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Color;
@@ -41,12 +43,10 @@
import android.widget.CheckedTextView;
import android.widget.FrameLayout;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class NavigationMenuItemView extends ForegroundLinearLayout implements MenuView.ItemView {
private static final int[] CHECKED_STATE_SET = {android.R.attr.state_checked};
diff --git a/design/src/android/support/design/internal/NavigationMenuPresenter.java b/design/src/android/support/design/internal/NavigationMenuPresenter.java
index 9f9aaca..a17189c 100644
--- a/design/src/android/support/design/internal/NavigationMenuPresenter.java
+++ b/design/src/android/support/design/internal/NavigationMenuPresenter.java
@@ -16,7 +16,7 @@
package android.support.design.internal;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.content.Context;
import android.content.res.ColorStateList;
@@ -52,7 +52,7 @@
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class NavigationMenuPresenter implements MenuPresenter {
private static final String STATE_HIERARCHY = "android:menu:list";
diff --git a/design/src/android/support/design/internal/NavigationMenuView.java b/design/src/android/support/design/internal/NavigationMenuView.java
index 628f7a8..711f71e 100644
--- a/design/src/android/support/design/internal/NavigationMenuView.java
+++ b/design/src/android/support/design/internal/NavigationMenuView.java
@@ -16,6 +16,8 @@
package android.support.design.internal;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.support.v7.view.menu.MenuBuilder;
@@ -24,12 +26,10 @@
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class NavigationMenuView extends RecyclerView implements MenuView {
public NavigationMenuView(Context context) {
diff --git a/design/src/android/support/design/internal/NavigationSubMenu.java b/design/src/android/support/design/internal/NavigationSubMenu.java
index 6c62033..1ff1e4f 100644
--- a/design/src/android/support/design/internal/NavigationSubMenu.java
+++ b/design/src/android/support/design/internal/NavigationSubMenu.java
@@ -16,21 +16,21 @@
package android.support.design.internal;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.support.v7.view.menu.MenuBuilder;
import android.support.v7.view.menu.MenuItemImpl;
import android.support.v7.view.menu.SubMenuBuilder;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* This is a {@link SubMenuBuilder} that it notifies the parent {@link NavigationMenu} of its menu
* updates.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class NavigationSubMenu extends SubMenuBuilder {
public NavigationSubMenu(Context context, NavigationMenu menu, MenuItemImpl item) {
diff --git a/design/src/android/support/design/internal/ParcelableSparseArray.java b/design/src/android/support/design/internal/ParcelableSparseArray.java
index 05870b0..746ba00 100644
--- a/design/src/android/support/design/internal/ParcelableSparseArray.java
+++ b/design/src/android/support/design/internal/ParcelableSparseArray.java
@@ -16,6 +16,8 @@
package android.support.design.internal;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.RestrictTo;
@@ -23,12 +25,10 @@
import android.support.v4.os.ParcelableCompatCreatorCallbacks;
import android.util.SparseArray;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ParcelableSparseArray extends SparseArray<Parcelable> implements Parcelable {
public ParcelableSparseArray() {
diff --git a/design/src/android/support/design/internal/ScrimInsetsFrameLayout.java b/design/src/android/support/design/internal/ScrimInsetsFrameLayout.java
index 17223d1..38f5b29 100644
--- a/design/src/android/support/design/internal/ScrimInsetsFrameLayout.java
+++ b/design/src/android/support/design/internal/ScrimInsetsFrameLayout.java
@@ -16,6 +16,8 @@
package android.support.design.internal;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -30,12 +32,10 @@
import android.view.View;
import android.widget.FrameLayout;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ScrimInsetsFrameLayout extends FrameLayout {
Drawable mInsetForeground;
diff --git a/design/src/android/support/design/internal/SnackbarContentLayout.java b/design/src/android/support/design/internal/SnackbarContentLayout.java
index 43a2763..dca1d6b 100644
--- a/design/src/android/support/design/internal/SnackbarContentLayout.java
+++ b/design/src/android/support/design/internal/SnackbarContentLayout.java
@@ -15,7 +15,7 @@
*/
package android.support.design.internal;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.content.Context;
import android.content.res.TypedArray;
@@ -32,7 +32,7 @@
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class SnackbarContentLayout extends LinearLayout implements
BaseTransientBottomBar.ContentViewCallback {
private TextView mMessageView;
diff --git a/design/src/android/support/design/internal/package-info.java b/design/src/android/support/design/internal/package-info.java
index 92fc776..6b6f7bb 100644
--- a/design/src/android/support/design/internal/package-info.java
+++ b/design/src/android/support/design/internal/package-info.java
@@ -1,9 +1,9 @@
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
package android.support.design.internal;
-import android.support.annotation.RestrictTo;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import android.support.annotation.RestrictTo;
diff --git a/design/src/android/support/design/widget/AppBarLayout.java b/design/src/android/support/design/widget/AppBarLayout.java
index 4a1993d..4c7ef0a 100644
--- a/design/src/android/support/design/widget/AppBarLayout.java
+++ b/design/src/android/support/design/widget/AppBarLayout.java
@@ -16,6 +16,9 @@
package android.support.design.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+import static android.support.design.widget.ViewUtils.objectEquals;
+
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
@@ -47,9 +50,6 @@
import java.util.ArrayList;
import java.util.List;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-import static android.support.design.widget.ViewUtils.objectEquals;
-
/**
* AppBarLayout is a vertical {@link LinearLayout} which implements many of the features of
* material designs app bar concept, namely scrolling gestures.
@@ -590,7 +590,7 @@
public static class LayoutParams extends LinearLayout.LayoutParams {
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef(flag=true, value={
SCROLL_FLAG_SCROLL,
SCROLL_FLAG_EXIT_UNTIL_COLLAPSED,
diff --git a/design/src/android/support/design/widget/BaseTransientBottomBar.java b/design/src/android/support/design/widget/BaseTransientBottomBar.java
index d47e08b..a2e7e26 100644
--- a/design/src/android/support/design/widget/BaseTransientBottomBar.java
+++ b/design/src/android/support/design/widget/BaseTransientBottomBar.java
@@ -16,7 +16,7 @@
package android.support.design.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import static android.support.design.widget.AnimationUtils.FAST_OUT_SLOW_IN_INTERPOLATOR;
import android.content.Context;
@@ -77,7 +77,7 @@
public static final int DISMISS_EVENT_CONSECUTIVE = 4;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({DISMISS_EVENT_SWIPE, DISMISS_EVENT_ACTION, DISMISS_EVENT_TIMEOUT,
DISMISS_EVENT_MANUAL, DISMISS_EVENT_CONSECUTIVE})
@Retention(RetentionPolicy.SOURCE)
@@ -134,7 +134,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({LENGTH_INDEFINITE, LENGTH_SHORT, LENGTH_LONG})
@IntRange(from = 1)
@Retention(RetentionPolicy.SOURCE)
@@ -200,7 +200,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
interface OnLayoutChangeListener {
void onLayoutChange(View view, int left, int top, int right, int bottom);
}
@@ -208,7 +208,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
interface OnAttachStateChangeListener {
void onViewAttachedToWindow(View v);
void onViewDetachedFromWindow(View v);
@@ -651,7 +651,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
static class SnackbarBaseLayout extends FrameLayout {
private BaseTransientBottomBar.OnLayoutChangeListener mOnLayoutChangeListener;
private BaseTransientBottomBar.OnAttachStateChangeListener mOnAttachStateChangeListener;
diff --git a/design/src/android/support/design/widget/BottomSheetBehavior.java b/design/src/android/support/design/widget/BottomSheetBehavior.java
index c3362a8..e745217 100644
--- a/design/src/android/support/design/widget/BottomSheetBehavior.java
+++ b/design/src/android/support/design/widget/BottomSheetBehavior.java
@@ -16,6 +16,8 @@
package android.support.design.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Parcel;
@@ -46,8 +48,6 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.ref.WeakReference;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* An interaction behavior plugin for a child view of {@link CoordinatorLayout} to make it work as
@@ -108,7 +108,7 @@
public static final int STATE_HIDDEN = 5;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({STATE_EXPANDED, STATE_COLLAPSED, STATE_DRAGGING, STATE_SETTLING, STATE_HIDDEN})
@Retention(RetentionPolicy.SOURCE)
public @interface State {}
diff --git a/design/src/android/support/design/widget/CheckableImageButton.java b/design/src/android/support/design/widget/CheckableImageButton.java
index 13e99b2..f274581 100644
--- a/design/src/android/support/design/widget/CheckableImageButton.java
+++ b/design/src/android/support/design/widget/CheckableImageButton.java
@@ -16,6 +16,8 @@
package android.support.design.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.support.v4.view.AccessibilityDelegateCompat;
@@ -28,12 +30,10 @@
import android.view.accessibility.AccessibilityEvent;
import android.widget.Checkable;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class CheckableImageButton extends AppCompatImageButton implements Checkable {
private static final int[] DRAWABLE_STATE_CHECKED = new int[]{android.R.attr.state_checked};
diff --git a/design/src/android/support/design/widget/CollapsingToolbarLayout.java b/design/src/android/support/design/widget/CollapsingToolbarLayout.java
index 40f2d5e..8fcf796 100644
--- a/design/src/android/support/design/widget/CollapsingToolbarLayout.java
+++ b/design/src/android/support/design/widget/CollapsingToolbarLayout.java
@@ -16,6 +16,10 @@
package android.support.design.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+import static android.support.design.widget.MathUtils.constrain;
+import static android.support.design.widget.ViewUtils.objectEquals;
+
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
@@ -52,10 +56,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-import static android.support.design.widget.MathUtils.constrain;
-import static android.support.design.widget.ViewUtils.objectEquals;
-
/**
* CollapsingToolbarLayout is a wrapper for {@link Toolbar} which implements a collapsing app bar.
* It is designed to be used as a direct child of a {@link AppBarLayout}.
@@ -1126,7 +1126,7 @@
private static final float DEFAULT_PARALLAX_MULTIPLIER = 0.5f;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({
COLLAPSE_MODE_OFF,
COLLAPSE_MODE_PIN,
diff --git a/design/src/android/support/design/widget/CoordinatorLayout.java b/design/src/android/support/design/widget/CoordinatorLayout.java
index 42fdb24..b5d63d4 100644
--- a/design/src/android/support/design/widget/CoordinatorLayout.java
+++ b/design/src/android/support/design/widget/CoordinatorLayout.java
@@ -16,7 +16,7 @@
package android.support.design.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import static android.support.design.widget.ViewUtils.objectEquals;
import android.content.Context;
@@ -139,7 +139,7 @@
static final int EVENT_VIEW_REMOVED = 2;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Retention(RetentionPolicy.SOURCE)
@IntDef({EVENT_PRE_DRAW, EVENT_NESTED_SCROLL, EVENT_VIEW_REMOVED})
public @interface DispatchChangeEvent {}
diff --git a/design/src/android/support/design/widget/FloatingActionButton.java b/design/src/android/support/design/widget/FloatingActionButton.java
index 09269a7..592ccef 100644
--- a/design/src/android/support/design/widget/FloatingActionButton.java
+++ b/design/src/android/support/design/widget/FloatingActionButton.java
@@ -16,6 +16,8 @@
package android.support.design.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
@@ -49,8 +51,6 @@
import java.lang.annotation.RetentionPolicy;
import java.util.List;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Floating action buttons are used for a special type of promoted action. They are distinguished
* by a circled icon floating above the UI and have special motion behaviors related to morphing,
@@ -123,7 +123,7 @@
private static final int AUTO_MINI_LARGEST_SCREEN_WIDTH = 470;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Retention(RetentionPolicy.SOURCE)
@IntDef({SIZE_MINI, SIZE_NORMAL, SIZE_AUTO})
public @interface Size {}
diff --git a/design/src/android/support/design/widget/NavigationView.java b/design/src/android/support/design/widget/NavigationView.java
index 8e5d31c..044f096 100644
--- a/design/src/android/support/design/widget/NavigationView.java
+++ b/design/src/android/support/design/widget/NavigationView.java
@@ -16,6 +16,8 @@
package android.support.design.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.drawable.Drawable;
@@ -51,8 +53,6 @@
import android.view.MenuItem;
import android.view.View;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Represents a standard navigation menu for application. The menu contents can be populated
* by a menu resource file.
@@ -232,7 +232,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
protected void onInsetsChanged(WindowInsetsCompat insets) {
mPresenter.dispatchApplyWindowInsets(insets);
diff --git a/design/src/android/support/design/widget/Snackbar.java b/design/src/android/support/design/widget/Snackbar.java
index f29305b..621ddc5 100644
--- a/design/src/android/support/design/widget/Snackbar.java
+++ b/design/src/android/support/design/widget/Snackbar.java
@@ -16,7 +16,7 @@
package android.support.design.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.content.Context;
import android.content.res.ColorStateList;
@@ -240,7 +240,7 @@
* Note: this class is here to provide backwards-compatible way for apps written before
* the existence of the base {@link BaseTransientBottomBar} class.
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static final class SnackbarLayout extends BaseTransientBottomBar.SnackbarBaseLayout {
public SnackbarLayout(Context context) {
super(context);
diff --git a/design/src/android/support/design/widget/SwipeDismissBehavior.java b/design/src/android/support/design/widget/SwipeDismissBehavior.java
index 2d1cebe..1bf3d5a 100644
--- a/design/src/android/support/design/widget/SwipeDismissBehavior.java
+++ b/design/src/android/support/design/widget/SwipeDismissBehavior.java
@@ -16,6 +16,8 @@
package android.support.design.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
import android.support.annotation.RestrictTo;
@@ -30,8 +32,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* An interaction behavior plugin for child views of {@link CoordinatorLayout} to provide support
* for the 'swipe-to-dismiss' gesture.
@@ -56,7 +56,7 @@
public static final int STATE_SETTLING = ViewDragHelper.STATE_SETTLING;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({SWIPE_DIRECTION_START_TO_END, SWIPE_DIRECTION_END_TO_START, SWIPE_DIRECTION_ANY})
@Retention(RetentionPolicy.SOURCE)
private @interface SwipeDirection {}
diff --git a/design/src/android/support/design/widget/TabLayout.java b/design/src/android/support/design/widget/TabLayout.java
index 904c904..b6f94a4 100755
--- a/design/src/android/support/design/widget/TabLayout.java
+++ b/design/src/android/support/design/widget/TabLayout.java
@@ -16,7 +16,7 @@
package android.support.design.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import static android.support.v4.view.ViewPager.SCROLL_STATE_DRAGGING;
import static android.support.v4.view.ViewPager.SCROLL_STATE_IDLE;
import static android.support.v4.view.ViewPager.SCROLL_STATE_SETTLING;
@@ -182,7 +182,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef(value = {MODE_SCROLLABLE, MODE_FIXED})
@Retention(RetentionPolicy.SOURCE)
public @interface Mode {}
@@ -207,7 +207,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef(flag = true, value = {GRAVITY_FILL, GRAVITY_CENTER})
@Retention(RetentionPolicy.SOURCE)
public @interface TabGravity {}
diff --git a/documents-archive/src/android/support/provider/DocumentArchive.java b/documents-archive/src/android/support/provider/DocumentArchive.java
index 91cd5e7..4b0b0b9 100644
--- a/documents-archive/src/android/support/provider/DocumentArchive.java
+++ b/documents-archive/src/android/support/provider/DocumentArchive.java
@@ -16,6 +16,8 @@
package android.support.provider;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.AssetFileDescriptor;
import android.database.Cursor;
@@ -42,12 +44,8 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
-import java.lang.IllegalArgumentException;
-import java.lang.IllegalStateException;
-import java.lang.UnsupportedOperationException;
import java.util.Collections;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -56,9 +54,6 @@
import java.util.concurrent.Executors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
-import java.util.zip.ZipInputStream;
-
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
/**
* Provides basic implementation for creating, extracting and accessing
@@ -70,7 +65,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class DocumentArchive implements Closeable {
private static final String TAG = "DocumentArchive";
diff --git a/documents-archive/src/android/support/provider/DocumentArchiveHelper.java b/documents-archive/src/android/support/provider/DocumentArchiveHelper.java
index fd5ff94..6c5e198 100644
--- a/documents-archive/src/android/support/provider/DocumentArchiveHelper.java
+++ b/documents-archive/src/android/support/provider/DocumentArchiveHelper.java
@@ -16,11 +16,11 @@
package android.support.provider;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.res.AssetFileDescriptor;
-import android.content.res.Configuration;
import android.database.ContentObserver;
import android.database.Cursor;
-import android.database.MatrixCursor;
import android.graphics.Point;
import android.net.Uri;
import android.os.CancellationSignal;
@@ -36,15 +36,9 @@
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.Callable;
import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Provides basic implementation for creating, extracting and accessing
* files within archives exposed by a document provider.
@@ -55,7 +49,7 @@
* TODO: Update the documentation. b/26047732
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class DocumentArchiveHelper implements Closeable {
/**
* Cursor column to be used for passing the local file path for documents.
diff --git a/documents-archive/src/android/support/provider/IoUtils.java b/documents-archive/src/android/support/provider/IoUtils.java
index 4806575..55c293d 100644
--- a/documents-archive/src/android/support/provider/IoUtils.java
+++ b/documents-archive/src/android/support/provider/IoUtils.java
@@ -16,20 +16,19 @@
package android.support.provider;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.Nullable;
import android.support.annotation.RestrictTo;
import java.io.Closeable;
import java.io.InputStream;
-import java.util.Collection;
-
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
/**
* Simple static methods to perform common IO operations.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
final class IoUtils {
static void closeQuietly(@Nullable Closeable closeable) {
if (closeable != null) {
diff --git a/documents-archive/src/android/support/provider/ParsedDocumentId.java b/documents-archive/src/android/support/provider/ParsedDocumentId.java
index 2834455..a8c7810 100644
--- a/documents-archive/src/android/support/provider/ParsedDocumentId.java
+++ b/documents-archive/src/android/support/provider/ParsedDocumentId.java
@@ -16,14 +16,14 @@
package android.support.provider;
-import android.support.annotation.RestrictTo;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import android.support.annotation.RestrictTo;
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
class ParsedDocumentId {
public final String mArchiveId;
public final String mPath;
diff --git a/documents-archive/src/android/support/provider/Preconditions.java b/documents-archive/src/android/support/provider/Preconditions.java
index 050ca9a..e3971aa 100644
--- a/documents-archive/src/android/support/provider/Preconditions.java
+++ b/documents-archive/src/android/support/provider/Preconditions.java
@@ -16,20 +16,18 @@
package android.support.provider;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.Nullable;
import android.support.annotation.RestrictTo;
import android.text.TextUtils;
-import java.util.Collection;
-
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Simple static methods to be called at the start of your own methods to verify
* correct arguments and state.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
final class Preconditions {
static void checkArgument(boolean expression, String message) {
if (!expression) {
diff --git a/fragment/java/android/support/v4/app/DialogFragment.java b/fragment/java/android/support/v4/app/DialogFragment.java
index c67026a..baec333 100644
--- a/fragment/java/android/support/v4/app/DialogFragment.java
+++ b/fragment/java/android/support/v4/app/DialogFragment.java
@@ -16,6 +16,8 @@
package android.support.v4.app;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
@@ -35,8 +37,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Static library support version of the framework's {@link android.app.DialogFragment}.
* Used to write apps that run on platforms prior to Android 3.0. When running
@@ -48,7 +48,7 @@
implements DialogInterface.OnCancelListener, DialogInterface.OnDismissListener {
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({STYLE_NORMAL, STYLE_NO_TITLE, STYLE_NO_FRAME, STYLE_NO_INPUT})
@Retention(RetentionPolicy.SOURCE)
private @interface DialogStyle {}
@@ -206,7 +206,7 @@
}
}
}
-
+
public Dialog getDialog() {
return mDialog;
}
@@ -302,7 +302,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public LayoutInflater getLayoutInflater(Bundle savedInstanceState) {
if (!mShowsDialog) {
@@ -322,7 +322,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setupDialog(Dialog dialog, int style) {
switch (style) {
case STYLE_NO_INPUT:
@@ -335,27 +335,27 @@
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
}
}
-
+
/**
* Override to build your own custom Dialog container. This is typically
* used to show an AlertDialog instead of a generic Dialog; when doing so,
* {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)} does not need
* to be implemented since the AlertDialog takes care of its own content.
- *
+ *
* <p>This method will be called after {@link #onCreate(Bundle)} and
* before {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)}. The
* default implementation simply instantiates and returns a {@link Dialog}
* class.
- *
+ *
* <p><em>Note: DialogFragment own the {@link Dialog#setOnCancelListener
* Dialog.setOnCancelListener} and {@link Dialog#setOnDismissListener
* Dialog.setOnDismissListener} callbacks. You must not set them yourself.</em>
* To find out about these events, override {@link #onCancel(DialogInterface)}
* and {@link #onDismiss(DialogInterface)}.</p>
- *
+ *
* @param savedInstanceState The last saved instance state of the Fragment,
* or null if this is a freshly created Fragment.
- *
+ *
* @return Return a new Dialog instance to be displayed by the Fragment.
*/
@NonNull
diff --git a/fragment/java/android/support/v4/app/Fragment.java b/fragment/java/android/support/v4/app/Fragment.java
index 0adde93..0c7300e 100644
--- a/fragment/java/android/support/v4/app/Fragment.java
+++ b/fragment/java/android/support/v4/app/Fragment.java
@@ -16,7 +16,7 @@
package android.support.v4.app;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.app.Activity;
import android.content.ComponentCallbacks;
@@ -792,13 +792,13 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
final public boolean hasOptionsMenu() {
return mHasMenu;
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
final public boolean isMenuVisible() {
return mMenuVisible;
}
@@ -1120,7 +1120,7 @@
* inflation. Maybe this should become a public API. Note sure.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public LayoutInflater getLayoutInflater(Bundle savedInstanceState) {
LayoutInflater result = mHost.onGetLayoutInflater();
getChildFragmentManager(); // Init if needed; use raw implementation below.
diff --git a/fragment/java/android/support/v4/app/FragmentActivity.java b/fragment/java/android/support/v4/app/FragmentActivity.java
index 50403f0..0b38fd4 100644
--- a/fragment/java/android/support/v4/app/FragmentActivity.java
+++ b/fragment/java/android/support/v4/app/FragmentActivity.java
@@ -16,7 +16,7 @@
package android.support.v4.app;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.annotation.SuppressLint;
import android.app.Activity;
@@ -530,7 +530,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected boolean onPrepareOptionsPanel(View view, Menu menu) {
return super.onPreparePanel(Window.FEATURE_OPTIONS_PANEL, view, menu);
}
diff --git a/fragment/java/android/support/v4/app/FragmentManager.java b/fragment/java/android/support/v4/app/FragmentManager.java
index 77325cb..829e974 100644
--- a/fragment/java/android/support/v4/app/FragmentManager.java
+++ b/fragment/java/android/support/v4/app/FragmentManager.java
@@ -16,7 +16,7 @@
package android.support.v4.app;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.content.Context;
import android.content.res.Configuration;
@@ -158,7 +158,7 @@
* @hide -- remove once prebuilts are in.
* @deprecated
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Deprecated
public FragmentTransaction openTransaction() {
return beginTransaction();
@@ -331,7 +331,7 @@
* @return The list of all fragments or null if none.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public abstract List<Fragment> getFragments();
/**
diff --git a/fragment/java/android/support/v4/app/FragmentTransaction.java b/fragment/java/android/support/v4/app/FragmentTransaction.java
index 9be99b2..b03f002 100644
--- a/fragment/java/android/support/v4/app/FragmentTransaction.java
+++ b/fragment/java/android/support/v4/app/FragmentTransaction.java
@@ -16,7 +16,7 @@
package android.support.v4.app;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.support.annotation.AnimRes;
import android.support.annotation.IdRes;
@@ -164,7 +164,7 @@
public static final int TRANSIT_EXIT_MASK = 0x2000;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({TRANSIT_NONE, TRANSIT_FRAGMENT_OPEN, TRANSIT_FRAGMENT_CLOSE, TRANSIT_FRAGMENT_FADE})
@Retention(RetentionPolicy.SOURCE)
private @interface Transit {}
diff --git a/graphics/drawable/static/src/android/support/graphics/drawable/TypedArrayUtils.java b/graphics/drawable/static/src/android/support/graphics/drawable/TypedArrayUtils.java
index aedd502..14200c1 100644
--- a/graphics/drawable/static/src/android/support/graphics/drawable/TypedArrayUtils.java
+++ b/graphics/drawable/static/src/android/support/graphics/drawable/TypedArrayUtils.java
@@ -15,6 +15,7 @@
package android.support.graphics.drawable;
import android.content.res.TypedArray;
+
import org.xmlpull.v1.XmlPullParser;
class TypedArrayUtils {
diff --git a/graphics/drawable/static/src/android/support/graphics/drawable/VectorDrawableCompat.java b/graphics/drawable/static/src/android/support/graphics/drawable/VectorDrawableCompat.java
index 58cce37..3166df7 100644
--- a/graphics/drawable/static/src/android/support/graphics/drawable/VectorDrawableCompat.java
+++ b/graphics/drawable/static/src/android/support/graphics/drawable/VectorDrawableCompat.java
@@ -14,7 +14,7 @@
package android.support.graphics.drawable;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.annotation.SuppressLint;
import android.content.res.ColorStateList;
@@ -544,7 +544,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public float getPixelSize() {
if (mVectorState == null && mVectorState.mVPathRenderer == null ||
mVectorState.mVPathRenderer.mBaseWidth == 0 ||
diff --git a/media-compat/java/android/support/v4/media/MediaBrowserCompat.java b/media-compat/java/android/support/v4/media/MediaBrowserCompat.java
index 79f61c3..be0959d 100644
--- a/media-compat/java/android/support/v4/media/MediaBrowserCompat.java
+++ b/media-compat/java/android/support/v4/media/MediaBrowserCompat.java
@@ -15,6 +15,30 @@
*/
package android.support.v4.media;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+import static android.support.v4.media.MediaBrowserProtocol.CLIENT_MSG_ADD_SUBSCRIPTION;
+import static android.support.v4.media.MediaBrowserProtocol.CLIENT_MSG_CONNECT;
+import static android.support.v4.media.MediaBrowserProtocol.CLIENT_MSG_DISCONNECT;
+import static android.support.v4.media.MediaBrowserProtocol.CLIENT_MSG_GET_MEDIA_ITEM;
+import static android.support.v4.media.MediaBrowserProtocol.CLIENT_MSG_REGISTER_CALLBACK_MESSENGER;
+import static android.support.v4.media.MediaBrowserProtocol.CLIENT_MSG_REMOVE_SUBSCRIPTION;
+import static android.support.v4.media.MediaBrowserProtocol
+ .CLIENT_MSG_UNREGISTER_CALLBACK_MESSENGER;
+import static android.support.v4.media.MediaBrowserProtocol.CLIENT_VERSION_CURRENT;
+import static android.support.v4.media.MediaBrowserProtocol.DATA_CALLBACK_TOKEN;
+import static android.support.v4.media.MediaBrowserProtocol.DATA_MEDIA_ITEM_ID;
+import static android.support.v4.media.MediaBrowserProtocol.DATA_MEDIA_ITEM_LIST;
+import static android.support.v4.media.MediaBrowserProtocol.DATA_MEDIA_SESSION_TOKEN;
+import static android.support.v4.media.MediaBrowserProtocol.DATA_OPTIONS;
+import static android.support.v4.media.MediaBrowserProtocol.DATA_PACKAGE_NAME;
+import static android.support.v4.media.MediaBrowserProtocol.DATA_RESULT_RECEIVER;
+import static android.support.v4.media.MediaBrowserProtocol.DATA_ROOT_HINTS;
+import static android.support.v4.media.MediaBrowserProtocol.EXTRA_CLIENT_VERSION;
+import static android.support.v4.media.MediaBrowserProtocol.EXTRA_MESSENGER_BINDER;
+import static android.support.v4.media.MediaBrowserProtocol.SERVICE_MSG_ON_CONNECT;
+import static android.support.v4.media.MediaBrowserProtocol.SERVICE_MSG_ON_CONNECT_FAILED;
+import static android.support.v4.media.MediaBrowserProtocol.SERVICE_MSG_ON_LOAD_CHILDREN;
+
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -34,7 +58,7 @@
import android.support.annotation.Nullable;
import android.support.annotation.RestrictTo;
import android.support.v4.app.BundleCompat;
-import android.support.v4.media.session.MediaControllerCompat;
+import android.support.v4.media.session.MediaControllerCompat.TransportControls;
import android.support.v4.media.session.MediaSessionCompat;
import android.support.v4.os.BuildCompat;
import android.support.v4.os.ResultReceiver;
@@ -50,9 +74,6 @@
import java.util.List;
import java.util.Map;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-import static android.support.v4.media.MediaBrowserProtocol.*;
-
/**
* Browses media content offered by a {@link MediaBrowserServiceCompat}.
* <p>
@@ -309,7 +330,7 @@
private final MediaDescriptionCompat mDescription;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Retention(RetentionPolicy.SOURCE)
@IntDef(flag=true, value = { FLAG_BROWSABLE, FLAG_PLAYABLE })
public @interface Flags { }
@@ -323,7 +344,7 @@
* Flag: Indicates that the item is playable.
* <p>
* The id of this item may be passed to
- * {@link MediaControllerCompat.TransportControls#playFromMediaId(String, Bundle)}
+ * {@link TransportControls#playFromMediaId(String, Bundle)}
* to start playing it.
* </p>
*/
diff --git a/media-compat/java/android/support/v4/media/MediaBrowserCompatUtils.java b/media-compat/java/android/support/v4/media/MediaBrowserCompatUtils.java
index 1ffc9f5..296b4c6 100644
--- a/media-compat/java/android/support/v4/media/MediaBrowserCompatUtils.java
+++ b/media-compat/java/android/support/v4/media/MediaBrowserCompatUtils.java
@@ -16,15 +16,15 @@
package android.support.v4.media;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.os.Bundle;
import android.support.annotation.RestrictTo;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class MediaBrowserCompatUtils {
public static boolean areSameOptions(Bundle options1, Bundle options2) {
if (options1 == options2) {
diff --git a/media-compat/java/android/support/v4/media/MediaBrowserServiceCompat.java b/media-compat/java/android/support/v4/media/MediaBrowserServiceCompat.java
index 23c0cb0..a9fc7e8 100644
--- a/media-compat/java/android/support/v4/media/MediaBrowserServiceCompat.java
+++ b/media-compat/java/android/support/v4/media/MediaBrowserServiceCompat.java
@@ -16,7 +16,7 @@
package android.support.v4.media;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import static android.support.v4.media.MediaBrowserProtocol.CLIENT_MSG_ADD_SUBSCRIPTION;
import static android.support.v4.media.MediaBrowserProtocol.CLIENT_MSG_CONNECT;
import static android.support.v4.media.MediaBrowserProtocol.CLIENT_MSG_DISCONNECT;
@@ -113,14 +113,14 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static final String KEY_MEDIA_ITEM = "media_item";
static final int RESULT_FLAG_OPTION_NOT_HANDLED = 0x00000001;
static final int RESULT_FLAG_ON_LOAD_ITEM_NOT_IMPLEMENTED = 0x00000002;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Retention(RetentionPolicy.SOURCE)
@IntDef(flag=true, value = { RESULT_FLAG_OPTION_NOT_HANDLED,
RESULT_FLAG_ON_LOAD_ITEM_NOT_IMPLEMENTED })
diff --git a/media-compat/java/android/support/v4/media/MediaDescriptionCompat.java b/media-compat/java/android/support/v4/media/MediaDescriptionCompat.java
index 1a597fc..1a617e9 100644
--- a/media-compat/java/android/support/v4/media/MediaDescriptionCompat.java
+++ b/media-compat/java/android/support/v4/media/MediaDescriptionCompat.java
@@ -15,6 +15,8 @@
*/
package android.support.v4.media;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
@@ -25,8 +27,6 @@
import android.support.annotation.RestrictTo;
import android.text.TextUtils;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A simple set of metadata for a media item suitable for display. This can be
* created using the Builder or retrieved from existing metadata using
@@ -101,7 +101,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static final String DESCRIPTION_KEY_MEDIA_URI =
"android.support.v4.media.description.MEDIA_URI";
/**
@@ -109,7 +109,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static final String DESCRIPTION_KEY_NULL_BUNDLE_FLAG =
"android.support.v4.media.description.NULL_BUNDLE_FLAG";
/**
diff --git a/media-compat/java/android/support/v4/media/MediaMetadataCompat.java b/media-compat/java/android/support/v4/media/MediaMetadataCompat.java
index 6116e6d..8792982 100644
--- a/media-compat/java/android/support/v4/media/MediaMetadataCompat.java
+++ b/media-compat/java/android/support/v4/media/MediaMetadataCompat.java
@@ -15,6 +15,8 @@
*/
package android.support.v4.media;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
@@ -23,9 +25,8 @@
import android.os.Parcelable;
import android.support.annotation.RestrictTo;
import android.support.annotation.StringDef;
+import android.support.v4.media.session.MediaControllerCompat.TransportControls;
import android.support.v4.util.ArrayMap;
-import android.support.v4.media.MediaBrowserCompat;
-import android.support.v4.media.session.MediaControllerCompat;
import android.text.TextUtils;
import android.util.Log;
@@ -33,8 +34,6 @@
import java.lang.annotation.RetentionPolicy;
import java.util.Set;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Contains metadata about an item, such as the title, artist, etc.
*/
@@ -216,7 +215,7 @@
/**
* A Uri formatted String representing the content. This value is specific to the
* service providing the content. It may be used with
- * {@link MediaControllerCompat.TransportControls#playFromUri(Uri, Bundle)}
+ * {@link TransportControls#playFromUri(Uri, Bundle)}
* to initiate playback when provided by a {@link MediaBrowserCompat} connected to
* the same app.
*/
@@ -241,7 +240,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@StringDef({METADATA_KEY_TITLE, METADATA_KEY_ARTIST, METADATA_KEY_ALBUM, METADATA_KEY_AUTHOR,
METADATA_KEY_WRITER, METADATA_KEY_COMPOSER, METADATA_KEY_COMPILATION,
METADATA_KEY_DATE, METADATA_KEY_GENRE, METADATA_KEY_ALBUM_ARTIST, METADATA_KEY_ART_URI,
@@ -254,7 +253,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@StringDef({METADATA_KEY_DURATION, METADATA_KEY_YEAR, METADATA_KEY_TRACK_NUMBER,
METADATA_KEY_NUM_TRACKS, METADATA_KEY_DISC_NUMBER, METADATA_KEY_BT_FOLDER_TYPE})
@Retention(RetentionPolicy.SOURCE)
@@ -263,7 +262,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@StringDef({METADATA_KEY_ART, METADATA_KEY_ALBUM_ART, METADATA_KEY_DISPLAY_ICON})
@Retention(RetentionPolicy.SOURCE)
public @interface BitmapKey {}
@@ -271,7 +270,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@StringDef({METADATA_KEY_USER_RATING, METADATA_KEY_RATING})
@Retention(RetentionPolicy.SOURCE)
public @interface RatingKey {}
@@ -662,7 +661,7 @@
* in the metadata.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public Builder(MediaMetadataCompat source, int maxBitmapSize) {
this(source);
for (String key : mBundle.keySet()) {
diff --git a/media-compat/java/android/support/v4/media/RatingCompat.java b/media-compat/java/android/support/v4/media/RatingCompat.java
index af53bff..f61a686 100644
--- a/media-compat/java/android/support/v4/media/RatingCompat.java
+++ b/media-compat/java/android/support/v4/media/RatingCompat.java
@@ -16,6 +16,8 @@
package android.support.v4.media;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
@@ -26,8 +28,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A class to encapsulate rating information used as content metadata.
* A rating is defined by its rating style (see {@link #RATING_HEART},
@@ -42,7 +42,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({RATING_NONE, RATING_HEART, RATING_THUMB_UP_DOWN, RATING_3_STARS, RATING_4_STARS,
RATING_5_STARS, RATING_PERCENTAGE})
@Retention(RetentionPolicy.SOURCE)
@@ -51,7 +51,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({RATING_3_STARS, RATING_4_STARS, RATING_5_STARS})
@Retention(RetentionPolicy.SOURCE)
public @interface StarStyle {}
diff --git a/media-compat/java/android/support/v4/media/VolumeProviderCompat.java b/media-compat/java/android/support/v4/media/VolumeProviderCompat.java
index 4213720..a3aa047 100644
--- a/media-compat/java/android/support/v4/media/VolumeProviderCompat.java
+++ b/media-compat/java/android/support/v4/media/VolumeProviderCompat.java
@@ -16,6 +16,8 @@
package android.support.v4.media;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.os.Build;
import android.support.annotation.IntDef;
import android.support.annotation.RestrictTo;
@@ -24,8 +26,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Handles requests to adjust or set the volume on a session. This is also used
* to push volume updates back to the session after a request has been handled.
@@ -37,7 +37,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({VOLUME_CONTROL_FIXED, VOLUME_CONTROL_RELATIVE, VOLUME_CONTROL_ABSOLUTE})
@Retention(RetentionPolicy.SOURCE)
public @interface ControlType {}
diff --git a/media-compat/java/android/support/v4/media/session/MediaSessionCompat.java b/media-compat/java/android/support/v4/media/session/MediaSessionCompat.java
index 4e3bc36..78b0c50 100644
--- a/media-compat/java/android/support/v4/media/session/MediaSessionCompat.java
+++ b/media-compat/java/android/support/v4/media/session/MediaSessionCompat.java
@@ -17,7 +17,7 @@
package android.support.v4.media.session;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.app.Activity;
import android.app.PendingIntent;
@@ -93,7 +93,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef(flag=true, value={FLAG_HANDLES_MEDIA_BUTTONS, FLAG_HANDLES_TRANSPORT_CONTROLS})
@Retention(RetentionPolicy.SOURCE)
public @interface SessionFlags {}
@@ -533,7 +533,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public String getCallingPackage() {
return mImpl.getCallingPackage();
}
diff --git a/media-compat/java/android/support/v4/media/session/PlaybackStateCompat.java b/media-compat/java/android/support/v4/media/session/PlaybackStateCompat.java
index 7d8ca2f..be6e4b1 100644
--- a/media-compat/java/android/support/v4/media/session/PlaybackStateCompat.java
+++ b/media-compat/java/android/support/v4/media/session/PlaybackStateCompat.java
@@ -16,7 +16,7 @@
package android.support.v4.media.session;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.os.Build;
import android.os.Bundle;
@@ -44,7 +44,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef(flag=true, value={ACTION_STOP, ACTION_PAUSE, ACTION_PLAY, ACTION_REWIND,
ACTION_SKIP_TO_PREVIOUS, ACTION_SKIP_TO_NEXT, ACTION_FAST_FORWARD, ACTION_SET_RATING,
ACTION_SEEK_TO, ACTION_PLAY_PAUSE, ACTION_PLAY_FROM_MEDIA_ID, ACTION_PLAY_FROM_SEARCH,
@@ -56,7 +56,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({ACTION_STOP, ACTION_PAUSE, ACTION_PLAY, ACTION_REWIND, ACTION_SKIP_TO_PREVIOUS,
ACTION_SKIP_TO_NEXT, ACTION_FAST_FORWARD, ACTION_PLAY_PAUSE})
@Retention(RetentionPolicy.SOURCE)
@@ -191,7 +191,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({STATE_NONE, STATE_STOPPED, STATE_PAUSED, STATE_PLAYING, STATE_FAST_FORWARDING,
STATE_REWINDING, STATE_BUFFERING, STATE_ERROR, STATE_CONNECTING,
STATE_SKIPPING_TO_PREVIOUS, STATE_SKIPPING_TO_NEXT, STATE_SKIPPING_TO_QUEUE_ITEM})
diff --git a/transition/ics/android/support/transition/TransitionManagerPort.java b/transition/ics/android/support/transition/TransitionManagerPort.java
index 3acad62..2ea7656 100644
--- a/transition/ics/android/support/transition/TransitionManagerPort.java
+++ b/transition/ics/android/support/transition/TransitionManagerPort.java
@@ -16,6 +16,8 @@
package android.support.transition;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.support.annotation.RequiresApi;
import android.support.annotation.RestrictTo;
@@ -29,8 +31,6 @@
import java.lang.ref.WeakReference;
import java.util.ArrayList;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
@RequiresApi(14)
@TargetApi(14)
class TransitionManagerPort {
@@ -64,7 +64,7 @@
* @hide pending later changes
* @see #setDefaultTransition(TransitionPort)
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static TransitionPort getDefaultTransition() {
return sDefaultTransition;
}
@@ -77,7 +77,7 @@
* @param transition The default transition to be used for scene changes.
* @hide pending later changes
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setDefaultTransition(TransitionPort transition) {
sDefaultTransition = transition;
}
diff --git a/transition/ics/android/support/transition/TransitionPort.java b/transition/ics/android/support/transition/TransitionPort.java
index 4e6a9d7..98b217d 100644
--- a/transition/ics/android/support/transition/TransitionPort.java
+++ b/transition/ics/android/support/transition/TransitionPort.java
@@ -16,6 +16,8 @@
package android.support.transition;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.TimeInterpolator;
@@ -33,8 +35,6 @@
import java.util.ArrayList;
import java.util.List;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
@RequiresApi(14)
@TargetApi(14)
abstract class TransitionPort implements Cloneable {
@@ -178,7 +178,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected void createAnimators(ViewGroup sceneRoot, TransitionValuesMaps startValues,
TransitionValuesMaps endValues) {
if (DBG) {
@@ -414,7 +414,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected void runAnimators() {
if (DBG) {
Log.d(LOG_TAG, "runAnimators() on " + this);
@@ -798,7 +798,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void pause(View sceneRoot) {
if (!mEnded) {
ArrayMap<Animator, AnimationInfo> runningAnimators = getRunningAnimators();
@@ -830,7 +830,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void resume(View sceneRoot) {
if (mPaused) {
if (!mEnded) {
@@ -929,7 +929,7 @@
* @param animator The Animator to be run during this transition.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected void animate(Animator animator) {
// TODO: maybe pass auto-end as a boolean parameter?
if (animator == null) {
@@ -962,7 +962,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected void start() {
if (mNumInstances == 0) {
if (mListeners != null && mListeners.size() > 0) {
@@ -989,7 +989,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected void end() {
--mNumInstances;
if (mNumInstances == 0) {
@@ -1024,7 +1024,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected void cancel() {
int numAnimators = mCurrentAnimators.size();
for (int i = numAnimators - 1; i >= 0; i--) {
@@ -1197,7 +1197,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static class TransitionListenerAdapter implements TransitionListener {
@Override
diff --git a/transition/ics/android/support/transition/TransitionSetPort.java b/transition/ics/android/support/transition/TransitionSetPort.java
index 1d5ddd6..d88e046 100644
--- a/transition/ics/android/support/transition/TransitionSetPort.java
+++ b/transition/ics/android/support/transition/TransitionSetPort.java
@@ -16,6 +16,8 @@
package android.support.transition;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.animation.TimeInterpolator;
import android.annotation.TargetApi;
import android.support.annotation.RequiresApi;
@@ -26,8 +28,6 @@
import java.util.ArrayList;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
@RequiresApi(14)
@TargetApi(14)
class TransitionSetPort extends TransitionPort {
@@ -169,7 +169,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
protected void createAnimators(ViewGroup sceneRoot, TransitionValuesMaps startValues,
TransitionValuesMaps endValues) {
@@ -181,7 +181,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
protected void runAnimators() {
if (mTransitions.isEmpty()) {
@@ -240,7 +240,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void pause(View sceneRoot) {
super.pause(sceneRoot);
@@ -251,7 +251,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void resume(View sceneRoot) {
super.resume(sceneRoot);
@@ -262,7 +262,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
protected void cancel() {
super.cancel();
diff --git a/transition/ics/android/support/transition/ViewOverlay.java b/transition/ics/android/support/transition/ViewOverlay.java
index a95d8f1..8b36850 100644
--- a/transition/ics/android/support/transition/ViewOverlay.java
+++ b/transition/ics/android/support/transition/ViewOverlay.java
@@ -16,6 +16,8 @@
package android.support.transition;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.R;
import android.annotation.TargetApi;
import android.content.Context;
@@ -34,8 +36,6 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
@RequiresApi(14)
@TargetApi(14)
class ViewOverlay {
@@ -330,7 +330,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected ViewParent invalidateChildInParentFast(int left, int top, Rect dirty) {
if (mHostView instanceof ViewGroup && sInvalidateChildInParentFastMethod != null) {
try {
diff --git a/v13/java/android/support/v13/view/DragAndDropPermissionsCompat.java b/v13/java/android/support/v13/view/DragAndDropPermissionsCompat.java
index f10a548..46484da 100644
--- a/v13/java/android/support/v13/view/DragAndDropPermissionsCompat.java
+++ b/v13/java/android/support/v13/view/DragAndDropPermissionsCompat.java
@@ -16,6 +16,8 @@
package android.support.v13.view;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.app.Activity;
import android.support.annotation.RequiresApi;
@@ -23,8 +25,6 @@
import android.support.v4.os.BuildCompat;
import android.view.DragEvent;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Helper for accessing features in {@link android.view.DragAndDropPermissions}
* introduced after API level 13 in a backwards compatible fashion.
@@ -79,7 +79,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static DragAndDropPermissionsCompat request(Activity activity, DragEvent dragEvent) {
Object dragAndDropPermissions = IMPL.request(activity, dragEvent);
if (dragAndDropPermissions != null) {
diff --git a/v14/preference/src/android/support/v14/preference/EditTextPreferenceDialogFragment.java b/v14/preference/src/android/support/v14/preference/EditTextPreferenceDialogFragment.java
index 829f29b..3ee5872 100644
--- a/v14/preference/src/android/support/v14/preference/EditTextPreferenceDialogFragment.java
+++ b/v14/preference/src/android/support/v14/preference/EditTextPreferenceDialogFragment.java
@@ -16,6 +16,8 @@
package android.support.v14.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.RestrictTo;
@@ -23,8 +25,6 @@
import android.view.View;
import android.widget.EditText;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
public class EditTextPreferenceDialogFragment extends PreferenceDialogFragment {
private static final String SAVE_STATE_TEXT = "EditTextPreferenceDialogFragment.text";
@@ -77,7 +77,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
protected boolean needInputMethod() {
// We want the input method to show, if possible, when dialog is displayed
diff --git a/v14/preference/src/android/support/v14/preference/MultiSelectListPreference.java b/v14/preference/src/android/support/v14/preference/MultiSelectListPreference.java
index 284b9aa..cb38c44 100644
--- a/v14/preference/src/android/support/v14/preference/MultiSelectListPreference.java
+++ b/v14/preference/src/android/support/v14/preference/MultiSelectListPreference.java
@@ -16,6 +16,8 @@
package android.support.v14.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
@@ -33,8 +35,6 @@
import java.util.HashSet;
import java.util.Set;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A {@link android.support.v7.preference.Preference} that displays a list of entries as
* a dialog.
@@ -99,7 +99,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected boolean persistStringSet(Set<String> values) {
if (shouldPersist()) {
// Shouldn't store null
@@ -132,7 +132,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected Set<String> getPersistedStringSet(Set<String> defaultReturnValue) {
if (!shouldPersist()) {
return defaultReturnValue;
diff --git a/v14/preference/src/android/support/v14/preference/PreferenceDialogFragment.java b/v14/preference/src/android/support/v14/preference/PreferenceDialogFragment.java
index c05f427..e7b9f40 100644
--- a/v14/preference/src/android/support/v14/preference/PreferenceDialogFragment.java
+++ b/v14/preference/src/android/support/v14/preference/PreferenceDialogFragment.java
@@ -16,6 +16,8 @@
package android.support.v14.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
@@ -38,8 +40,6 @@
import android.view.WindowManager;
import android.widget.TextView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Abstract base class which presents a dialog associated with a
* {@link android.support.v7.preference.DialogPreference}. Since the preference object may
@@ -195,7 +195,7 @@
* the soft input method brought up automatically.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected boolean needInputMethod() {
return false;
}
diff --git a/v14/preference/src/android/support/v14/preference/PreferenceFragment.java b/v14/preference/src/android/support/v14/preference/PreferenceFragment.java
index 2904cae..d2519d1 100644
--- a/v14/preference/src/android/support/v14/preference/PreferenceFragment.java
+++ b/v14/preference/src/android/support/v14/preference/PreferenceFragment.java
@@ -16,6 +16,8 @@
package android.support.v14.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.app.DialogFragment;
import android.app.Fragment;
import android.content.Context;
@@ -50,8 +52,6 @@
import android.view.View;
import android.view.ViewGroup;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Shows a hierarchy of {@link Preference} objects as
* lists. These preferences will
@@ -555,12 +555,12 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected void onBindPreferences() {
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected void onUnbindPreferences() {
}
@@ -663,7 +663,7 @@
* @return Fragment to possibly use as a callback
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public Fragment getCallbackFragment() {
return null;
}
diff --git a/v14/preference/src/android/support/v14/preference/SwitchPreference.java b/v14/preference/src/android/support/v14/preference/SwitchPreference.java
index 1d6bbaf..eae20b8 100644
--- a/v14/preference/src/android/support/v14/preference/SwitchPreference.java
+++ b/v14/preference/src/android/support/v14/preference/SwitchPreference.java
@@ -16,6 +16,8 @@
package android.support.v14.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.support.annotation.RestrictTo;
@@ -30,8 +32,6 @@
import android.widget.CompoundButton;
import android.widget.Switch;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A {@link android.support.v7.preference.Preference} that provides a two-state toggleable option.
* <p>
@@ -206,7 +206,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
protected void performClick(View view) {
super.performClick(view);
diff --git a/v17/leanback/api21/android/support/v17/leanback/transition/FadeAndShortSlide.java b/v17/leanback/api21/android/support/v17/leanback/transition/FadeAndShortSlide.java
index d4f063d..76e237b 100644
--- a/v17/leanback/api21/android/support/v17/leanback/transition/FadeAndShortSlide.java
+++ b/v17/leanback/api21/android/support/v17/leanback/transition/FadeAndShortSlide.java
@@ -15,6 +15,8 @@
*/
package android.support.v17.leanback.transition;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.TimeInterpolator;
@@ -35,15 +37,13 @@
import android.view.ViewGroup;
import android.view.animation.DecelerateInterpolator;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Execute horizontal slide of 1/4 width and fade (to workaround bug 23718734)
* @hide
*/
@RequiresApi(21)
@TargetApi(21)
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class FadeAndShortSlide extends Visibility {
private static final TimeInterpolator sDecelerate = new DecelerateInterpolator();
diff --git a/v17/leanback/api21/android/support/v17/leanback/transition/SlideNoPropagation.java b/v17/leanback/api21/android/support/v17/leanback/transition/SlideNoPropagation.java
index 3bb7806..5158992 100644
--- a/v17/leanback/api21/android/support/v17/leanback/transition/SlideNoPropagation.java
+++ b/v17/leanback/api21/android/support/v17/leanback/transition/SlideNoPropagation.java
@@ -13,7 +13,7 @@
*/
package android.support.v17.leanback.transition;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.annotation.TargetApi;
import android.content.Context;
@@ -27,7 +27,7 @@
*/
@RequiresApi(21)
@TargetApi(21)
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class SlideNoPropagation extends Slide {
public SlideNoPropagation() {
diff --git a/v17/leanback/api21/android/support/v17/leanback/transition/TranslationAnimationCreator.java b/v17/leanback/api21/android/support/v17/leanback/transition/TranslationAnimationCreator.java
index d493bdd..15b9081 100644
--- a/v17/leanback/api21/android/support/v17/leanback/transition/TranslationAnimationCreator.java
+++ b/v17/leanback/api21/android/support/v17/leanback/transition/TranslationAnimationCreator.java
@@ -1,22 +1,21 @@
package android.support.v17.leanback.transition;
-import android.annotation.TargetApi;
-import android.support.annotation.RequiresApi;
-import android.support.annotation.RestrictTo;
-import android.support.v17.leanback.R;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.animation.TimeInterpolator;
+import android.annotation.TargetApi;
import android.graphics.Path;
+import android.support.annotation.RequiresApi;
+import android.support.annotation.RestrictTo;
+import android.support.v17.leanback.R;
import android.transition.Transition;
-import android.transition.TransitionValues;
import android.transition.Transition.TransitionListener;
+import android.transition.TransitionValues;
import android.view.View;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* This class is used by Slide and Explode to create an animator that goes from the start
* position to the end position. It takes into account the canceled position so that it
@@ -25,7 +24,7 @@
*/
@RequiresApi(21)
@TargetApi(21)
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
class TranslationAnimationCreator {
/**
diff --git a/v17/leanback/common/android/support/v17/leanback/transition/TransitionListener.java b/v17/leanback/common/android/support/v17/leanback/transition/TransitionListener.java
index b1a4a08..b3f5672 100644
--- a/v17/leanback/common/android/support/v17/leanback/transition/TransitionListener.java
+++ b/v17/leanback/common/android/support/v17/leanback/transition/TransitionListener.java
@@ -13,15 +13,15 @@
*/
package android.support.v17.leanback.transition;
-import android.support.annotation.RestrictTo;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import android.support.annotation.RestrictTo;
/**
* Listeners for transition start and stop.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class TransitionListener {
protected Object mImpl;
diff --git a/v17/leanback/src/android/support/v17/leanback/animation/LogAccelerateInterpolator.java b/v17/leanback/src/android/support/v17/leanback/animation/LogAccelerateInterpolator.java
index 4b98f44..9a41f4a 100644
--- a/v17/leanback/src/android/support/v17/leanback/animation/LogAccelerateInterpolator.java
+++ b/v17/leanback/src/android/support/v17/leanback/animation/LogAccelerateInterpolator.java
@@ -13,15 +13,15 @@
*/
package android.support.v17.leanback.animation;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.animation.TimeInterpolator;
import android.support.annotation.RestrictTo;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class LogAccelerateInterpolator implements TimeInterpolator {
int mBase;
diff --git a/v17/leanback/src/android/support/v17/leanback/animation/LogDecelerateInterpolator.java b/v17/leanback/src/android/support/v17/leanback/animation/LogDecelerateInterpolator.java
index d9a4282..3a11ffd 100644
--- a/v17/leanback/src/android/support/v17/leanback/animation/LogDecelerateInterpolator.java
+++ b/v17/leanback/src/android/support/v17/leanback/animation/LogDecelerateInterpolator.java
@@ -13,15 +13,15 @@
*/
package android.support.v17.leanback.animation;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.animation.TimeInterpolator;
import android.support.annotation.RestrictTo;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class LogDecelerateInterpolator implements TimeInterpolator {
int mBase;
diff --git a/v17/leanback/src/android/support/v17/leanback/app/BackgroundFragment.java b/v17/leanback/src/android/support/v17/leanback/app/BackgroundFragment.java
index 6b442c1..705124a 100644
--- a/v17/leanback/src/android/support/v17/leanback/app/BackgroundFragment.java
+++ b/v17/leanback/src/android/support/v17/leanback/app/BackgroundFragment.java
@@ -13,7 +13,7 @@
*/
package android.support.v17.leanback.app;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.app.Fragment;
import android.support.annotation.RestrictTo;
@@ -22,7 +22,7 @@
* Fragment used by the background manager.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public final class BackgroundFragment extends Fragment {
private BackgroundManager mBackgroundManager;
diff --git a/v17/leanback/src/android/support/v17/leanback/app/GuidedStepFragment.java b/v17/leanback/src/android/support/v17/leanback/app/GuidedStepFragment.java
index db1bed5..da44fde 100644
--- a/v17/leanback/src/android/support/v17/leanback/app/GuidedStepFragment.java
+++ b/v17/leanback/src/android/support/v17/leanback/app/GuidedStepFragment.java
@@ -13,7 +13,7 @@
*/
package android.support.v17.leanback.app;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.animation.Animator;
import android.animation.AnimatorSet;
@@ -223,14 +223,14 @@
* Animation to slide the contents from the side (left/right).
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static final int SLIDE_FROM_SIDE = 0;
/**
* Animation to slide the contents from the bottom.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static final int SLIDE_FROM_BOTTOM = 1;
private static final String TAG = "GuidedStepFragment";
@@ -239,7 +239,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static class DummyFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -1319,7 +1319,7 @@
* For now clients(subclasses) can call this method inside the constructor.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setEntranceTransitionType(int transitionType) {
this.entranceTransitionType = transitionType;
}
diff --git a/v17/leanback/src/android/support/v17/leanback/app/GuidedStepSupportFragment.java b/v17/leanback/src/android/support/v17/leanback/app/GuidedStepSupportFragment.java
index 307c94b..32de1fd 100644
--- a/v17/leanback/src/android/support/v17/leanback/app/GuidedStepSupportFragment.java
+++ b/v17/leanback/src/android/support/v17/leanback/app/GuidedStepSupportFragment.java
@@ -16,7 +16,7 @@
*/
package android.support.v17.leanback.app;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.animation.Animator;
import android.animation.AnimatorSet;
@@ -226,14 +226,14 @@
* Animation to slide the contents from the side (left/right).
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static final int SLIDE_FROM_SIDE = 0;
/**
* Animation to slide the contents from the bottom.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static final int SLIDE_FROM_BOTTOM = 1;
private static final String TAG = "GuidedStepSupportFragment";
@@ -242,7 +242,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static class DummyFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -1322,7 +1322,7 @@
* For now clients(subclasses) can call this method inside the constructor.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setEntranceTransitionType(int transitionType) {
this.entranceTransitionType = transitionType;
}
diff --git a/v17/leanback/src/android/support/v17/leanback/app/PermissionHelper.java b/v17/leanback/src/android/support/v17/leanback/app/PermissionHelper.java
index e6edadb..c6630af 100644
--- a/v17/leanback/src/android/support/v17/leanback/app/PermissionHelper.java
+++ b/v17/leanback/src/android/support/v17/leanback/app/PermissionHelper.java
@@ -13,15 +13,15 @@
*/
package android.support.v17.leanback.app;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.os.Build;
import android.support.annotation.RestrictTo;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class PermissionHelper {
public static void requestPermissions(android.app.Fragment fragment, String[] permissions,
diff --git a/v17/leanback/src/android/support/v17/leanback/system/Settings.java b/v17/leanback/src/android/support/v17/leanback/system/Settings.java
index cdd2633..a723c84 100644
--- a/v17/leanback/src/android/support/v17/leanback/system/Settings.java
+++ b/v17/leanback/src/android/support/v17/leanback/system/Settings.java
@@ -16,7 +16,7 @@
package android.support.v17.leanback.system;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.content.Context;
import android.content.Intent;
@@ -69,7 +69,7 @@
* Returns true if static shadows are recommended.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean preferStaticShadows() {
return mPreferStaticShadows;
}
diff --git a/v17/leanback/src/android/support/v17/leanback/transition/LeanbackTransitionHelper.java b/v17/leanback/src/android/support/v17/leanback/transition/LeanbackTransitionHelper.java
index d4eecdb..2598969 100644
--- a/v17/leanback/src/android/support/v17/leanback/transition/LeanbackTransitionHelper.java
+++ b/v17/leanback/src/android/support/v17/leanback/transition/LeanbackTransitionHelper.java
@@ -13,23 +13,18 @@
*/
package android.support.v17.leanback.transition;
-import android.animation.AnimatorInflater;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.os.Build;
import android.support.annotation.RestrictTo;
import android.support.v17.leanback.R;
-import android.view.Gravity;
-import android.view.View;
-import android.view.animation.DecelerateInterpolator;
-import android.view.animation.Interpolator;
-
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
/**
* Helper class to load Leanback specific transition.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class LeanbackTransitionHelper {
interface LeanbackTransitionHelperVersion {
diff --git a/v17/leanback/src/android/support/v17/leanback/transition/ParallaxTransition.java b/v17/leanback/src/android/support/v17/leanback/transition/ParallaxTransition.java
index 036a7cd..03af625 100644
--- a/v17/leanback/src/android/support/v17/leanback/transition/ParallaxTransition.java
+++ b/v17/leanback/src/android/support/v17/leanback/transition/ParallaxTransition.java
@@ -16,7 +16,7 @@
package android.support.v17.leanback.transition;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.animation.Animator;
import android.animation.ValueAnimator;
@@ -44,7 +44,7 @@
*/
@RequiresApi(21)
@TargetApi(21)
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ParallaxTransition extends Visibility {
static Interpolator sInterpolator = new LinearInterpolator();
diff --git a/v17/leanback/src/android/support/v17/leanback/transition/TransitionHelper.java b/v17/leanback/src/android/support/v17/leanback/transition/TransitionHelper.java
index 627b350..bef3d8d 100644
--- a/v17/leanback/src/android/support/v17/leanback/transition/TransitionHelper.java
+++ b/v17/leanback/src/android/support/v17/leanback/transition/TransitionHelper.java
@@ -13,7 +13,7 @@
*/
package android.support.v17.leanback.transition;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.content.Context;
import android.os.Build;
@@ -29,7 +29,7 @@
* Helper for view transitions.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public final class TransitionHelper {
public static final int FADE_IN = 0x1;
diff --git a/v17/leanback/src/android/support/v17/leanback/util/StateMachine.java b/v17/leanback/src/android/support/v17/leanback/util/StateMachine.java
index 18b2133..a00bbc5 100644
--- a/v17/leanback/src/android/support/v17/leanback/util/StateMachine.java
+++ b/v17/leanback/src/android/support/v17/leanback/util/StateMachine.java
@@ -13,6 +13,8 @@
*/
package android.support.v17.leanback.util;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.RestrictTo;
import java.util.ArrayList;
@@ -20,8 +22,6 @@
import java.util.Iterator;
import java.util.Map;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Linear or DAG of {@link State}s. StateMachine is by default a linear model, until
* {@link #addState(State, State)} is called. Each State has three status:
@@ -31,7 +31,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public final class StateMachine {
/**
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/BackgroundHelper.java b/v17/leanback/src/android/support/v17/leanback/widget/BackgroundHelper.java
index e9e1581..62d94d2 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/BackgroundHelper.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/BackgroundHelper.java
@@ -15,20 +15,19 @@
*/
package android.support.v17.leanback.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.RestrictTo;
-import android.support.v17.leanback.widget.BackgroundHelperKitkat;
import android.view.View;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Helper for view backgrounds.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public final class BackgroundHelper {
final static BackgroundHelperVersionImpl sImpl;
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/BaseGridView.java b/v17/leanback/src/android/support/v17/leanback/widget/BaseGridView.java
index 4e51895..2d007e8 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/BaseGridView.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/BaseGridView.java
@@ -13,7 +13,7 @@
*/
package android.support.v17.leanback.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.content.Context;
import android.content.res.TypedArray;
@@ -35,7 +35,7 @@
* Do not directly use this class, use {@link VerticalGridView} and {@link HorizontalGridView}.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
abstract class BaseGridView extends RecyclerView {
/**
@@ -983,7 +983,7 @@
* Must be bigger or equals to 0.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setExtraLayoutSpace(int extraLayoutSpace) {
mLayoutManager.setExtraLayoutSpace(extraLayoutSpace);
}
@@ -993,7 +993,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public int getExtraLayoutSpace() {
return mLayoutManager.getExtraLayoutSpace();
}
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/BrowseRowsFrameLayout.java b/v17/leanback/src/android/support/v17/leanback/widget/BrowseRowsFrameLayout.java
index ec42537..9c65bd1 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/BrowseRowsFrameLayout.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/BrowseRowsFrameLayout.java
@@ -13,21 +13,21 @@
*/
package android.support.v17.leanback.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.util.AttributeSet;
import android.view.View;
import android.widget.FrameLayout;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Customized FrameLayout excludes margin of child from calculating the child size.
* So we can change left margin of rows while keep the width of rows unchanged without
* using hardcoded DIPS.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class BrowseRowsFrameLayout extends FrameLayout {
public BrowseRowsFrameLayout(Context context) {
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/DividerPresenter.java b/v17/leanback/src/android/support/v17/leanback/widget/DividerPresenter.java
index 44a2578..42da2ff 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/DividerPresenter.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/DividerPresenter.java
@@ -13,15 +13,13 @@
*/
package android.support.v17.leanback.widget;
-import android.graphics.Paint;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.RestrictTo;
import android.support.v17.leanback.R;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.TextView;
-
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
/**
* DividerPresenter provides a default presentation for {@link DividerRow} in HeadersFragment.
@@ -37,7 +35,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public DividerPresenter(int layoutResourceId) {
mLayoutResourceId = layoutResourceId;
}
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/FocusHighlightHandler.java b/v17/leanback/src/android/support/v17/leanback/widget/FocusHighlightHandler.java
index 9e11a4c..83c248a 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/FocusHighlightHandler.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/FocusHighlightHandler.java
@@ -13,11 +13,11 @@
*/
package android.support.v17.leanback.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.RestrictTo;
import android.view.View;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Interface for highlighting the item that has focus.
*/
@@ -29,7 +29,7 @@
* @param view The view whose focus is changing.
* @param hasFocus True if focus is gained; false otherwise.
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
void onItemFocused(View view, boolean hasFocus);
/**
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/FocusHighlightHelper.java b/v17/leanback/src/android/support/v17/leanback/widget/FocusHighlightHelper.java
index 0990327..641bfcc 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/FocusHighlightHelper.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/FocusHighlightHelper.java
@@ -13,18 +13,19 @@
*/
package android.support.v17.leanback.widget;
+import static android.support.v17.leanback.widget.FocusHighlight.ZOOM_FACTOR_LARGE;
+import static android.support.v17.leanback.widget.FocusHighlight.ZOOM_FACTOR_MEDIUM;
+import static android.support.v17.leanback.widget.FocusHighlight.ZOOM_FACTOR_NONE;
+import static android.support.v17.leanback.widget.FocusHighlight.ZOOM_FACTOR_SMALL;
+import static android.support.v17.leanback.widget.FocusHighlight.ZOOM_FACTOR_XSMALL;
+
+import android.animation.TimeAnimator;
+import android.content.res.Resources;
import android.support.v17.leanback.R;
import android.support.v17.leanback.graphics.ColorOverlayDimmer;
import android.view.View;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.Interpolator;
-import android.animation.TimeAnimator;
-import android.content.res.Resources;
-import static android.support.v17.leanback.widget.FocusHighlight.ZOOM_FACTOR_NONE;
-import static android.support.v17.leanback.widget.FocusHighlight.ZOOM_FACTOR_SMALL;
-import static android.support.v17.leanback.widget.FocusHighlight.ZOOM_FACTOR_XSMALL;
-import static android.support.v17.leanback.widget.FocusHighlight.ZOOM_FACTOR_MEDIUM;
-import static android.support.v17.leanback.widget.FocusHighlight.ZOOM_FACTOR_LARGE;
/**
* Sets up the highlighting behavior when an item gains focus.
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionAdapter.java b/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionAdapter.java
index 66335f4..ca6ee77 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionAdapter.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionAdapter.java
@@ -13,7 +13,7 @@
*/
package android.support.v17.leanback.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.support.annotation.RestrictTo;
import android.support.v7.widget.RecyclerView;
@@ -38,7 +38,7 @@
* {@link GuidedActionAdapter.ClickListener} and {@link GuidedActionAdapter.FocusListener}.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class GuidedActionAdapter extends RecyclerView.Adapter {
static final String TAG = "GuidedActionAdapter";
static final boolean DEBUG = false;
@@ -210,7 +210,7 @@
* Used for serialization only.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public List<GuidedAction> getActions() {
return new ArrayList<GuidedAction>(mActions);
}
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionAdapterGroup.java b/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionAdapterGroup.java
index 075232a..287ae3b 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionAdapterGroup.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionAdapterGroup.java
@@ -13,30 +13,25 @@
*/
package android.support.v17.leanback.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.support.annotation.RestrictTo;
-import android.support.v17.leanback.widget.GuidedActionAdapter.ClickListener;
import android.support.v17.leanback.widget.GuidedActionAdapter.EditListener;
import android.util.Log;
import android.util.Pair;
-import android.view.KeyEvent;
import android.view.View;
-import android.view.ViewParent;
import android.view.inputmethod.InputMethodManager;
-import android.widget.EditText;
import android.widget.TextView;
-import android.widget.TextView.OnEditorActionListener;
import java.util.ArrayList;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Internal implementation manages a group of GuidedActionAdapters, control the next action after
* editing finished, maintain the Ime open/close status.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class GuidedActionAdapterGroup {
private static final String TAG_EDIT = "EditableAction";
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionItemContainer.java b/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionItemContainer.java
index f00b870..bbb0865 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionItemContainer.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionItemContainer.java
@@ -14,12 +14,8 @@
package android.support.v17.leanback.widget;
import android.content.Context;
-import android.support.annotation.RestrictTo;
import android.util.AttributeSet;
import android.view.View;
-import android.view.ViewParent;
-
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
/**
* Root view of GuidedAction item, it supports a foreground drawable and can disable focus out
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionsStylist.java b/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionsStylist.java
index faf537d..a03408d 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionsStylist.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/GuidedActionsStylist.java
@@ -13,7 +13,7 @@
*/
package android.support.v17.leanback.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import static android.support.v17.leanback.widget.GuidedAction.EDITING_ACTIVATOR_VIEW;
import static android.support.v17.leanback.widget.GuidedAction.EDITING_DESCRIPTION;
import static android.support.v17.leanback.widget.GuidedAction.EDITING_NONE;
@@ -945,7 +945,7 @@
* Sets listener for reporting view being edited.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setEditListener(EditListener listener) {
mEditListener = listener;
}
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/InvisibleRowPresenter.java b/v17/leanback/src/android/support/v17/leanback/widget/InvisibleRowPresenter.java
index 2b5c7f0..bf898c2 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/InvisibleRowPresenter.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/InvisibleRowPresenter.java
@@ -13,17 +13,16 @@
*/
package android.support.v17.leanback.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.RestrictTo;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
-import android.widget.TextView;
-
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class InvisibleRowPresenter extends RowPresenter {
public InvisibleRowPresenter() {
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/MediaNowPlayingView.java b/v17/leanback/src/android/support/v17/leanback/widget/MediaNowPlayingView.java
index 901ff55..88ae7d3 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/MediaNowPlayingView.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/MediaNowPlayingView.java
@@ -13,7 +13,7 @@
*/
package android.support.v17.leanback.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.animation.Animator;
import android.animation.ObjectAnimator;
@@ -32,7 +32,7 @@
* The view displaying 3 animated peak meters next to each other when a media item is playing.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class MediaNowPlayingView extends LinearLayout{
private final ImageView mImage1;
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/PagingIndicator.java b/v17/leanback/src/android/support/v17/leanback/widget/PagingIndicator.java
index ea39399..b0bdacd 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/PagingIndicator.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/PagingIndicator.java
@@ -16,7 +16,7 @@
package android.support.v17.leanback.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.animation.Animator;
import android.animation.AnimatorSet;
@@ -45,7 +45,7 @@
* A page indicator with dots.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class PagingIndicator extends View {
private static final long DURATION_ALPHA = 167;
private static final long DURATION_DIAMETER = 417;
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/RowHeaderPresenter.java b/v17/leanback/src/android/support/v17/leanback/widget/RowHeaderPresenter.java
index c3a2cce..66dc12d 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/RowHeaderPresenter.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/RowHeaderPresenter.java
@@ -13,7 +13,7 @@
*/
package android.support.v17.leanback.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.graphics.Paint;
import android.support.annotation.RestrictTo;
@@ -42,7 +42,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public RowHeaderPresenter(int layoutResourceId) {
this(layoutResourceId, true);
}
@@ -50,7 +50,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public RowHeaderPresenter(int layoutResourceId, boolean animateSelect) {
mLayoutResourceId = layoutResourceId;
mAnimateSelect = animateSelect;
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/ScaleFrameLayout.java b/v17/leanback/src/android/support/v17/leanback/widget/ScaleFrameLayout.java
index 047d83c..c394272 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/ScaleFrameLayout.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/ScaleFrameLayout.java
@@ -13,7 +13,7 @@
*/
package android.support.v17.leanback.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.content.Context;
import android.graphics.drawable.Drawable;
@@ -28,7 +28,7 @@
* Subclass of FrameLayout that support scale layout area size for children.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ScaleFrameLayout extends FrameLayout {
private static final int DEFAULT_CHILD_GRAVITY = Gravity.TOP | Gravity.START;
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/Util.java b/v17/leanback/src/android/support/v17/leanback/widget/Util.java
index 544e18f..7e89ea6 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/Util.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/Util.java
@@ -13,17 +13,17 @@
*/
package android.support.v17.leanback.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.RestrictTo;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class Util {
/**
diff --git a/v17/leanback/src/android/support/v17/leanback/widget/picker/DatePicker.java b/v17/leanback/src/android/support/v17/leanback/widget/picker/DatePicker.java
index 8000f5f..31863a9 100644
--- a/v17/leanback/src/android/support/v17/leanback/widget/picker/DatePicker.java
+++ b/v17/leanback/src/android/support/v17/leanback/widget/picker/DatePicker.java
@@ -14,6 +14,8 @@
package android.support.v17.leanback.widget.picker;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.support.annotation.RestrictTo;
@@ -30,8 +32,6 @@
import java.util.Locale;
import java.util.TimeZone;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* {@link DatePicker} is a directly subclass of {@link Picker}.
* This class is a widget for selecting a date. The date can be selected by a
@@ -44,7 +44,7 @@
* @attr ref R.styleable#lbDatePicker_datePickerFormat
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class DatePicker extends Picker {
static final String LOG_TAG = "DatePicker";
diff --git a/v17/preference-leanback/api21/android/support/v17/internal/widget/OutlineOnlyWithChildrenFrameLayout.java b/v17/preference-leanback/api21/android/support/v17/internal/widget/OutlineOnlyWithChildrenFrameLayout.java
index 1054949..893af77 100644
--- a/v17/preference-leanback/api21/android/support/v17/internal/widget/OutlineOnlyWithChildrenFrameLayout.java
+++ b/v17/preference-leanback/api21/android/support/v17/internal/widget/OutlineOnlyWithChildrenFrameLayout.java
@@ -16,6 +16,8 @@
package android.support.v17.internal.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Outline;
@@ -26,8 +28,6 @@
import android.view.ViewOutlineProvider;
import android.widget.FrameLayout;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* {@link FrameLayout} subclass that provides an outline only when it has children, so that it does
* not cast a shadow when empty.
@@ -36,7 +36,7 @@
*/
@RequiresApi(21)
@TargetApi(21)
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class OutlineOnlyWithChildrenFrameLayout extends FrameLayout {
private ViewOutlineProvider mMagicalOutlineProvider;
diff --git a/v17/preference-leanback/api21/android/support/v17/preference/LeanbackPreferenceFragmentTransitionHelperApi21.java b/v17/preference-leanback/api21/android/support/v17/preference/LeanbackPreferenceFragmentTransitionHelperApi21.java
index 1b320a5..e258686 100644
--- a/v17/preference-leanback/api21/android/support/v17/preference/LeanbackPreferenceFragmentTransitionHelperApi21.java
+++ b/v17/preference-leanback/api21/android/support/v17/preference/LeanbackPreferenceFragmentTransitionHelperApi21.java
@@ -16,22 +16,22 @@
package android.support.v17.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
+import android.app.Fragment;
import android.support.annotation.RequiresApi;
import android.support.annotation.RestrictTo;
import android.support.v17.leanback.transition.FadeAndShortSlide;
-import android.app.Fragment;
import android.transition.Transition;
import android.view.Gravity;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
@RequiresApi(21)
@TargetApi(21)
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class LeanbackPreferenceFragmentTransitionHelperApi21 {
public static void addTransitions(Fragment f) {
diff --git a/v17/preference-leanback/src/android/support/v17/preference/BaseLeanbackPreferenceFragment.java b/v17/preference-leanback/src/android/support/v17/preference/BaseLeanbackPreferenceFragment.java
index 29d1ed9..15db3d6 100644
--- a/v17/preference-leanback/src/android/support/v17/preference/BaseLeanbackPreferenceFragment.java
+++ b/v17/preference-leanback/src/android/support/v17/preference/BaseLeanbackPreferenceFragment.java
@@ -16,6 +16,8 @@
package android.support.v17.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.RestrictTo;
@@ -26,8 +28,6 @@
import android.view.LayoutInflater;
import android.view.ViewGroup;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* This fragment provides a preference fragment with leanback-style behavior, suitable for
* embedding into broader UI elements.
@@ -49,7 +49,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public Fragment getCallbackFragment() {
return getParentFragment();
diff --git a/v17/preference-leanback/src/android/support/v17/preference/LeanbackSettingsFragment.java b/v17/preference-leanback/src/android/support/v17/preference/LeanbackSettingsFragment.java
index a9b7788..cac02b7 100644
--- a/v17/preference-leanback/src/android/support/v17/preference/LeanbackSettingsFragment.java
+++ b/v17/preference-leanback/src/android/support/v17/preference/LeanbackSettingsFragment.java
@@ -16,6 +16,8 @@
package android.support.v17.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.os.Build;
@@ -34,8 +36,6 @@
import android.view.ViewGroup;
import android.widget.Space;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* This fragment provides a container for displaying a {@link LeanbackPreferenceFragment}
*
@@ -188,7 +188,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static class DummyFragment extends Fragment {
@Override
diff --git a/v17/preference-leanback/src/android/support/v17/preference/LeanbackSettingsRootView.java b/v17/preference-leanback/src/android/support/v17/preference/LeanbackSettingsRootView.java
index 463ed08..fa221e6 100644
--- a/v17/preference-leanback/src/android/support/v17/preference/LeanbackSettingsRootView.java
+++ b/v17/preference-leanback/src/android/support/v17/preference/LeanbackSettingsRootView.java
@@ -16,6 +16,8 @@
package android.support.v17.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.RestrictTo;
@@ -23,12 +25,10 @@
import android.view.KeyEvent;
import android.widget.FrameLayout;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class LeanbackSettingsRootView extends FrameLayout {
private OnKeyListener mOnBackKeyListener;
diff --git a/v7/appcompat/src/android/support/v7/app/ActionBar.java b/v7/appcompat/src/android/support/v7/app/ActionBar.java
index 4e63b74..e26e813 100644
--- a/v7/appcompat/src/android/support/v7/app/ActionBar.java
+++ b/v7/appcompat/src/android/support/v7/app/ActionBar.java
@@ -16,6 +16,8 @@
package android.support.v7.app;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.TypedArray;
@@ -42,8 +44,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A primary toolbar within the activity that may display the activity title, application-level
* navigation affordances, and other interactive items.
@@ -91,7 +91,7 @@
public abstract class ActionBar {
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Retention(RetentionPolicy.SOURCE)
@IntDef({NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
public @interface NavigationMode {}
@@ -136,7 +136,7 @@
public static final int NAVIGATION_MODE_TABS = 2;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef(flag=true, value={
DISPLAY_USE_LOGO,
DISPLAY_SHOW_HOME,
@@ -865,7 +865,7 @@
* @return true if the Title field has been truncated
* @hide pending API approval
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean isTitleTruncated() { return false; }
/**
@@ -1036,63 +1036,63 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setDefaultDisplayHomeAsUpEnabled(boolean enabled) {
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setShowHideAnimationEnabled(boolean enabled) {
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void onConfigurationChanged(Configuration config) {
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void dispatchMenuVisibilityChanged(boolean visible) {
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public ActionMode startActionMode(ActionMode.Callback callback) {
return null;
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean openOptionsMenu() {
return false;
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean invalidateOptionsMenu() {
return false;
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean onMenuKeyEvent(KeyEvent event) {
return false;
}
/** @hide **/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean onKeyShortcut(int keyCode, KeyEvent ev) {
return false;
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean collapseActionView() {
return false;
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setWindowTitle(CharSequence title) {
}
diff --git a/v7/appcompat/src/android/support/v7/app/AlertDialog.java b/v7/appcompat/src/android/support/v7/app/AlertDialog.java
index e9bec36..529a10c 100644
--- a/v7/appcompat/src/android/support/v7/app/AlertDialog.java
+++ b/v7/appcompat/src/android/support/v7/app/AlertDialog.java
@@ -16,6 +16,8 @@
package android.support.v7.app;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
@@ -36,14 +38,11 @@
import android.view.ContextThemeWrapper;
import android.view.KeyEvent;
import android.view.View;
-import android.view.WindowManager;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.ListAdapter;
import android.widget.ListView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A subclass of Dialog that can display one, two or three buttons. If you only want to
* display a String in this dialog box, use the setMessage() method. If you
@@ -56,8 +55,8 @@
* </pre>
*
* <p>The AlertDialog class takes care of automatically setting
- * {@link WindowManager.LayoutParams#FLAG_ALT_FOCUSABLE_IM
- * WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM} for you based on whether
+ * {@link android.view.WindowManager.LayoutParams#FLAG_ALT_FOCUSABLE_IM
+ * android.view.WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM} for you based on whether
* any views in the dialog return true from {@link View#onCheckIsTextEditor()
* View.onCheckIsTextEditor()}. Generally you want this set for a Dialog
* without text editors, so that it will be placed on top of the current
@@ -876,7 +875,7 @@
* be able to put padding around the view.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Deprecated
public Builder setView(View view, int viewSpacingLeft, int viewSpacingTop,
int viewSpacingRight, int viewSpacingBottom) {
@@ -909,7 +908,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public Builder setRecycleOnMeasureEnabled(boolean enabled) {
P.mRecycleOnMeasure = enabled;
return this;
diff --git a/v7/appcompat/src/android/support/v7/app/AppCompatActivity.java b/v7/appcompat/src/android/support/v7/app/AppCompatActivity.java
index 35e5ddc..89a6bdb 100644
--- a/v7/appcompat/src/android/support/v7/app/AppCompatActivity.java
+++ b/v7/appcompat/src/android/support/v7/app/AppCompatActivity.java
@@ -16,6 +16,8 @@
package android.support.v7.app;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -43,8 +45,6 @@
import android.view.View;
import android.view.ViewGroup;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Base class for activities that use the
* <a href="{@docRoot}tools/extras/support-library.html">support library</a> action bar features.
@@ -245,7 +245,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void invalidateOptionsMenu() {
getDelegate().invalidateOptionsMenu();
}
diff --git a/v7/appcompat/src/android/support/v7/app/AppCompatDelegate.java b/v7/appcompat/src/android/support/v7/app/AppCompatDelegate.java
index 606fcba..7349b09 100644
--- a/v7/appcompat/src/android/support/v7/app/AppCompatDelegate.java
+++ b/v7/appcompat/src/android/support/v7/app/AppCompatDelegate.java
@@ -16,6 +16,8 @@
package android.support.v7.app;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
@@ -44,8 +46,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* This class represents a delegate which you can use to extend AppCompat's support to any
* {@link android.app.Activity}.
@@ -133,7 +133,7 @@
private static boolean sCompatVectorFromResourcesEnabled = false;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({MODE_NIGHT_NO, MODE_NIGHT_YES, MODE_NIGHT_AUTO, MODE_NIGHT_FOLLOW_SYSTEM,
MODE_NIGHT_UNSPECIFIED})
@Retention(RetentionPolicy.SOURCE)
diff --git a/v7/appcompat/src/android/support/v7/app/AppCompatDialog.java b/v7/appcompat/src/android/support/v7/app/AppCompatDialog.java
index 89a9368..dd0a4a5 100644
--- a/v7/appcompat/src/android/support/v7/app/AppCompatDialog.java
+++ b/v7/appcompat/src/android/support/v7/app/AppCompatDialog.java
@@ -16,6 +16,8 @@
package android.support.v7.app;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
@@ -29,8 +31,6 @@
import android.view.View;
import android.view.ViewGroup;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Base class for AppCompat themed {@link android.app.Dialog}s.
*/
@@ -143,7 +143,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void invalidateOptionsMenu() {
getDelegate().invalidateOptionsMenu();
}
diff --git a/v7/appcompat/src/android/support/v7/app/AppCompatDialogFragment.java b/v7/appcompat/src/android/support/v7/app/AppCompatDialogFragment.java
index dcccfad..bdf222a 100644
--- a/v7/appcompat/src/android/support/v7/app/AppCompatDialogFragment.java
+++ b/v7/appcompat/src/android/support/v7/app/AppCompatDialogFragment.java
@@ -17,6 +17,8 @@
package android.support.v7.app;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.app.Dialog;
import android.os.Bundle;
import android.support.annotation.RestrictTo;
@@ -24,8 +26,6 @@
import android.view.Window;
import android.view.WindowManager;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A special version of {@link DialogFragment} which uses an {@link AppCompatDialog} in place of a
* platform-styled dialog.
@@ -40,7 +40,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setupDialog(Dialog dialog, int style) {
if (dialog instanceof AppCompatDialog) {
diff --git a/v7/appcompat/src/android/support/v7/app/NotificationCompat.java b/v7/appcompat/src/android/support/v7/app/NotificationCompat.java
index d1c3f45..bd72879 100644
--- a/v7/appcompat/src/android/support/v7/app/NotificationCompat.java
+++ b/v7/appcompat/src/android/support/v7/app/NotificationCompat.java
@@ -16,7 +16,7 @@
package android.support.v7.app;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.annotation.TargetApi;
import android.app.Notification;
@@ -397,7 +397,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
protected CharSequence resolveText() {
if (mStyle instanceof MessagingStyle) {
@@ -417,7 +417,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
protected CharSequence resolveTitle() {
if (mStyle instanceof MessagingStyle) {
@@ -434,7 +434,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
protected BuilderExtender getExtender() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
diff --git a/v7/appcompat/src/android/support/v7/app/WindowDecorActionBar.java b/v7/appcompat/src/android/support/v7/app/WindowDecorActionBar.java
index 0279cb0..2f7eba3 100644
--- a/v7/appcompat/src/android/support/v7/app/WindowDecorActionBar.java
+++ b/v7/appcompat/src/android/support/v7/app/WindowDecorActionBar.java
@@ -16,6 +16,8 @@
package android.support.v7.app;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
@@ -66,15 +68,13 @@
import java.lang.ref.WeakReference;
import java.util.ArrayList;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* WindowDecorActionBar is the ActionBar implementation used
* by devices of all screen sizes as part of the window decor layout.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class WindowDecorActionBar extends ActionBar implements
ActionBarOverlayLayout.ActionBarVisibilityCallback {
private static final String TAG = "WindowDecorActionBar";
@@ -188,7 +188,7 @@
* Only for edit mode.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public WindowDecorActionBar(View layout) {
assert layout.isInEditMode();
init(layout);
@@ -961,7 +961,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public class ActionModeImpl extends ActionMode implements MenuBuilder.Callback {
private final Context mActionModeContext;
private final MenuBuilder mMenu;
@@ -1135,7 +1135,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public class TabImpl extends ActionBar.Tab {
private ActionBar.TabListener mCallback;
private Object mTag;
diff --git a/v7/appcompat/src/android/support/v7/graphics/drawable/DrawableWrapper.java b/v7/appcompat/src/android/support/v7/graphics/drawable/DrawableWrapper.java
index adef493..3878943 100644
--- a/v7/appcompat/src/android/support/v7/graphics/drawable/DrawableWrapper.java
+++ b/v7/appcompat/src/android/support/v7/graphics/drawable/DrawableWrapper.java
@@ -16,6 +16,8 @@
package android.support.v7.graphics.drawable;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.res.ColorStateList;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
@@ -27,8 +29,6 @@
import android.support.v4.graphics.drawable.DrawableCompat;
import android.view.View;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Drawable which delegates all calls to it's wrapped {@link Drawable}.
* <p>
@@ -37,7 +37,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class DrawableWrapper extends Drawable implements Drawable.Callback {
private Drawable mDrawable;
diff --git a/v7/appcompat/src/android/support/v7/graphics/drawable/DrawerArrowDrawable.java b/v7/appcompat/src/android/support/v7/graphics/drawable/DrawerArrowDrawable.java
index e9af7b1..07a61c7 100644
--- a/v7/appcompat/src/android/support/v7/graphics/drawable/DrawerArrowDrawable.java
+++ b/v7/appcompat/src/android/support/v7/graphics/drawable/DrawerArrowDrawable.java
@@ -16,6 +16,8 @@
package android.support.v7.graphics.drawable;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -36,8 +38,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A drawable that can draw a "Drawer hamburger" menu or an arrow and animate between them.
* <p>
@@ -87,7 +87,7 @@
public static final int ARROW_DIRECTION_END = 3;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({ARROW_DIRECTION_LEFT, ARROW_DIRECTION_RIGHT,
ARROW_DIRECTION_START, ARROW_DIRECTION_END})
@Retention(RetentionPolicy.SOURCE)
diff --git a/v7/appcompat/src/android/support/v7/text/AllCapsTransformationMethod.java b/v7/appcompat/src/android/support/v7/text/AllCapsTransformationMethod.java
index 73f02e2..1f670a5 100644
--- a/v7/appcompat/src/android/support/v7/text/AllCapsTransformationMethod.java
+++ b/v7/appcompat/src/android/support/v7/text/AllCapsTransformationMethod.java
@@ -16,6 +16,8 @@
package android.support.v7.text;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.graphics.Rect;
import android.support.annotation.RestrictTo;
@@ -24,12 +26,10 @@
import java.util.Locale;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class AllCapsTransformationMethod implements TransformationMethod {
private Locale mLocale;
diff --git a/v7/appcompat/src/android/support/v7/transition/ActionBarTransition.java b/v7/appcompat/src/android/support/v7/transition/ActionBarTransition.java
index 8df2796..4deaeff 100644
--- a/v7/appcompat/src/android/support/v7/transition/ActionBarTransition.java
+++ b/v7/appcompat/src/android/support/v7/transition/ActionBarTransition.java
@@ -17,15 +17,15 @@
package android.support.v7.transition;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.RestrictTo;
import android.view.ViewGroup;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ActionBarTransition {
private static final boolean TRANSITIONS_ENABLED = false;
diff --git a/v7/appcompat/src/android/support/v7/view/ActionBarPolicy.java b/v7/appcompat/src/android/support/v7/view/ActionBarPolicy.java
index e8415ac..7cd7d24 100644
--- a/v7/appcompat/src/android/support/v7/view/ActionBarPolicy.java
+++ b/v7/appcompat/src/android/support/v7/view/ActionBarPolicy.java
@@ -16,8 +16,9 @@
package android.support.v7.view;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
-import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.os.Build;
@@ -25,18 +26,15 @@
import android.support.v4.content.res.ConfigurationHelper;
import android.support.v4.view.ViewConfigurationCompat;
import android.support.v7.appcompat.R;
-import android.util.DisplayMetrics;
import android.view.ViewConfiguration;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Allows components to query for various configuration policy decisions about how the action bar
* should lay out and behave on the current device.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ActionBarPolicy {
private Context mContext;
diff --git a/v7/appcompat/src/android/support/v7/view/ActionMode.java b/v7/appcompat/src/android/support/v7/view/ActionMode.java
index 50fae7e..55d02b8 100644
--- a/v7/appcompat/src/android/support/v7/view/ActionMode.java
+++ b/v7/appcompat/src/android/support/v7/view/ActionMode.java
@@ -16,14 +16,14 @@
package android.support.v7.view;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.RestrictTo;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Represents a contextual mode of the user interface. Action modes can be used to provide
* alternative interaction modes and replace parts of the normal UI until finished.
@@ -219,7 +219,7 @@
* @return true if the UI used to show this action mode can take focus
* @hide Internal use only
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean isUiFocusable() {
return true;
}
diff --git a/v7/appcompat/src/android/support/v7/view/ContextThemeWrapper.java b/v7/appcompat/src/android/support/v7/view/ContextThemeWrapper.java
index 1fd0e61..44c0478 100644
--- a/v7/appcompat/src/android/support/v7/view/ContextThemeWrapper.java
+++ b/v7/appcompat/src/android/support/v7/view/ContextThemeWrapper.java
@@ -16,6 +16,8 @@
package android.support.v7.view;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.ContextWrapper;
import android.content.res.AssetManager;
@@ -25,15 +27,13 @@
import android.support.v7.appcompat.R;
import android.view.LayoutInflater;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A ContextWrapper that allows you to modify the theme from what is in the
* wrapped context.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ContextThemeWrapper extends ContextWrapper {
private int mThemeResource;
private Resources.Theme mTheme;
diff --git a/v7/appcompat/src/android/support/v7/view/StandaloneActionMode.java b/v7/appcompat/src/android/support/v7/view/StandaloneActionMode.java
index d328de8..d1bb05b 100644
--- a/v7/appcompat/src/android/support/v7/view/StandaloneActionMode.java
+++ b/v7/appcompat/src/android/support/v7/view/StandaloneActionMode.java
@@ -15,6 +15,8 @@
*/
package android.support.v7.view;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.support.v4.view.MenuItemCompat;
@@ -30,12 +32,10 @@
import java.lang.ref.WeakReference;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class StandaloneActionMode extends ActionMode implements MenuBuilder.Callback {
private Context mContext;
private ActionBarContextView mContextView;
diff --git a/v7/appcompat/src/android/support/v7/view/SupportActionModeWrapper.java b/v7/appcompat/src/android/support/v7/view/SupportActionModeWrapper.java
index ddbfacb..ff929ba 100644
--- a/v7/appcompat/src/android/support/v7/view/SupportActionModeWrapper.java
+++ b/v7/appcompat/src/android/support/v7/view/SupportActionModeWrapper.java
@@ -16,6 +16,8 @@
package android.support.v7.view;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
@@ -31,15 +33,13 @@
import java.util.ArrayList;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Wraps a support {@link android.support.v7.view.ActionMode} as a framework
* {@link android.view.ActionMode}.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public class SupportActionModeWrapper extends ActionMode {
@@ -140,7 +140,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static class CallbackWrapper implements android.support.v7.view.ActionMode.Callback {
final Callback mWrappedCallback;
final Context mContext;
diff --git a/v7/appcompat/src/android/support/v7/view/SupportMenuInflater.java b/v7/appcompat/src/android/support/v7/view/SupportMenuInflater.java
index c11bb77..4f71d02 100644
--- a/v7/appcompat/src/android/support/v7/view/SupportMenuInflater.java
+++ b/v7/appcompat/src/android/support/v7/view/SupportMenuInflater.java
@@ -16,8 +16,7 @@
package android.support.v7.view;
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.app.Activity;
import android.content.Context;
@@ -41,12 +40,13 @@
import android.view.SubMenu;
import android.view.View;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* This class is used to instantiate menu XML files into Menu objects.
* <p>
@@ -58,7 +58,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class SupportMenuInflater extends MenuInflater {
static final String LOG_TAG = "SupportMenuInflater";
diff --git a/v7/appcompat/src/android/support/v7/view/ViewPropertyAnimatorCompatSet.java b/v7/appcompat/src/android/support/v7/view/ViewPropertyAnimatorCompatSet.java
index c5e9c72..735030e 100644
--- a/v7/appcompat/src/android/support/v7/view/ViewPropertyAnimatorCompatSet.java
+++ b/v7/appcompat/src/android/support/v7/view/ViewPropertyAnimatorCompatSet.java
@@ -16,6 +16,8 @@
package android.support.v7.view;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.RestrictTo;
import android.support.v4.view.ViewPropertyAnimatorCompat;
import android.support.v4.view.ViewPropertyAnimatorListener;
@@ -25,15 +27,13 @@
import java.util.ArrayList;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A very naive implementation of a set of
* {@link android.support.v4.view.ViewPropertyAnimatorCompat}.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ViewPropertyAnimatorCompatSet {
final ArrayList<ViewPropertyAnimatorCompat> mAnimators;
diff --git a/v7/appcompat/src/android/support/v7/view/WindowCallbackWrapper.java b/v7/appcompat/src/android/support/v7/view/WindowCallbackWrapper.java
index b05de9a..4fbdd50 100644
--- a/v7/appcompat/src/android/support/v7/view/WindowCallbackWrapper.java
+++ b/v7/appcompat/src/android/support/v7/view/WindowCallbackWrapper.java
@@ -16,6 +16,8 @@
package android.support.v7.view;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.support.annotation.RequiresApi;
import android.support.annotation.RestrictTo;
@@ -33,8 +35,6 @@
import java.util.List;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A simple decorator stub for Window.Callback that passes through any calls
* to the wrapped instance as a base implementation. Call super.foo() to call into
@@ -42,7 +42,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class WindowCallbackWrapper implements Window.Callback {
final Window.Callback mWrapped;
diff --git a/v7/appcompat/src/android/support/v7/view/menu/ActionMenuItem.java b/v7/appcompat/src/android/support/v7/view/menu/ActionMenuItem.java
index c62cd18..2d13a56 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/ActionMenuItem.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/ActionMenuItem.java
@@ -16,6 +16,8 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
@@ -29,12 +31,10 @@
import android.view.SubMenu;
import android.view.View;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ActionMenuItem implements SupportMenuItem {
private final int mId;
diff --git a/v7/appcompat/src/android/support/v7/view/menu/ActionMenuItemView.java b/v7/appcompat/src/android/support/v7/view/menu/ActionMenuItemView.java
index 2429ad4..77f5f17 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/ActionMenuItemView.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/ActionMenuItemView.java
@@ -16,13 +16,14 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
-import android.os.Build;
import android.os.Parcelable;
import android.support.annotation.RestrictTo;
import android.support.v4.content.res.ConfigurationHelper;
@@ -32,21 +33,17 @@
import android.support.v7.widget.ActionMenuView;
import android.support.v7.widget.AppCompatTextView;
import android.support.v7.widget.ForwardingListener;
-import android.support.v7.widget.ListPopupWindow;
import android.text.TextUtils;
import android.util.AttributeSet;
-import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Toast;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ActionMenuItemView extends AppCompatTextView
implements MenuView.ItemView, View.OnClickListener, View.OnLongClickListener,
ActionMenuView.ActionMenuChildView {
diff --git a/v7/appcompat/src/android/support/v7/view/menu/BaseMenuPresenter.java b/v7/appcompat/src/android/support/v7/view/menu/BaseMenuPresenter.java
index 0e3cf5b..1cf72c3 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/BaseMenuPresenter.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/BaseMenuPresenter.java
@@ -16,6 +16,8 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.support.v4.view.ViewCompat;
@@ -25,8 +27,6 @@
import java.util.ArrayList;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Base class for MenuPresenters that have a consistent container view and item views. Behaves
* similarly to an AdapterView in that existing item views will be reused if possible when items
@@ -34,7 +34,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public abstract class BaseMenuPresenter implements MenuPresenter {
protected Context mSystemContext;
diff --git a/v7/appcompat/src/android/support/v7/view/menu/ExpandedMenuView.java b/v7/appcompat/src/android/support/v7/view/menu/ExpandedMenuView.java
index 5b06be7..113d56b 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/ExpandedMenuView.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/ExpandedMenuView.java
@@ -16,6 +16,8 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.support.v7.view.menu.MenuBuilder.ItemInvoker;
@@ -26,15 +28,13 @@
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* The expanded menu view is a list-like menu with all of the available menu items. It is opened
* by the user clicking no the 'More' button on the icon menu view.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public final class ExpandedMenuView extends ListView
implements ItemInvoker, MenuView, OnItemClickListener {
diff --git a/v7/appcompat/src/android/support/v7/view/menu/ListMenuItemView.java b/v7/appcompat/src/android/support/v7/view/menu/ListMenuItemView.java
index 8498350..6a736aa 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/ListMenuItemView.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/ListMenuItemView.java
@@ -16,6 +16,8 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.annotation.RestrictTo;
@@ -33,14 +35,12 @@
import android.widget.RadioButton;
import android.widget.TextView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* The item view for each item in the ListView-based MenuViews.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ListMenuItemView extends LinearLayout implements MenuView.ItemView {
private static final String TAG = "ListMenuItemView";
private MenuItemImpl mItemData;
diff --git a/v7/appcompat/src/android/support/v7/view/menu/ListMenuPresenter.java b/v7/appcompat/src/android/support/v7/view/menu/ListMenuPresenter.java
index 580d7f9..41d5576 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/ListMenuPresenter.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/ListMenuPresenter.java
@@ -16,6 +16,8 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.os.Bundle;
import android.os.Parcelable;
@@ -32,14 +34,12 @@
import java.util.ArrayList;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* MenuPresenter for list-style menus.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ListMenuPresenter implements MenuPresenter, AdapterView.OnItemClickListener {
private static final String TAG = "ListMenuPresenter";
diff --git a/v7/appcompat/src/android/support/v7/view/menu/MenuAdapter.java b/v7/appcompat/src/android/support/v7/view/menu/MenuAdapter.java
index eba2d89..3d34a16 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/MenuAdapter.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/MenuAdapter.java
@@ -15,6 +15,8 @@
*/
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.RestrictTo;
import android.support.v7.appcompat.R;
import android.view.LayoutInflater;
@@ -24,12 +26,10 @@
import java.util.ArrayList;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class MenuAdapter extends BaseAdapter {
static final int ITEM_LAYOUT = R.layout.abc_popup_menu_item_layout;
diff --git a/v7/appcompat/src/android/support/v7/view/menu/MenuBuilder.java b/v7/appcompat/src/android/support/v7/view/menu/MenuBuilder.java
index cff87c5..714f801 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/MenuBuilder.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/MenuBuilder.java
@@ -16,7 +16,7 @@
package android.support.v7.view.menu;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.content.ComponentName;
import android.content.Context;
@@ -55,7 +55,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class MenuBuilder implements SupportMenu {
private static final String TAG = "MenuBuilder";
@@ -191,7 +191,7 @@
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public interface Callback {
/**
@@ -215,7 +215,7 @@
* Called by menu items to execute their associated action
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public interface ItemInvoker {
boolean invokeItem(MenuItemImpl item);
}
diff --git a/v7/appcompat/src/android/support/v7/view/menu/MenuItemImpl.java b/v7/appcompat/src/android/support/v7/view/menu/MenuItemImpl.java
index b6374db..f1b94b0 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/MenuItemImpl.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/MenuItemImpl.java
@@ -16,6 +16,8 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
@@ -35,12 +37,10 @@
import android.view.ViewDebug;
import android.widget.LinearLayout;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public final class MenuItemImpl implements SupportMenuItem {
private static final String TAG = "MenuItemImpl";
diff --git a/v7/appcompat/src/android/support/v7/view/menu/MenuItemWrapperICS.java b/v7/appcompat/src/android/support/v7/view/menu/MenuItemWrapperICS.java
index 649b253..4ba3c89 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/MenuItemWrapperICS.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/MenuItemWrapperICS.java
@@ -16,11 +16,12 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
-import android.os.Build;
import android.support.annotation.RequiresApi;
import android.support.annotation.RestrictTo;
import android.support.v4.internal.view.SupportMenuItem;
@@ -36,13 +37,11 @@
import java.lang.reflect.Method;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Wraps a support {@link SupportMenuItem} as a framework {@link android.view.MenuItem}
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
@TargetApi(14)
@RequiresApi(14)
public class MenuItemWrapperICS extends BaseMenuWrapper<SupportMenuItem> implements MenuItem {
diff --git a/v7/appcompat/src/android/support/v7/view/menu/MenuItemWrapperJB.java b/v7/appcompat/src/android/support/v7/view/menu/MenuItemWrapperJB.java
index fd6c141..07db707 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/MenuItemWrapperJB.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/MenuItemWrapperJB.java
@@ -16,9 +16,10 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.content.Context;
-import android.os.Build;
import android.support.annotation.RequiresApi;
import android.support.annotation.RestrictTo;
import android.support.v4.internal.view.SupportMenuItem;
@@ -26,13 +27,11 @@
import android.view.MenuItem;
import android.view.View;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Wraps a support {@link SupportMenuItem} as a framework {@link android.view.MenuItem}
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
@TargetApi(16)
@RequiresApi(16)
class MenuItemWrapperJB extends MenuItemWrapperICS {
diff --git a/v7/appcompat/src/android/support/v7/view/menu/MenuPopupHelper.java b/v7/appcompat/src/android/support/v7/view/menu/MenuPopupHelper.java
index dde4bb4..18642ec 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/MenuPopupHelper.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/MenuPopupHelper.java
@@ -16,6 +16,8 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.graphics.Point;
import android.graphics.Rect;
@@ -34,14 +36,12 @@
import android.view.WindowManager;
import android.widget.PopupWindow.OnDismissListener;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Presents a menu as a small, simple popup anchored to another view.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class MenuPopupHelper implements MenuHelper {
private static final int TOUCH_EPICENTER_SIZE_DP = 48;
diff --git a/v7/appcompat/src/android/support/v7/view/menu/MenuPresenter.java b/v7/appcompat/src/android/support/v7/view/menu/MenuPresenter.java
index b8cca24..35d6860 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/MenuPresenter.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/MenuPresenter.java
@@ -16,20 +16,20 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.os.Parcelable;
import android.support.annotation.RestrictTo;
import android.view.ViewGroup;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A MenuPresenter is responsible for building views for a Menu object. It takes over some
* responsibility from the old style monolithic MenuBuilder class.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface MenuPresenter {
/**
diff --git a/v7/appcompat/src/android/support/v7/view/menu/MenuView.java b/v7/appcompat/src/android/support/v7/view/menu/MenuView.java
index 9e542e4..2d2f027 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/MenuView.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/MenuView.java
@@ -16,18 +16,18 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.graphics.drawable.Drawable;
import android.support.annotation.RestrictTo;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Minimal interface for a menu view. {@link #initialize(MenuBuilder)} must be called for the
* menu to be functional.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface MenuView {
/**
* Initializes the menu to the given menu. This should be called after the
diff --git a/v7/appcompat/src/android/support/v7/view/menu/MenuWrapperFactory.java b/v7/appcompat/src/android/support/v7/view/menu/MenuWrapperFactory.java
index aa261aa..4bb9bca 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/MenuWrapperFactory.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/MenuWrapperFactory.java
@@ -16,6 +16,8 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.os.Build;
import android.support.annotation.RestrictTo;
@@ -26,12 +28,10 @@
import android.view.MenuItem;
import android.view.SubMenu;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public final class MenuWrapperFactory {
private MenuWrapperFactory() {
}
diff --git a/v7/appcompat/src/android/support/v7/view/menu/ShowableListMenu.java b/v7/appcompat/src/android/support/v7/view/menu/ShowableListMenu.java
index 49be9ec..40b7f4e 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/ShowableListMenu.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/ShowableListMenu.java
@@ -16,17 +16,17 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.RestrictTo;
import android.widget.ListView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A list menu which can be shown and hidden and which is internally represented by a ListView.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface ShowableListMenu {
void show();
diff --git a/v7/appcompat/src/android/support/v7/view/menu/SubMenuBuilder.java b/v7/appcompat/src/android/support/v7/view/menu/SubMenuBuilder.java
index f1d2980..fdd1b14 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/SubMenuBuilder.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/SubMenuBuilder.java
@@ -16,24 +16,23 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.annotation.RestrictTo;
-import android.support.v4.content.ContextCompat;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SubMenu;
import android.view.View;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* The model for a sub menu, which is an extension of the menu. Most methods are proxied to the
* parent menu.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class SubMenuBuilder extends MenuBuilder implements SubMenu {
private MenuBuilder mParentMenu;
private MenuItemImpl mItem;
diff --git a/v7/appcompat/src/android/support/v7/view/menu/SubMenuWrapperICS.java b/v7/appcompat/src/android/support/v7/view/menu/SubMenuWrapperICS.java
index 4952d5d..55245f6 100644
--- a/v7/appcompat/src/android/support/v7/view/menu/SubMenuWrapperICS.java
+++ b/v7/appcompat/src/android/support/v7/view/menu/SubMenuWrapperICS.java
@@ -16,6 +16,8 @@
package android.support.v7.view.menu;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.drawable.Drawable;
@@ -26,13 +28,11 @@
import android.view.SubMenu;
import android.view.View;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Wraps a support {@link SupportSubMenu} as a framework {@link android.view.SubMenu}
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
@RequiresApi(14)
@TargetApi(14)
class SubMenuWrapperICS extends MenuWrapperICS implements SubMenu {
diff --git a/v7/appcompat/src/android/support/v7/widget/ActionBarContainer.java b/v7/appcompat/src/android/support/v7/widget/ActionBarContainer.java
index abac33e..de4484c 100644
--- a/v7/appcompat/src/android/support/v7/widget/ActionBarContainer.java
+++ b/v7/appcompat/src/android/support/v7/widget/ActionBarContainer.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
@@ -23,21 +25,18 @@
import android.support.annotation.RestrictTo;
import android.support.v4.view.ViewCompat;
import android.support.v7.appcompat.R;
-import android.support.v7.view.ActionMode;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* This class acts as a container for the action bar view and action mode context views.
* It applies special styles as needed to help handle animated transitions between them.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ActionBarContainer extends FrameLayout {
private boolean mIsTransitioning;
private View mTabContainer;
diff --git a/v7/appcompat/src/android/support/v7/widget/ActionBarContextView.java b/v7/appcompat/src/android/support/v7/widget/ActionBarContextView.java
index 580bfd6..4f05080 100644
--- a/v7/appcompat/src/android/support/v7/widget/ActionBarContextView.java
+++ b/v7/appcompat/src/android/support/v7/widget/ActionBarContextView.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.os.Build;
import android.support.annotation.RestrictTo;
@@ -32,12 +34,10 @@
import android.widget.LinearLayout;
import android.widget.TextView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ActionBarContextView extends AbsActionBarView {
private static final String TAG = "ActionBarContextView";
diff --git a/v7/appcompat/src/android/support/v7/widget/ActionBarOverlayLayout.java b/v7/appcompat/src/android/support/v7/widget/ActionBarOverlayLayout.java
index 98c64b4..b685b4c 100644
--- a/v7/appcompat/src/android/support/v7/widget/ActionBarOverlayLayout.java
+++ b/v7/appcompat/src/android/support/v7/widget/ActionBarOverlayLayout.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.TypedArray;
@@ -42,15 +44,13 @@
import android.view.ViewGroup;
import android.view.Window;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Special layout for the containing of an overlay action bar (and its content) to correctly handle
* fitting system windows when the content has request that its layout ignore them.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ActionBarOverlayLayout extends ViewGroup implements DecorContentParent,
NestedScrollingParent {
private static final String TAG = "ActionBarOverlayLayout";
diff --git a/v7/appcompat/src/android/support/v7/widget/ActionMenuView.java b/v7/appcompat/src/android/support/v7/widget/ActionMenuView.java
index c9aecc0..da56faa 100644
--- a/v7/appcompat/src/android/support/v7/widget/ActionMenuView.java
+++ b/v7/appcompat/src/android/support/v7/widget/ActionMenuView.java
@@ -15,10 +15,11 @@
*/
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
-import android.os.Build;
import android.support.annotation.Nullable;
import android.support.annotation.RestrictTo;
import android.support.annotation.StyleRes;
@@ -37,8 +38,6 @@
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* ActionMenuView is a presentation of a series of menu options as a View. It provides
* several top level options as action buttons while spilling remaining options over as
@@ -117,7 +116,7 @@
* @param presenter Menu presenter used to display popup menu
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setPresenter(ActionMenuPresenter presenter) {
mPresenter = presenter;
mPresenter.setMenuView(this);
@@ -567,13 +566,13 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean isOverflowReserved() {
return mReserveOverflow;
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setOverflowReserved(boolean reserveOverflow) {
mReserveOverflow = reserveOverflow;
}
@@ -611,7 +610,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public LayoutParams generateOverflowButtonLayoutParams() {
LayoutParams result = generateDefaultLayoutParams();
result.isOverflowButton = true;
@@ -619,19 +618,19 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean invokeItem(MenuItemImpl item) {
return mMenu.performItemAction(item, 0);
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public int getWindowAnimations() {
return 0;
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void initialize(MenuBuilder menu) {
mMenu = menu;
}
@@ -664,7 +663,7 @@
* Must be called before the first call to getMenu()
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setMenuCallbacks(MenuPresenter.Callback pcb, MenuBuilder.Callback mcb) {
mActionMenuPresenterCallback = pcb;
mMenuBuilderCallback = mcb;
@@ -674,7 +673,7 @@
* Returns the current menu or null if one has not yet been configured.
* @hide Internal use only for action bar integration
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public MenuBuilder peekMenu() {
return mMenu;
}
@@ -708,7 +707,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean isOverflowMenuShowPending() {
return mPresenter != null && mPresenter.isOverflowMenuShowPending();
}
@@ -725,7 +724,7 @@
/**
* @hide Private LinearLayout (superclass) API. Un-hide if LinearLayout API is made public.
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected boolean hasSupportDividerBeforeChildAt(int childIndex) {
if (childIndex == 0) {
return false;
@@ -747,7 +746,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setExpandedActionViewsExclusive(boolean exclusive) {
mPresenter.setExpandedActionViewsExclusive(exclusive);
}
@@ -800,7 +799,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public interface ActionMenuChildView {
boolean needsDividerBefore();
boolean needsDividerAfter();
diff --git a/v7/appcompat/src/android/support/v7/widget/ActivityChooserView.java b/v7/appcompat/src/android/support/v7/widget/ActivityChooserView.java
index 7a6f688..a1f5018 100644
--- a/v7/appcompat/src/android/support/v7/widget/ActivityChooserView.java
+++ b/v7/appcompat/src/android/support/v7/widget/ActivityChooserView.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
@@ -42,8 +44,6 @@
import android.widget.PopupWindow;
import android.widget.TextView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* This class is a view for choosing an activity for handling a given {@link Intent}.
* <p>
@@ -67,7 +67,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ActivityChooserView extends ViewGroup implements
ActivityChooserModel.ActivityChooserModelClient {
@@ -325,7 +325,7 @@
* Set the provider hosting this view, if applicable.
* @hide Internal use only
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setProvider(ActionProvider provider) {
mProvider = provider;
}
@@ -845,7 +845,7 @@
* Allows us to set the background using TintTypedArray
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static class InnerLayout extends LinearLayoutCompat {
private static final int[] TINT_ATTRS = {
diff --git a/v7/appcompat/src/android/support/v7/widget/AlertDialogLayout.java b/v7/appcompat/src/android/support/v7/widget/AlertDialogLayout.java
index e7600e9..5e650b2 100644
--- a/v7/appcompat/src/android/support/v7/widget/AlertDialogLayout.java
+++ b/v7/appcompat/src/android/support/v7/widget/AlertDialogLayout.java
@@ -16,7 +16,7 @@
package android.support.v7.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.content.Context;
import android.graphics.drawable.Drawable;
@@ -47,7 +47,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class AlertDialogLayout extends LinearLayoutCompat {
public AlertDialogLayout(@Nullable Context context) {
diff --git a/v7/appcompat/src/android/support/v7/widget/AppCompatAutoCompleteTextView.java b/v7/appcompat/src/android/support/v7/widget/AppCompatAutoCompleteTextView.java
index c996cef..edbd1a7 100644
--- a/v7/appcompat/src/android/support/v7/widget/AppCompatAutoCompleteTextView.java
+++ b/v7/appcompat/src/android/support/v7/widget/AppCompatAutoCompleteTextView.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
@@ -29,8 +31,6 @@
import android.util.AttributeSet;
import android.widget.AutoCompleteTextView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A {@link AutoCompleteTextView} which supports compatible features on older version of the
* platform, including:
@@ -109,7 +109,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintList(@Nullable ColorStateList tint) {
if (mBackgroundTintHelper != null) {
@@ -123,7 +123,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public ColorStateList getSupportBackgroundTintList() {
@@ -137,7 +137,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintMode(@Nullable PorterDuff.Mode tintMode) {
if (mBackgroundTintHelper != null) {
@@ -151,7 +151,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public PorterDuff.Mode getSupportBackgroundTintMode() {
diff --git a/v7/appcompat/src/android/support/v7/widget/AppCompatButton.java b/v7/appcompat/src/android/support/v7/widget/AppCompatButton.java
index 613be53..f7fa23f 100644
--- a/v7/appcompat/src/android/support/v7/widget/AppCompatButton.java
+++ b/v7/appcompat/src/android/support/v7/widget/AppCompatButton.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
@@ -32,8 +34,6 @@
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.Button;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A {@link Button} which supports compatible features on older version of the platform,
* including:
@@ -95,7 +95,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintList(@Nullable ColorStateList tint) {
if (mBackgroundTintHelper != null) {
@@ -109,7 +109,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public ColorStateList getSupportBackgroundTintList() {
@@ -123,7 +123,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintMode(@Nullable PorterDuff.Mode tintMode) {
if (mBackgroundTintHelper != null) {
@@ -137,7 +137,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public PorterDuff.Mode getSupportBackgroundTintMode() {
diff --git a/v7/appcompat/src/android/support/v7/widget/AppCompatCheckBox.java b/v7/appcompat/src/android/support/v7/widget/AppCompatCheckBox.java
index 2f5bd90..6942cc5 100644
--- a/v7/appcompat/src/android/support/v7/widget/AppCompatCheckBox.java
+++ b/v7/appcompat/src/android/support/v7/widget/AppCompatCheckBox.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
@@ -29,8 +31,6 @@
import android.util.AttributeSet;
import android.widget.CheckBox;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A {@link CheckBox} which supports compatible features on older version of the platform,
* including:
@@ -87,7 +87,7 @@
* This should be accessed from {@link android.support.v4.widget.CompoundButtonCompat}
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportButtonTintList(@Nullable ColorStateList tint) {
if (mCompoundButtonHelper != null) {
@@ -99,7 +99,7 @@
* This should be accessed from {@link android.support.v4.widget.CompoundButtonCompat}
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Nullable
@Override
public ColorStateList getSupportButtonTintList() {
@@ -112,7 +112,7 @@
* This should be accessed from {@link android.support.v4.widget.CompoundButtonCompat}
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportButtonTintMode(@Nullable PorterDuff.Mode tintMode) {
if (mCompoundButtonHelper != null) {
@@ -124,7 +124,7 @@
* This should be accessed from {@link android.support.v4.widget.CompoundButtonCompat}
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Nullable
@Override
public PorterDuff.Mode getSupportButtonTintMode() {
diff --git a/v7/appcompat/src/android/support/v7/widget/AppCompatDrawableManager.java b/v7/appcompat/src/android/support/v7/widget/AppCompatDrawableManager.java
index 6e916bc..8623a47 100644
--- a/v7/appcompat/src/android/support/v7/widget/AppCompatDrawableManager.java
+++ b/v7/appcompat/src/android/support/v7/widget/AppCompatDrawableManager.java
@@ -16,7 +16,7 @@
package android.support.v7.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import static android.support.v4.graphics.ColorUtils.compositeColors;
import static android.support.v7.content.res.AppCompatResources.getColorStateList;
import static android.support.v7.widget.ThemeUtils.getDisabledThemeAttrColor;
@@ -64,7 +64,7 @@
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public final class AppCompatDrawableManager {
private interface InflateDelegate {
diff --git a/v7/appcompat/src/android/support/v7/widget/AppCompatEditText.java b/v7/appcompat/src/android/support/v7/widget/AppCompatEditText.java
index 4d62ea5..9ea02c6 100644
--- a/v7/appcompat/src/android/support/v7/widget/AppCompatEditText.java
+++ b/v7/appcompat/src/android/support/v7/widget/AppCompatEditText.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
@@ -28,8 +30,6 @@
import android.util.AttributeSet;
import android.widget.EditText;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A {@link EditText} which supports compatible features on older version of the platform,
* including:
@@ -91,7 +91,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintList(@Nullable ColorStateList tint) {
if (mBackgroundTintHelper != null) {
@@ -105,7 +105,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public ColorStateList getSupportBackgroundTintList() {
@@ -119,7 +119,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintMode(@Nullable PorterDuff.Mode tintMode) {
if (mBackgroundTintHelper != null) {
@@ -133,7 +133,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public PorterDuff.Mode getSupportBackgroundTintMode() {
diff --git a/v7/appcompat/src/android/support/v7/widget/AppCompatImageButton.java b/v7/appcompat/src/android/support/v7/widget/AppCompatImageButton.java
index 653ed26..f8280c9 100644
--- a/v7/appcompat/src/android/support/v7/widget/AppCompatImageButton.java
+++ b/v7/appcompat/src/android/support/v7/widget/AppCompatImageButton.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
@@ -28,8 +30,6 @@
import android.util.AttributeSet;
import android.widget.ImageButton;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A {@link ImageButton} which supports compatible features on older version of the platform,
* including:
@@ -94,7 +94,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintList(@Nullable ColorStateList tint) {
if (mBackgroundTintHelper != null) {
@@ -108,7 +108,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public ColorStateList getSupportBackgroundTintList() {
@@ -122,7 +122,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintMode(@Nullable PorterDuff.Mode tintMode) {
if (mBackgroundTintHelper != null) {
@@ -136,7 +136,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public PorterDuff.Mode getSupportBackgroundTintMode() {
diff --git a/v7/appcompat/src/android/support/v7/widget/AppCompatImageHelper.java b/v7/appcompat/src/android/support/v7/widget/AppCompatImageHelper.java
index 87a45b7..fe733f7 100644
--- a/v7/appcompat/src/android/support/v7/widget/AppCompatImageHelper.java
+++ b/v7/appcompat/src/android/support/v7/widget/AppCompatImageHelper.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.RestrictTo;
@@ -24,12 +26,10 @@
import android.util.AttributeSet;
import android.widget.ImageView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class AppCompatImageHelper {
private final ImageView mView;
diff --git a/v7/appcompat/src/android/support/v7/widget/AppCompatImageView.java b/v7/appcompat/src/android/support/v7/widget/AppCompatImageView.java
index 87df13d..b749d6c 100644
--- a/v7/appcompat/src/android/support/v7/widget/AppCompatImageView.java
+++ b/v7/appcompat/src/android/support/v7/widget/AppCompatImageView.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
@@ -28,8 +30,6 @@
import android.util.AttributeSet;
import android.widget.ImageView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A {@link ImageView} which supports compatible features on older version of the platform,
* including:
@@ -103,7 +103,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintList(@Nullable ColorStateList tint) {
if (mBackgroundTintHelper != null) {
@@ -117,7 +117,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public ColorStateList getSupportBackgroundTintList() {
@@ -131,7 +131,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintMode(@Nullable PorterDuff.Mode tintMode) {
if (mBackgroundTintHelper != null) {
@@ -145,7 +145,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public PorterDuff.Mode getSupportBackgroundTintMode() {
diff --git a/v7/appcompat/src/android/support/v7/widget/AppCompatMultiAutoCompleteTextView.java b/v7/appcompat/src/android/support/v7/widget/AppCompatMultiAutoCompleteTextView.java
index c850f11..381169d 100644
--- a/v7/appcompat/src/android/support/v7/widget/AppCompatMultiAutoCompleteTextView.java
+++ b/v7/appcompat/src/android/support/v7/widget/AppCompatMultiAutoCompleteTextView.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
@@ -29,8 +31,6 @@
import android.util.AttributeSet;
import android.widget.MultiAutoCompleteTextView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A {@link MultiAutoCompleteTextView} which supports compatible features on older version of the
* platform, including:
@@ -109,7 +109,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintList(@Nullable ColorStateList tint) {
if (mBackgroundTintHelper != null) {
@@ -123,7 +123,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public ColorStateList getSupportBackgroundTintList() {
@@ -137,7 +137,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintMode(@Nullable PorterDuff.Mode tintMode) {
if (mBackgroundTintHelper != null) {
@@ -151,7 +151,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public PorterDuff.Mode getSupportBackgroundTintMode() {
diff --git a/v7/appcompat/src/android/support/v7/widget/AppCompatPopupWindow.java b/v7/appcompat/src/android/support/v7/widget/AppCompatPopupWindow.java
index 3b6cf44..c9e778d 100644
--- a/v7/appcompat/src/android/support/v7/widget/AppCompatPopupWindow.java
+++ b/v7/appcompat/src/android/support/v7/widget/AppCompatPopupWindow.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
@@ -35,8 +37,6 @@
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
class AppCompatPopupWindow extends PopupWindow {
private static final String TAG = "AppCompatPopupWindow";
@@ -151,7 +151,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setSupportOverlapAnchor(boolean overlapAnchor) {
if (COMPAT_OVERLAP_ANCHOR) {
mOverlapAnchor = overlapAnchor;
@@ -163,7 +163,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean getSupportOverlapAnchor() {
if (COMPAT_OVERLAP_ANCHOR) {
return mOverlapAnchor;
diff --git a/v7/appcompat/src/android/support/v7/widget/AppCompatRadioButton.java b/v7/appcompat/src/android/support/v7/widget/AppCompatRadioButton.java
index 5edbc83..768d610 100644
--- a/v7/appcompat/src/android/support/v7/widget/AppCompatRadioButton.java
+++ b/v7/appcompat/src/android/support/v7/widget/AppCompatRadioButton.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
@@ -29,8 +31,6 @@
import android.util.AttributeSet;
import android.widget.RadioButton;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A {@link RadioButton} which supports compatible features on older version of the platform,
* including:
@@ -87,7 +87,7 @@
* This should be accessed from {@link android.support.v4.widget.CompoundButtonCompat}
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportButtonTintList(@Nullable ColorStateList tint) {
if (mCompoundButtonHelper != null) {
@@ -99,7 +99,7 @@
* This should be accessed from {@link android.support.v4.widget.CompoundButtonCompat}
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Nullable
@Override
public ColorStateList getSupportButtonTintList() {
@@ -112,7 +112,7 @@
* This should be accessed from {@link android.support.v4.widget.CompoundButtonCompat}
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportButtonTintMode(@Nullable PorterDuff.Mode tintMode) {
if (mCompoundButtonHelper != null) {
@@ -124,7 +124,7 @@
* This should be accessed from {@link android.support.v4.widget.CompoundButtonCompat}
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Nullable
@Override
public PorterDuff.Mode getSupportButtonTintMode() {
diff --git a/v7/appcompat/src/android/support/v7/widget/AppCompatSpinner.java b/v7/appcompat/src/android/support/v7/widget/AppCompatSpinner.java
index beb4b73..9f27f78 100644
--- a/v7/appcompat/src/android/support/v7/widget/AppCompatSpinner.java
+++ b/v7/appcompat/src/android/support/v7/widget/AppCompatSpinner.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Resources;
@@ -48,8 +50,6 @@
import android.widget.Spinner;
import android.widget.SpinnerAdapter;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A {@link Spinner} which supports compatible features on older versions of the platform,
@@ -475,7 +475,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintList(@Nullable ColorStateList tint) {
if (mBackgroundTintHelper != null) {
@@ -489,7 +489,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public ColorStateList getSupportBackgroundTintList() {
@@ -504,7 +504,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintMode(@Nullable PorterDuff.Mode tintMode) {
if (mBackgroundTintHelper != null) {
@@ -518,7 +518,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public PorterDuff.Mode getSupportBackgroundTintMode() {
diff --git a/v7/appcompat/src/android/support/v7/widget/AppCompatTextView.java b/v7/appcompat/src/android/support/v7/widget/AppCompatTextView.java
index 276d5c4..66fd929 100644
--- a/v7/appcompat/src/android/support/v7/widget/AppCompatTextView.java
+++ b/v7/appcompat/src/android/support/v7/widget/AppCompatTextView.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
@@ -28,8 +30,6 @@
import android.util.AttributeSet;
import android.widget.TextView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A {@link TextView} which supports compatible features on older version of the platform,
* including:
@@ -91,7 +91,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintList(@Nullable ColorStateList tint) {
if (mBackgroundTintHelper != null) {
@@ -105,7 +105,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public ColorStateList getSupportBackgroundTintList() {
@@ -119,7 +119,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void setSupportBackgroundTintMode(@Nullable PorterDuff.Mode tintMode) {
if (mBackgroundTintHelper != null) {
@@ -133,7 +133,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
@Nullable
public PorterDuff.Mode getSupportBackgroundTintMode() {
diff --git a/v7/appcompat/src/android/support/v7/widget/ButtonBarLayout.java b/v7/appcompat/src/android/support/v7/widget/ButtonBarLayout.java
index 6c97ee1..048f2b6 100644
--- a/v7/appcompat/src/android/support/v7/widget/ButtonBarLayout.java
+++ b/v7/appcompat/src/android/support/v7/widget/ButtonBarLayout.java
@@ -15,6 +15,8 @@
*/
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Build;
@@ -27,15 +29,13 @@
import android.view.View;
import android.widget.LinearLayout;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* An extension of LinearLayout that automatically switches to vertical
* orientation when it can't fit its child views horizontally.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ButtonBarLayout extends LinearLayout {
/** Minimum screen height required for button stacking. */
private static final int ALLOW_STACKING_MIN_HEIGHT_DP = 320;
diff --git a/v7/appcompat/src/android/support/v7/widget/ContentFrameLayout.java b/v7/appcompat/src/android/support/v7/widget/ContentFrameLayout.java
index f656370..1100280 100644
--- a/v7/appcompat/src/android/support/v7/widget/ContentFrameLayout.java
+++ b/v7/appcompat/src/android/support/v7/widget/ContentFrameLayout.java
@@ -16,6 +16,11 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+import static android.view.View.MeasureSpec.AT_MOST;
+import static android.view.View.MeasureSpec.EXACTLY;
+import static android.view.View.MeasureSpec.getMode;
+
import android.content.Context;
import android.graphics.Rect;
import android.support.annotation.RestrictTo;
@@ -25,11 +30,6 @@
import android.util.TypedValue;
import android.widget.FrameLayout;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-import static android.view.View.MeasureSpec.AT_MOST;
-import static android.view.View.MeasureSpec.EXACTLY;
-import static android.view.View.MeasureSpec.getMode;
-
/**
* @hide
*/
@@ -67,7 +67,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void dispatchFitSystemWindows(Rect insets) {
fitSystemWindows(insets);
}
@@ -82,7 +82,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setDecorPadding(int left, int top, int right, int bottom) {
mDecorPadding.set(left, top, right, bottom);
if (ViewCompat.isLaidOut(this)) {
diff --git a/v7/appcompat/src/android/support/v7/widget/DecorContentParent.java b/v7/appcompat/src/android/support/v7/widget/DecorContentParent.java
index ca83469..bc36f97 100644
--- a/v7/appcompat/src/android/support/v7/widget/DecorContentParent.java
+++ b/v7/appcompat/src/android/support/v7/widget/DecorContentParent.java
@@ -17,6 +17,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.graphics.drawable.Drawable;
import android.os.Parcelable;
import android.support.annotation.RestrictTo;
@@ -25,15 +27,13 @@
import android.view.Menu;
import android.view.Window;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Implemented by the top-level decor layout for a window. DecorContentParent offers
* entry points for a number of title/window decor features.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface DecorContentParent {
void setWindowCallback(Window.Callback cb);
void setWindowTitle(CharSequence title);
diff --git a/v7/appcompat/src/android/support/v7/widget/DecorToolbar.java b/v7/appcompat/src/android/support/v7/widget/DecorToolbar.java
index fb9081c..d9fe0c3 100644
--- a/v7/appcompat/src/android/support/v7/widget/DecorToolbar.java
+++ b/v7/appcompat/src/android/support/v7/widget/DecorToolbar.java
@@ -17,6 +17,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Parcelable;
@@ -32,8 +34,6 @@
import android.widget.AdapterView;
import android.widget.SpinnerAdapter;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Common interface for a toolbar that sits as part of the window decor.
* Layouts that control window decor use this as a point of interaction with different
@@ -41,7 +41,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface DecorToolbar {
ViewGroup getViewGroup();
Context getContext();
diff --git a/v7/appcompat/src/android/support/v7/widget/DialogTitle.java b/v7/appcompat/src/android/support/v7/widget/DialogTitle.java
index bc81ca4..313d748 100644
--- a/v7/appcompat/src/android/support/v7/widget/DialogTitle.java
+++ b/v7/appcompat/src/android/support/v7/widget/DialogTitle.java
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2015 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.support.annotation.RestrictTo;
@@ -25,15 +27,13 @@
import android.util.TypedValue;
import android.widget.TextView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Used by dialogs to change the font size and number of lines to try to fit
* the text to the available space.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class DialogTitle extends TextView {
public DialogTitle(Context context, AttributeSet attrs, int defStyleAttr) {
diff --git a/v7/appcompat/src/android/support/v7/widget/DrawableUtils.java b/v7/appcompat/src/android/support/v7/widget/DrawableUtils.java
index 51383e9..d73b88b 100644
--- a/v7/appcompat/src/android/support/v7/widget/DrawableUtils.java
+++ b/v7/appcompat/src/android/support/v7/widget/DrawableUtils.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
@@ -24,7 +26,6 @@
import android.graphics.drawable.InsetDrawable;
import android.graphics.drawable.LayerDrawable;
import android.graphics.drawable.ScaleDrawable;
-import android.graphics.drawable.StateListDrawable;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.RestrictTo;
@@ -34,10 +35,8 @@
import java.lang.reflect.Field;
import java.lang.reflect.Method;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/** @hide */
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class DrawableUtils {
private static final String TAG = "DrawableUtils";
diff --git a/v7/appcompat/src/android/support/v7/widget/FitWindowsFrameLayout.java b/v7/appcompat/src/android/support/v7/widget/FitWindowsFrameLayout.java
index 1ec3c3e..d9ae921 100644
--- a/v7/appcompat/src/android/support/v7/widget/FitWindowsFrameLayout.java
+++ b/v7/appcompat/src/android/support/v7/widget/FitWindowsFrameLayout.java
@@ -16,18 +16,18 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.graphics.Rect;
import android.support.annotation.RestrictTo;
import android.util.AttributeSet;
import android.widget.FrameLayout;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class FitWindowsFrameLayout extends FrameLayout implements FitWindowsViewGroup {
private OnFitSystemWindowsListener mListener;
diff --git a/v7/appcompat/src/android/support/v7/widget/FitWindowsLinearLayout.java b/v7/appcompat/src/android/support/v7/widget/FitWindowsLinearLayout.java
index 359849b..163a211 100644
--- a/v7/appcompat/src/android/support/v7/widget/FitWindowsLinearLayout.java
+++ b/v7/appcompat/src/android/support/v7/widget/FitWindowsLinearLayout.java
@@ -16,18 +16,18 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.graphics.Rect;
import android.support.annotation.RestrictTo;
import android.util.AttributeSet;
import android.widget.LinearLayout;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class FitWindowsLinearLayout extends LinearLayout implements FitWindowsViewGroup {
private OnFitSystemWindowsListener mListener;
diff --git a/v7/appcompat/src/android/support/v7/widget/FitWindowsViewGroup.java b/v7/appcompat/src/android/support/v7/widget/FitWindowsViewGroup.java
index 16a07c8..ffec343 100644
--- a/v7/appcompat/src/android/support/v7/widget/FitWindowsViewGroup.java
+++ b/v7/appcompat/src/android/support/v7/widget/FitWindowsViewGroup.java
@@ -16,15 +16,15 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.graphics.Rect;
import android.support.annotation.RestrictTo;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface FitWindowsViewGroup {
interface OnFitSystemWindowsListener {
diff --git a/v7/appcompat/src/android/support/v7/widget/ForwardingListener.java b/v7/appcompat/src/android/support/v7/widget/ForwardingListener.java
index 91c0fd7..80fbbd4 100644
--- a/v7/appcompat/src/android/support/v7/widget/ForwardingListener.java
+++ b/v7/appcompat/src/android/support/v7/widget/ForwardingListener.java
@@ -16,7 +16,7 @@
package android.support.v7.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.annotation.TargetApi;
import android.os.Build;
@@ -38,7 +38,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public abstract class ForwardingListener implements View.OnTouchListener {
/** Scaled touch slop, used for detecting movement outside bounds. */
diff --git a/v7/appcompat/src/android/support/v7/widget/LinearLayoutCompat.java b/v7/appcompat/src/android/support/v7/widget/LinearLayoutCompat.java
index ce6f140..10633f6 100644
--- a/v7/appcompat/src/android/support/v7/widget/LinearLayoutCompat.java
+++ b/v7/appcompat/src/android/support/v7/widget/LinearLayoutCompat.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -36,8 +38,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A Layout that arranges its children in a single column or a single row. The direction of
@@ -56,7 +56,7 @@
*/
public class LinearLayoutCompat extends ViewGroup {
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef({HORIZONTAL, VERTICAL})
@Retention(RetentionPolicy.SOURCE)
public @interface OrientationMode {}
@@ -65,7 +65,7 @@
public static final int VERTICAL = 1;
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@IntDef(flag = true,
value = {
SHOW_DIVIDER_NONE,
@@ -273,7 +273,7 @@
*
* @hide Used internally by framework.
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public int getDividerWidth() {
return mDividerWidth;
}
diff --git a/v7/appcompat/src/android/support/v7/widget/ListPopupWindow.java b/v7/appcompat/src/android/support/v7/widget/ListPopupWindow.java
index 0fe68d6..11edc08 100644
--- a/v7/appcompat/src/android/support/v7/widget/ListPopupWindow.java
+++ b/v7/appcompat/src/android/support/v7/widget/ListPopupWindow.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.database.DataSetObserver;
@@ -28,7 +30,6 @@
import android.support.annotation.Nullable;
import android.support.annotation.RestrictTo;
import android.support.annotation.StyleRes;
-import android.support.v4.os.BuildCompat;
import android.support.v4.view.ViewCompat;
import android.support.v4.widget.PopupWindowCompat;
import android.support.v7.appcompat.R;
@@ -54,8 +55,6 @@
import java.lang.reflect.Method;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Static library support version of the framework's {@link android.widget.ListPopupWindow}.
* Used to write apps that run on platforms prior to Android L. When running
@@ -349,7 +348,7 @@
*
* @hide Used only by AutoCompleteTextView to handle some internal special cases.
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setForceIgnoreOutsideTouch(boolean forceIgnoreOutsideTouch) {
mForceIgnoreOutsideTouch = forceIgnoreOutsideTouch;
}
@@ -365,7 +364,7 @@
*
* @hide Only used by AutoCompleteTextView under special conditions.
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setDropDownAlwaysVisible(boolean dropDownAlwaysVisible) {
mDropDownAlwaysVisible = dropDownAlwaysVisible;
}
@@ -375,7 +374,7 @@
*
* @hide Only used by AutoCompleteTextView under special conditions.
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean isDropDownAlwaysVisible() {
return mDropDownAlwaysVisible;
}
@@ -510,7 +509,7 @@
* @param bounds anchor-relative bounds
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setEpicenterBounds(Rect bounds) {
mEpicenterBounds = bounds;
}
diff --git a/v7/appcompat/src/android/support/v7/widget/ListViewCompat.java b/v7/appcompat/src/android/support/v7/widget/ListViewCompat.java
index fab68d1..0baefe0 100644
--- a/v7/appcompat/src/android/support/v7/widget/ListViewCompat.java
+++ b/v7/appcompat/src/android/support/v7/widget/ListViewCompat.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Rect;
@@ -33,15 +35,13 @@
import java.lang.reflect.Field;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* This class contains a number of useful things for ListView. Mainly used by
* {@link android.support.v7.widget.ListPopupWindow}.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ListViewCompat extends ListView {
public static final int INVALID_POSITION = -1;
diff --git a/v7/appcompat/src/android/support/v7/widget/MenuItemHoverListener.java b/v7/appcompat/src/android/support/v7/widget/MenuItemHoverListener.java
index 02b71a8..70f844d 100644
--- a/v7/appcompat/src/android/support/v7/widget/MenuItemHoverListener.java
+++ b/v7/appcompat/src/android/support/v7/widget/MenuItemHoverListener.java
@@ -16,20 +16,20 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.support.annotation.NonNull;
import android.support.annotation.RestrictTo;
import android.support.v7.view.menu.MenuBuilder;
import android.view.MenuItem;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* An interface notified when a menu item is hovered. Useful for cases when hover should trigger
* some behavior at a higher level, like managing the opening and closing of submenus.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public interface MenuItemHoverListener {
/**
* Called when hover exits a menu item.
diff --git a/v7/appcompat/src/android/support/v7/widget/MenuPopupWindow.java b/v7/appcompat/src/android/support/v7/widget/MenuPopupWindow.java
index e877c19..cc6628a 100644
--- a/v7/appcompat/src/android/support/v7/widget/MenuPopupWindow.java
+++ b/v7/appcompat/src/android/support/v7/widget/MenuPopupWindow.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -23,7 +25,6 @@
import android.support.annotation.NonNull;
import android.support.annotation.RestrictTo;
import android.support.v4.view.ViewCompat;
-import android.support.v4.widget.PopupWindowCompat;
import android.support.v7.view.menu.ListMenuItemView;
import android.support.v7.view.menu.MenuAdapter;
import android.support.v7.view.menu.MenuBuilder;
@@ -33,16 +34,12 @@
import android.view.KeyEvent;
import android.view.MenuItem;
import android.view.MotionEvent;
-import android.view.View;
import android.widget.HeaderViewListAdapter;
import android.widget.ListAdapter;
import android.widget.PopupWindow;
-import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A MenuPopupWindow represents the popup window for menu.
*
@@ -51,7 +48,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class MenuPopupWindow extends ListPopupWindow implements MenuItemHoverListener {
private static final String TAG = "MenuPopupWindow";
@@ -128,7 +125,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static class MenuDropDownListView extends DropDownListView {
final int mAdvanceKey;
final int mRetreatKey;
diff --git a/v7/appcompat/src/android/support/v7/widget/ScrollingTabContainerView.java b/v7/appcompat/src/android/support/v7/widget/ScrollingTabContainerView.java
index 7069965..ea536d2 100644
--- a/v7/appcompat/src/android/support/v7/widget/ScrollingTabContainerView.java
+++ b/v7/appcompat/src/android/support/v7/widget/ScrollingTabContainerView.java
@@ -15,6 +15,8 @@
*/
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
@@ -46,15 +48,13 @@
import android.widget.TextView;
import android.widget.Toast;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* This widget implements the dynamic action bar tab behavior that can change across different
* configurations or circumstances.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ScrollingTabContainerView extends HorizontalScrollView
implements AdapterView.OnItemSelectedListener {
diff --git a/v7/appcompat/src/android/support/v7/widget/SearchView.java b/v7/appcompat/src/android/support/v7/widget/SearchView.java
index 79df8f4..40793df 100644
--- a/v7/appcompat/src/android/support/v7/widget/SearchView.java
+++ b/v7/appcompat/src/android/support/v7/widget/SearchView.java
@@ -16,7 +16,7 @@
package android.support.v7.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import static android.support.v7.widget.SuggestionsAdapter.getColumnString;
import android.annotation.TargetApi;
@@ -461,7 +461,7 @@
* @param appSearchData bundle provided by the app when launching the search dialog
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setAppSearchData(Bundle appSearchData) {
mAppSearchData = appSearchData;
}
@@ -512,7 +512,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public boolean requestFocus(int direction, Rect previouslyFocusedRect) {
// Don't accept focus if in the middle of clearing focus
@@ -532,7 +532,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void clearFocus() {
mClearingFocus = true;
@@ -1871,7 +1871,7 @@
* Local subclass for AutoCompleteTextView.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static class SearchAutoComplete extends AppCompatAutoCompleteTextView {
private int mThreshold;
diff --git a/v7/appcompat/src/android/support/v7/widget/TintContextWrapper.java b/v7/appcompat/src/android/support/v7/widget/TintContextWrapper.java
index 8202d45..1454e59 100644
--- a/v7/appcompat/src/android/support/v7/widget/TintContextWrapper.java
+++ b/v7/appcompat/src/android/support/v7/widget/TintContextWrapper.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.ContextWrapper;
import android.content.res.AssetManager;
@@ -27,15 +29,13 @@
import java.lang.ref.WeakReference;
import java.util.ArrayList;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A {@link android.content.ContextWrapper} which returns a tint-aware
* {@link android.content.res.Resources} instance from {@link #getResources()}.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class TintContextWrapper extends ContextWrapper {
private static final Object CACHE_LOCK = new Object();
diff --git a/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java b/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
index 5725b37..ca72d27 100644
--- a/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
+++ b/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Resources;
@@ -27,8 +29,6 @@
import android.util.AttributeSet;
import android.util.TypedValue;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A class that wraps a {@link android.content.res.TypedArray} and provides the same public API
* surface. The purpose of this class is so that we can intercept the {@link #getDrawable(int)}
@@ -36,7 +36,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class TintTypedArray {
private final Context mContext;
diff --git a/v7/appcompat/src/android/support/v7/widget/Toolbar.java b/v7/appcompat/src/android/support/v7/widget/Toolbar.java
index 01b28a8..8687292 100644
--- a/v7/appcompat/src/android/support/v7/widget/Toolbar.java
+++ b/v7/appcompat/src/android/support/v7/widget/Toolbar.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Build;
@@ -65,8 +67,6 @@
import java.util.ArrayList;
import java.util.List;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A standard toolbar for use within application content.
*
@@ -503,7 +503,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean canShowOverflowMenu() {
return getVisibility() == VISIBLE && mMenuView != null && mMenuView.isOverflowReserved();
}
@@ -519,7 +519,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean isOverflowMenuShowPending() {
return mMenuView != null && mMenuView.isOverflowMenuShowPending();
}
@@ -543,7 +543,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setMenu(MenuBuilder menu, ActionMenuPresenter outerPresenter) {
if (menu == null && mMenuView == null) {
return;
@@ -589,7 +589,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean isTitleTruncated() {
if (mTitleTextView == null) {
return false;
@@ -2109,7 +2109,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public DecorToolbar getWrapper() {
if (mWrapper == null) {
mWrapper = new ToolbarWidgetWrapper(this, true);
@@ -2148,7 +2148,7 @@
* it could be considered "empty" (no visible elements with nonzero measured size)
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setCollapsible(boolean collapsible) {
mCollapsible = collapsible;
requestLayout();
@@ -2158,7 +2158,7 @@
* Must be called before the menu is accessed
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void setMenuCallbacks(MenuPresenter.Callback pcb, MenuBuilder.Callback mcb) {
mActionMenuPresenterCallback = pcb;
mMenuBuilderCallback = mcb;
diff --git a/v7/appcompat/src/android/support/v7/widget/ToolbarWidgetWrapper.java b/v7/appcompat/src/android/support/v7/widget/ToolbarWidgetWrapper.java
index eee9cf0..491ed90 100644
--- a/v7/appcompat/src/android/support/v7/widget/ToolbarWidgetWrapper.java
+++ b/v7/appcompat/src/android/support/v7/widget/ToolbarWidgetWrapper.java
@@ -17,6 +17,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.app.ActionBar;
import android.content.Context;
import android.graphics.drawable.Drawable;
@@ -44,8 +46,6 @@
import android.widget.Spinner;
import android.widget.SpinnerAdapter;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Internal class used to interact with the Toolbar widget without
* exposing interface methods to the public API.
@@ -57,7 +57,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ToolbarWidgetWrapper implements DecorToolbar {
private static final String TAG = "ToolbarWidgetWrapper";
diff --git a/v7/appcompat/src/android/support/v7/widget/VectorEnabledTintResources.java b/v7/appcompat/src/android/support/v7/widget/VectorEnabledTintResources.java
index 89423ce..e184e85 100644
--- a/v7/appcompat/src/android/support/v7/widget/VectorEnabledTintResources.java
+++ b/v7/appcompat/src/android/support/v7/widget/VectorEnabledTintResources.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
@@ -26,15 +28,13 @@
import java.lang.ref.WeakReference;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* This class allows us to intercept calls so that we can tint resources (if applicable), and
* inflate vector resources from within drawable containers pre-L.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class VectorEnabledTintResources extends Resources {
public static boolean shouldBeUsed() {
diff --git a/v7/appcompat/src/android/support/v7/widget/ViewStubCompat.java b/v7/appcompat/src/android/support/v7/widget/ViewStubCompat.java
index eb9194b..6319eac 100644
--- a/v7/appcompat/src/android/support/v7/widget/ViewStubCompat.java
+++ b/v7/appcompat/src/android/support/v7/widget/ViewStubCompat.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -29,15 +31,13 @@
import java.lang.ref.WeakReference;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Backport of {@link android.view.ViewStub} so that we can set the
* {@link android.view.LayoutInflater} on devices before Jelly Bean.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public final class ViewStubCompat extends View {
private int mLayoutResource = 0;
private int mInflatedId;
diff --git a/v7/appcompat/src/android/support/v7/widget/ViewUtils.java b/v7/appcompat/src/android/support/v7/widget/ViewUtils.java
index 72799ec..2a158c5 100644
--- a/v7/appcompat/src/android/support/v7/widget/ViewUtils.java
+++ b/v7/appcompat/src/android/support/v7/widget/ViewUtils.java
@@ -16,6 +16,8 @@
package android.support.v7.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.graphics.Rect;
import android.os.Build;
import android.support.annotation.RestrictTo;
@@ -26,12 +28,10 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class ViewUtils {
private static final String TAG = "ViewUtils";
diff --git a/v7/mediarouter/src/android/support/v7/media/MediaRouteDescriptor.java b/v7/mediarouter/src/android/support/v7/media/MediaRouteDescriptor.java
index 068db47..0a4d0d4 100644
--- a/v7/mediarouter/src/android/support/v7/media/MediaRouteDescriptor.java
+++ b/v7/mediarouter/src/android/support/v7/media/MediaRouteDescriptor.java
@@ -15,6 +15,8 @@
*/
package android.support.v7.media;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.IntentFilter;
import android.content.IntentSender;
import android.net.Uri;
@@ -28,8 +30,6 @@
import java.util.Collections;
import java.util.List;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Describes the properties of a route.
* <p>
@@ -90,7 +90,7 @@
* </p>
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public List<String> getGroupMemberIds() {
return mBundle.getStringArrayList(KEY_GROUP_MEMBER_IDS);
}
@@ -278,7 +278,7 @@
* Gets the minimum client version required for this route.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public int getMinClientVersion() {
return mBundle.getInt(KEY_MIN_CLIENT_VERSION,
MediaRouteProviderProtocol.CLIENT_VERSION_START);
@@ -288,7 +288,7 @@
* Gets the maximum client version required for this route.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public int getMaxClientVersion() {
return mBundle.getInt(KEY_MAX_CLIENT_VERSION, Integer.MAX_VALUE);
}
@@ -411,7 +411,7 @@
* </p>
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public Builder addGroupMemberId(String groupMemberId) {
if (TextUtils.isEmpty(groupMemberId)) {
throw new IllegalArgumentException("groupMemberId must not be empty");
@@ -434,7 +434,7 @@
* </p>
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public Builder addGroupMemberIds(Collection<String> groupMemberIds) {
if (groupMemberIds == null) {
throw new IllegalArgumentException("groupMemberIds must not be null");
@@ -663,7 +663,7 @@
* A router whose version is lower than this will not be able to connect to this route.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public Builder setMinClientVersion(int minVersion) {
mBundle.putInt(KEY_MIN_CLIENT_VERSION, minVersion);
return this;
@@ -674,7 +674,7 @@
* A router whose version is higher than this will not be able to connect to this route.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public Builder setMaxClientVersion(int maxVersion) {
mBundle.putInt(KEY_MAX_CLIENT_VERSION, maxVersion);
return this;
diff --git a/v7/mediarouter/src/android/support/v7/media/MediaRouteProvider.java b/v7/mediarouter/src/android/support/v7/media/MediaRouteProvider.java
index e514782..eee05cc 100644
--- a/v7/mediarouter/src/android/support/v7/media/MediaRouteProvider.java
+++ b/v7/mediarouter/src/android/support/v7/media/MediaRouteProvider.java
@@ -16,6 +16,8 @@
package android.support.v7.media;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -26,8 +28,6 @@
import android.support.annotation.RestrictTo;
import android.support.v7.media.MediaRouter.ControlRequestCallback;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Media route providers are used to publish additional media routes for
* use within an application. Media route providers may also be declared
@@ -274,7 +274,7 @@
* cannot be controlled using the route controller interface.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Nullable
public RouteController onCreateRouteController(@NonNull String routeId,
@NonNull String routeGroupId) {
diff --git a/v7/mediarouter/src/android/support/v7/media/MediaRouteProviderProtocol.java b/v7/mediarouter/src/android/support/v7/media/MediaRouteProviderProtocol.java
index 4bc03a8..3c44b6b 100644
--- a/v7/mediarouter/src/android/support/v7/media/MediaRouteProviderProtocol.java
+++ b/v7/mediarouter/src/android/support/v7/media/MediaRouteProviderProtocol.java
@@ -119,7 +119,7 @@
public static final int CLIENT_MSG_SET_DISCOVERY_REQUEST = 10;
public static final String CLIENT_DATA_ROUTE_ID = "routeId";
- public static final String CLIENT_DATA_ROUTE_GROUP_ID = "routeGroupId";
+ public static final String CLIENT_DATA_ROUTE_LIBRARY_GROUP = "routeGroupId";
public static final String CLIENT_DATA_VOLUME = "volume";
public static final String CLIENT_DATA_UNSELECT_REASON = "unselectReason";
diff --git a/v7/mediarouter/src/android/support/v7/media/MediaRouteProviderService.java b/v7/mediarouter/src/android/support/v7/media/MediaRouteProviderService.java
index dc49e81..9ddde89 100644
--- a/v7/mediarouter/src/android/support/v7/media/MediaRouteProviderService.java
+++ b/v7/mediarouter/src/android/support/v7/media/MediaRouteProviderService.java
@@ -16,6 +16,35 @@
package android.support.v7.media;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_DATA_ROUTE_ID;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_DATA_ROUTE_LIBRARY_GROUP;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_DATA_UNSELECT_REASON;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_DATA_VOLUME;
+import static android.support.v7.media.MediaRouteProviderProtocol
+ .CLIENT_MSG_CREATE_ROUTE_CONTROLLER;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_REGISTER;
+import static android.support.v7.media.MediaRouteProviderProtocol
+ .CLIENT_MSG_RELEASE_ROUTE_CONTROLLER;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_ROUTE_CONTROL_REQUEST;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_SELECT_ROUTE;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_SET_DISCOVERY_REQUEST;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_SET_ROUTE_VOLUME;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_UNREGISTER;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_UNSELECT_ROUTE;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_UPDATE_ROUTE_VOLUME;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_VERSION_1;
+import static android.support.v7.media.MediaRouteProviderProtocol.SERVICE_DATA_ERROR;
+import static android.support.v7.media.MediaRouteProviderProtocol
+ .SERVICE_MSG_CONTROL_REQUEST_FAILED;
+import static android.support.v7.media.MediaRouteProviderProtocol
+ .SERVICE_MSG_CONTROL_REQUEST_SUCCEEDED;
+import static android.support.v7.media.MediaRouteProviderProtocol.SERVICE_MSG_DESCRIPTOR_CHANGED;
+import static android.support.v7.media.MediaRouteProviderProtocol.SERVICE_MSG_GENERIC_FAILURE;
+import static android.support.v7.media.MediaRouteProviderProtocol.SERVICE_MSG_GENERIC_SUCCESS;
+import static android.support.v7.media.MediaRouteProviderProtocol.SERVICE_MSG_REGISTERED;
+import static android.support.v7.media.MediaRouteProviderProtocol.SERVICE_VERSION_CURRENT;
+import static android.support.v7.media.MediaRouteProviderProtocol.isValidRemoteMessenger;
+
import android.app.Service;
import android.content.Intent;
import android.os.Bundle;
@@ -33,8 +62,6 @@
import java.util.ArrayList;
import java.util.List;
-import static android.support.v7.media.MediaRouteProviderProtocol.*;
-
/**
* Base class for media route provider services.
* <p>
@@ -663,7 +690,7 @@
case CLIENT_MSG_CREATE_ROUTE_CONTROLLER: {
String routeId = data.getString(CLIENT_DATA_ROUTE_ID);
- String routeGroupId = data.getString(CLIENT_DATA_ROUTE_GROUP_ID);
+ String routeGroupId = data.getString(CLIENT_DATA_ROUTE_LIBRARY_GROUP);
if (routeId != null) {
return service.onCreateRouteController(
messenger, requestId, arg, routeId, routeGroupId);
diff --git a/v7/mediarouter/src/android/support/v7/media/MediaRouter.java b/v7/mediarouter/src/android/support/v7/media/MediaRouter.java
index daf73d0..8e451b3 100644
--- a/v7/mediarouter/src/android/support/v7/media/MediaRouter.java
+++ b/v7/mediarouter/src/android/support/v7/media/MediaRouter.java
@@ -16,7 +16,7 @@
package android.support.v7.media;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.app.ActivityManager;
import android.content.ComponentName;
@@ -875,7 +875,7 @@
* @see #getDeviceType
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static final int DEVICE_TYPE_UNKNOWN = 0;
/**
@@ -901,7 +901,7 @@
* @see #getDeviceType
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static final int DEVICE_TYPE_BLUETOOTH = 3;
@IntDef({PLAYBACK_VOLUME_FIXED,PLAYBACK_VOLUME_VARIABLE})
@@ -931,7 +931,7 @@
* with the route.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static final int PRESENTATION_DISPLAY_ID_NONE = -1;
static final int CHANGE_GENERAL = 1 << 0;
@@ -1282,7 +1282,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean isDefaultOrBluetooth() {
if (isDefault() || mDeviceType == DEVICE_TYPE_BLUETOOTH) {
return true;
@@ -1413,7 +1413,7 @@
* Gets the route's presentation display id, or -1 if none.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public int getPresentationDisplayId() {
return mPresentationDisplayId;
}
@@ -1558,7 +1558,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public MediaRouteProvider getProviderInstance() {
return mProvider.getProviderInstance();
}
@@ -1568,7 +1568,7 @@
* Information about a route that consists of multiple other routes in a group.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static class RouteGroup extends RouteInfo {
private List<RouteInfo> mRoutes = new ArrayList<>();
diff --git a/v7/mediarouter/src/android/support/v7/media/RegisteredMediaRouteProvider.java b/v7/mediarouter/src/android/support/v7/media/RegisteredMediaRouteProvider.java
index 7942eed..ca2d486 100644
--- a/v7/mediarouter/src/android/support/v7/media/RegisteredMediaRouteProvider.java
+++ b/v7/mediarouter/src/android/support/v7/media/RegisteredMediaRouteProvider.java
@@ -16,6 +16,35 @@
package android.support.v7.media;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_DATA_ROUTE_ID;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_DATA_ROUTE_LIBRARY_GROUP;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_DATA_UNSELECT_REASON;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_DATA_VOLUME;
+import static android.support.v7.media.MediaRouteProviderProtocol
+ .CLIENT_MSG_CREATE_ROUTE_CONTROLLER;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_REGISTER;
+import static android.support.v7.media.MediaRouteProviderProtocol
+ .CLIENT_MSG_RELEASE_ROUTE_CONTROLLER;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_ROUTE_CONTROL_REQUEST;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_SELECT_ROUTE;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_SET_DISCOVERY_REQUEST;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_SET_ROUTE_VOLUME;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_UNREGISTER;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_UNSELECT_ROUTE;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_MSG_UPDATE_ROUTE_VOLUME;
+import static android.support.v7.media.MediaRouteProviderProtocol.CLIENT_VERSION_CURRENT;
+import static android.support.v7.media.MediaRouteProviderProtocol.SERVICE_DATA_ERROR;
+import static android.support.v7.media.MediaRouteProviderProtocol
+ .SERVICE_MSG_CONTROL_REQUEST_FAILED;
+import static android.support.v7.media.MediaRouteProviderProtocol
+ .SERVICE_MSG_CONTROL_REQUEST_SUCCEEDED;
+import static android.support.v7.media.MediaRouteProviderProtocol.SERVICE_MSG_DESCRIPTOR_CHANGED;
+import static android.support.v7.media.MediaRouteProviderProtocol.SERVICE_MSG_GENERIC_FAILURE;
+import static android.support.v7.media.MediaRouteProviderProtocol.SERVICE_MSG_GENERIC_SUCCESS;
+import static android.support.v7.media.MediaRouteProviderProtocol.SERVICE_MSG_REGISTERED;
+import static android.support.v7.media.MediaRouteProviderProtocol.SERVICE_VERSION_1;
+import static android.support.v7.media.MediaRouteProviderProtocol.isValidRemoteMessenger;
+
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -24,10 +53,10 @@
import android.os.DeadObjectException;
import android.os.Handler;
import android.os.IBinder;
-import android.os.RemoteException;
import android.os.IBinder.DeathRecipient;
import android.os.Message;
import android.os.Messenger;
+import android.os.RemoteException;
import android.support.annotation.NonNull;
import android.support.v7.media.MediaRouter.ControlRequestCallback;
import android.util.Log;
@@ -37,8 +66,6 @@
import java.util.ArrayList;
import java.util.List;
-import static android.support.v7.media.MediaRouteProviderProtocol.*;
-
/**
* Maintains a connection to a particular media route provider service.
*/
@@ -537,7 +564,7 @@
int controllerId = mNextControllerId++;
Bundle data = new Bundle();
data.putString(CLIENT_DATA_ROUTE_ID, routeId);
- data.putString(CLIENT_DATA_ROUTE_GROUP_ID, routeGroupId);
+ data.putString(CLIENT_DATA_ROUTE_LIBRARY_GROUP, routeGroupId);
sendRequest(CLIENT_MSG_CREATE_ROUTE_CONTROLLER,
mNextRequestId++, controllerId, null, data);
return controllerId;
diff --git a/v7/preference/constants/android/support/v7/preference/AndroidResources.java b/v7/preference/constants/android/support/v7/preference/AndroidResources.java
index aeddb15..d08a887 100644
--- a/v7/preference/constants/android/support/v7/preference/AndroidResources.java
+++ b/v7/preference/constants/android/support/v7/preference/AndroidResources.java
@@ -16,14 +16,14 @@
package android.support.v7.preference;
-import android.support.annotation.RestrictTo;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import android.support.annotation.RestrictTo;
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class AndroidResources {
public static final int ANDROID_R_ICON_FRAME = android.R.id.icon_frame;
diff --git a/v7/preference/src/android/support/v7/internal/package-info.java b/v7/preference/src/android/support/v7/internal/package-info.java
index c146ca5..b5fabd6 100644
--- a/v7/preference/src/android/support/v7/internal/package-info.java
+++ b/v7/preference/src/android/support/v7/internal/package-info.java
@@ -1,9 +1,9 @@
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
package android.support.v7.internal;
-import android.support.annotation.RestrictTo;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
\ No newline at end of file
+import android.support.annotation.RestrictTo;
\ No newline at end of file
diff --git a/v7/preference/src/android/support/v7/internal/widget/PreferenceImageView.java b/v7/preference/src/android/support/v7/internal/widget/PreferenceImageView.java
index a02872f..e2a133c 100644
--- a/v7/preference/src/android/support/v7/internal/widget/PreferenceImageView.java
+++ b/v7/preference/src/android/support/v7/internal/widget/PreferenceImageView.java
@@ -16,6 +16,8 @@
package android.support.v7.internal.widget;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.support.annotation.RestrictTo;
@@ -23,13 +25,11 @@
import android.util.AttributeSet;
import android.widget.ImageView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Extension of ImageView that correctly applies maxWidth and maxHeight.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class PreferenceImageView extends ImageView {
private int mMaxWidth = Integer.MAX_VALUE;
diff --git a/v7/preference/src/android/support/v7/preference/CheckBoxPreference.java b/v7/preference/src/android/support/v7/preference/CheckBoxPreference.java
index 72143a4..086f22d 100644
--- a/v7/preference/src/android/support/v7/preference/CheckBoxPreference.java
+++ b/v7/preference/src/android/support/v7/preference/CheckBoxPreference.java
@@ -16,6 +16,8 @@
package android.support.v7.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.support.annotation.RestrictTo;
@@ -26,8 +28,6 @@
import android.widget.Checkable;
import android.widget.CompoundButton;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A {@link Preference} that provides checkbox widget
* functionality.
@@ -99,7 +99,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
protected void performClick(View view) {
super.performClick(view);
diff --git a/v7/preference/src/android/support/v7/preference/DropDownPreference.java b/v7/preference/src/android/support/v7/preference/DropDownPreference.java
index ec6339e..89c9d2e 100644
--- a/v7/preference/src/android/support/v7/preference/DropDownPreference.java
+++ b/v7/preference/src/android/support/v7/preference/DropDownPreference.java
@@ -16,6 +16,8 @@
package android.support.v7.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.RestrictTo;
@@ -26,8 +28,6 @@
import android.widget.ArrayAdapter;
import android.widget.Spinner;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A version of {@link ListPreference} that presents the options in a
* drop down menu rather than a dialog.
@@ -102,7 +102,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public int findSpinnerIndexOfValue(String value) {
CharSequence[] entryValues = getEntryValues();
if (value != null && entryValues != null) {
diff --git a/v7/preference/src/android/support/v7/preference/EditTextPreferenceDialogFragmentCompat.java b/v7/preference/src/android/support/v7/preference/EditTextPreferenceDialogFragmentCompat.java
index cb18ba9..a6cc81f 100644
--- a/v7/preference/src/android/support/v7/preference/EditTextPreferenceDialogFragmentCompat.java
+++ b/v7/preference/src/android/support/v7/preference/EditTextPreferenceDialogFragmentCompat.java
@@ -16,14 +16,14 @@
package android.support.v7.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.RestrictTo;
import android.view.View;
import android.widget.EditText;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
public class EditTextPreferenceDialogFragmentCompat extends PreferenceDialogFragmentCompat {
private static final String SAVE_STATE_TEXT = "EditTextPreferenceDialogFragment.text";
@@ -76,7 +76,7 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
protected boolean needInputMethod() {
// We want the input method to show, if possible, when dialog is displayed
diff --git a/v7/preference/src/android/support/v7/preference/Preference.java b/v7/preference/src/android/support/v7/preference/Preference.java
index 7d2bd3f..deb3b12 100644
--- a/v7/preference/src/android/support/v7/preference/Preference.java
+++ b/v7/preference/src/android/support/v7/preference/Preference.java
@@ -16,6 +16,8 @@
package android.support.v7.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
@@ -42,8 +44,6 @@
import java.util.ArrayList;
import java.util.List;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Represents the basic Preference UI building
* block displayed by a {@link PreferenceFragmentCompat} in the form of a
@@ -960,7 +960,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected void performClick(View view) {
performClick();
}
@@ -970,7 +970,7 @@
*
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public void performClick() {
if (!isEnabled()) {
@@ -1111,7 +1111,7 @@
* Called from {@link PreferenceGroup} to pass in an ID for reuse
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected void onAttachedToHierarchy(PreferenceManager preferenceManager, long id) {
mId = id;
mHasId = true;
diff --git a/v7/preference/src/android/support/v7/preference/PreferenceDialogFragmentCompat.java b/v7/preference/src/android/support/v7/preference/PreferenceDialogFragmentCompat.java
index 3989385..b61bae5 100644
--- a/v7/preference/src/android/support/v7/preference/PreferenceDialogFragmentCompat.java
+++ b/v7/preference/src/android/support/v7/preference/PreferenceDialogFragmentCompat.java
@@ -16,6 +16,8 @@
package android.support.v7.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
@@ -37,8 +39,6 @@
import android.view.WindowManager;
import android.widget.TextView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Abstract base class which presents a dialog associated with a
* {@link android.support.v7.preference.DialogPreference}. Since the preference object may
@@ -194,7 +194,7 @@
* the soft input method brought up automatically.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected boolean needInputMethod() {
return false;
}
diff --git a/v7/preference/src/android/support/v7/preference/PreferenceFragmentCompat.java b/v7/preference/src/android/support/v7/preference/PreferenceFragmentCompat.java
index 751d9f7..7d42155 100644
--- a/v7/preference/src/android/support/v7/preference/PreferenceFragmentCompat.java
+++ b/v7/preference/src/android/support/v7/preference/PreferenceFragmentCompat.java
@@ -16,6 +16,8 @@
package android.support.v7.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -39,8 +41,6 @@
import android.view.View;
import android.view.ViewGroup;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Shows a hierarchy of {@link Preference} objects as
* lists. These preferences will
@@ -545,12 +545,12 @@
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected void onBindPreferences() {
}
/** @hide */
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected void onUnbindPreferences() {
}
@@ -652,7 +652,7 @@
* @return Fragment to possibly use as a callback
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public Fragment getCallbackFragment() {
return null;
}
diff --git a/v7/preference/src/android/support/v7/preference/PreferenceGroup.java b/v7/preference/src/android/support/v7/preference/PreferenceGroup.java
index 0fc77ce..da7f8dc 100644
--- a/v7/preference/src/android/support/v7/preference/PreferenceGroup.java
+++ b/v7/preference/src/android/support/v7/preference/PreferenceGroup.java
@@ -16,6 +16,8 @@
package android.support.v7.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Bundle;
@@ -30,8 +32,6 @@
import java.util.Collections;
import java.util.List;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A container for multiple
* {@link Preference} objects. It is a base class for Preference objects that are
@@ -322,7 +322,7 @@
* Returns true if we're between {@link #onAttached()} and {@link #onPrepareForRemoval()}
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public boolean isAttached() {
return mAttachedToHierarchy;
}
diff --git a/v7/preference/src/android/support/v7/preference/PreferenceGroupAdapter.java b/v7/preference/src/android/support/v7/preference/PreferenceGroupAdapter.java
index c8af738..feef983 100644
--- a/v7/preference/src/android/support/v7/preference/PreferenceGroupAdapter.java
+++ b/v7/preference/src/android/support/v7/preference/PreferenceGroupAdapter.java
@@ -16,6 +16,8 @@
package android.support.v7.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Handler;
@@ -31,15 +33,13 @@
import java.util.ArrayList;
import java.util.List;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* An adapter that connects a RecyclerView to the {@link Preference} objects contained in the
* associated {@link PreferenceGroup}.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class PreferenceGroupAdapter extends RecyclerView.Adapter<PreferenceViewHolder>
implements Preference.OnPreferenceChangeInternalListener,
PreferenceGroup.PreferencePositionCallback {
diff --git a/v7/preference/src/android/support/v7/preference/PreferenceManager.java b/v7/preference/src/android/support/v7/preference/PreferenceManager.java
index 7af430f..0da1a9b 100644
--- a/v7/preference/src/android/support/v7/preference/PreferenceManager.java
+++ b/v7/preference/src/android/support/v7/preference/PreferenceManager.java
@@ -16,6 +16,8 @@
package android.support.v7.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.drawable.Drawable;
@@ -25,8 +27,6 @@
import android.support.v4.os.BuildCompat;
import android.text.TextUtils;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Used to help create {@link Preference} hierarchies
* from activities or XML.
@@ -101,7 +101,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public PreferenceManager(Context context) {
mContext = context;
@@ -120,7 +120,7 @@
* root).
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public PreferenceScreen inflateFromResource(Context context, int resId,
PreferenceScreen rootPreferences) {
// Block commits
diff --git a/v7/preference/src/android/support/v7/preference/PreferenceRecyclerViewAccessibilityDelegate.java b/v7/preference/src/android/support/v7/preference/PreferenceRecyclerViewAccessibilityDelegate.java
index d2a2454..e42bcd8 100644
--- a/v7/preference/src/android/support/v7/preference/PreferenceRecyclerViewAccessibilityDelegate.java
+++ b/v7/preference/src/android/support/v7/preference/PreferenceRecyclerViewAccessibilityDelegate.java
@@ -16,6 +16,8 @@
package android.support.v7.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.os.Bundle;
import android.support.annotation.RestrictTo;
import android.support.v4.view.AccessibilityDelegateCompat;
@@ -23,16 +25,13 @@
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.RecyclerViewAccessibilityDelegate;
import android.view.View;
-import android.view.accessibility.AccessibilityEvent;
-
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
/**
* The AccessibilityDelegate used by the RecyclerView that displays Views for Preferences.
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class PreferenceRecyclerViewAccessibilityDelegate
extends RecyclerViewAccessibilityDelegate {
final RecyclerView mRecyclerView;
diff --git a/v7/preference/src/android/support/v7/preference/PreferenceScreen.java b/v7/preference/src/android/support/v7/preference/PreferenceScreen.java
index 8434354..e29264a 100644
--- a/v7/preference/src/android/support/v7/preference/PreferenceScreen.java
+++ b/v7/preference/src/android/support/v7/preference/PreferenceScreen.java
@@ -16,13 +16,13 @@
package android.support.v7.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.support.v4.content.res.TypedArrayUtils;
import android.util.AttributeSet;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Represents a top-level {@link Preference} that
* is the root of a Preference hierarchy. A {@link PreferenceFragmentCompat}
@@ -84,7 +84,7 @@
* Do NOT use this constructor, use {@link PreferenceManager#createPreferenceScreen(Context)}.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public PreferenceScreen(Context context, AttributeSet attrs) {
super(context, attrs, TypedArrayUtils.getAttr(context, R.attr.preferenceScreenStyle,
android.R.attr.preferenceScreenStyle));
diff --git a/v7/preference/src/android/support/v7/preference/SwitchPreferenceCompat.java b/v7/preference/src/android/support/v7/preference/SwitchPreferenceCompat.java
index 1784f9f..6b7b93f 100644
--- a/v7/preference/src/android/support/v7/preference/SwitchPreferenceCompat.java
+++ b/v7/preference/src/android/support/v7/preference/SwitchPreferenceCompat.java
@@ -16,6 +16,8 @@
package android.support.v7.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.support.annotation.RestrictTo;
@@ -27,8 +29,6 @@
import android.widget.Checkable;
import android.widget.CompoundButton;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* A {@link Preference} that provides a two-state toggleable option.
* <p>
@@ -201,7 +201,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
protected void performClick(View view) {
super.performClick(view);
diff --git a/v7/preference/src/android/support/v7/preference/TwoStatePreference.java b/v7/preference/src/android/support/v7/preference/TwoStatePreference.java
index 19071f5..537c88a 100644
--- a/v7/preference/src/android/support/v7/preference/TwoStatePreference.java
+++ b/v7/preference/src/android/support/v7/preference/TwoStatePreference.java
@@ -16,6 +16,8 @@
package android.support.v7.preference;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Parcel;
@@ -26,8 +28,6 @@
import android.view.View;
import android.widget.TextView;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Common base class for preferences that have two selectable states, persist a
* boolean value in SharedPreferences, and may have dependent preferences that are
@@ -203,7 +203,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
protected void syncSummaryView(View view) {
if (!(view instanceof TextView)) {
return;
diff --git a/v7/preference/src/android/support/v7/preference/UnPressableLinearLayout.java b/v7/preference/src/android/support/v7/preference/UnPressableLinearLayout.java
index d8c0970..1524d31 100644
--- a/v7/preference/src/android/support/v7/preference/UnPressableLinearLayout.java
+++ b/v7/preference/src/android/support/v7/preference/UnPressableLinearLayout.java
@@ -16,7 +16,7 @@
package android.support.v7.preference;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.content.Context;
import android.support.annotation.RestrictTo;
@@ -29,7 +29,7 @@
* or long-clickable.
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public class UnPressableLinearLayout extends LinearLayout {
public UnPressableLinearLayout(Context context) {
this(context, null);
diff --git a/v7/preference/src/android/support/v7/preference/internal/AbstractMultiSelectListPreference.java b/v7/preference/src/android/support/v7/preference/internal/AbstractMultiSelectListPreference.java
index 6fcd77c..64d02ef 100644
--- a/v7/preference/src/android/support/v7/preference/internal/AbstractMultiSelectListPreference.java
+++ b/v7/preference/src/android/support/v7/preference/internal/AbstractMultiSelectListPreference.java
@@ -16,6 +16,8 @@
package android.support.v7.preference.internal;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
+
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.support.v7.preference.DialogPreference;
@@ -23,8 +25,6 @@
import java.util.Set;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
-
/**
* Stub superclass for {@link android.support.v14.preference.MultiSelectListPreference} so that we
* can reference it from
@@ -32,7 +32,7 @@
*
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
public abstract class AbstractMultiSelectListPreference extends DialogPreference {
public AbstractMultiSelectListPreference(Context context, AttributeSet attrs, int defStyleAttr,
int defStyleRes) {
diff --git a/v7/preference/src/android/support/v7/preference/internal/package-info.java b/v7/preference/src/android/support/v7/preference/internal/package-info.java
index 6561bf1..b110d3a 100644
--- a/v7/preference/src/android/support/v7/preference/internal/package-info.java
+++ b/v7/preference/src/android/support/v7/preference/internal/package-info.java
@@ -1,9 +1,9 @@
/**
* @hide
*/
-@RestrictTo(GROUP_ID)
+@RestrictTo(LIBRARY_GROUP)
package android.support.v7.preference.internal;
-import android.support.annotation.RestrictTo;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
\ No newline at end of file
+import android.support.annotation.RestrictTo;
\ No newline at end of file
diff --git a/v7/recyclerview/src/android/support/v7/widget/LinearLayoutManager.java b/v7/recyclerview/src/android/support/v7/widget/LinearLayoutManager.java
index ceabf01..c078e95 100644
--- a/v7/recyclerview/src/android/support/v7/widget/LinearLayoutManager.java
+++ b/v7/recyclerview/src/android/support/v7/widget/LinearLayoutManager.java
@@ -16,7 +16,7 @@
package android.support.v7.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import static android.support.v7.widget.RecyclerView.NO_POSITION;
import android.content.Context;
@@ -1965,7 +1965,7 @@
/**
* @hide This method should be called by ItemTouchHelper only.
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
@Override
public void prepareForDrop(View view, View target, int x, int y) {
assertNotInLayoutOrScroll("Cannot drop a view during a scroll or layout calculation");
@@ -2184,7 +2184,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static class SavedState implements Parcelable {
int mAnchorPosition;
diff --git a/v7/recyclerview/src/android/support/v7/widget/RecyclerView.java b/v7/recyclerview/src/android/support/v7/widget/RecyclerView.java
index b3f9eb5..0ce09a8 100644
--- a/v7/recyclerview/src/android/support/v7/widget/RecyclerView.java
+++ b/v7/recyclerview/src/android/support/v7/widget/RecyclerView.java
@@ -17,7 +17,7 @@
package android.support.v7.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import android.content.Context;
import android.content.res.TypedArray;
@@ -11060,7 +11060,7 @@
* This is public so that the CREATOR can be access on cold launch.
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static class SavedState extends AbsSavedState {
Parcelable mLayoutState;
diff --git a/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java b/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java
index 62a7f09..99f6621 100644
--- a/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java
+++ b/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java
@@ -16,7 +16,7 @@
package android.support.v7.widget;
-import static android.support.annotation.RestrictTo.Scope.GROUP_ID;
+import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import static android.support.v7.widget.LayoutState.ITEM_DIRECTION_HEAD;
import static android.support.v7.widget.LayoutState.ITEM_DIRECTION_TAIL;
import static android.support.v7.widget.LayoutState.LAYOUT_END;
@@ -2996,7 +2996,7 @@
/**
* @hide
*/
- @RestrictTo(GROUP_ID)
+ @RestrictTo(LIBRARY_GROUP)
public static class SavedState implements Parcelable {
int mAnchorPosition;