summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/current.txt248
-rw-r--r--api/test-current.txt4
-rw-r--r--cmds/statsd/src/atoms.proto157
-rw-r--r--core/proto/android/telephony/enums.proto38
-rw-r--r--data/etc/car/Android.bp7
-rw-r--r--data/etc/car/com.android.car.bugreport.xml24
-rw-r--r--non-updatable-api/current.txt248
-rw-r--r--packages/Tethering/TEST_MAPPING7
-rw-r--r--packages/Tethering/src/android/net/ip/IpServer.java50
-rw-r--r--packages/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java341
-rw-r--r--packages/Tethering/src/com/android/networkstack/tethering/PrivateAddressCoordinator.java29
-rw-r--r--packages/Tethering/src/com/android/networkstack/tethering/Tethering.java5
-rw-r--r--packages/Tethering/tests/unit/src/android/net/ip/IpServerTest.java170
-rw-r--r--packages/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java6
-rw-r--r--packages/Tethering/tests/unit/src/com/android/networkstack/tethering/PrivateAddressCoordinatorTest.java15
-rw-r--r--packages/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringTest.java6
-rw-r--r--services/core/java/com/android/server/adb/AdbService.java7
-rw-r--r--services/core/jni/com_android_server_location_GnssLocationProvider.cpp26
-rw-r--r--test-base/hiddenapi/src/android/test/AndroidTestCase.java46
19 files changed, 987 insertions, 447 deletions
diff --git a/api/current.txt b/api/current.txt
index c5c15bef91ef..51f7f58bb8fa 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -3618,7 +3618,7 @@ package android.app {
ctor public ActionBar.LayoutParams(int);
ctor public ActionBar.LayoutParams(android.app.ActionBar.LayoutParams);
ctor public ActionBar.LayoutParams(android.view.ViewGroup.LayoutParams);
- field @android.view.ViewDebug.ExportedProperty(category="layout", mapping={@android.view.ViewDebug.IntToString(from=0xffffffff, to="NONE"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.NO_GRAVITY, to="NONE"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.TOP, to="TOP"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.BOTTOM, to="BOTTOM"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.LEFT, to="LEFT"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.RIGHT, to="RIGHT"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.START, to="START"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.END, to="END"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.CENTER_VERTICAL, to="CENTER_VERTICAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.FILL_VERTICAL, to="FILL_VERTICAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.CENTER_HORIZONTAL, to="CENTER_HORIZONTAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.FILL_HORIZONTAL, to="FILL_HORIZONTAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.CENTER, to="CENTER"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.FILL, to="FILL")}) public int gravity;
+ field public int gravity;
}
public static interface ActionBar.OnMenuVisibilityListener {
@@ -9741,7 +9741,7 @@ package android.content {
method public final <T> T getSystemService(@NonNull Class<T>);
method @Nullable public abstract String getSystemServiceName(@NonNull Class<?>);
method @NonNull public final CharSequence getText(@StringRes int);
- method @android.view.ViewDebug.ExportedProperty(deepExport=true) public abstract android.content.res.Resources.Theme getTheme();
+ method public abstract android.content.res.Resources.Theme getTheme();
method @Deprecated public abstract android.graphics.drawable.Drawable getWallpaper();
method @Deprecated public abstract int getWallpaperDesiredMinimumHeight();
method @Deprecated public abstract int getWallpaperDesiredMinimumWidth();
@@ -51645,13 +51645,13 @@ package android.view {
method @Nullable public CharSequence getAccessibilityPaneTitle();
method @IdRes public int getAccessibilityTraversalAfter();
method @IdRes public int getAccessibilityTraversalBefore();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getAlpha();
+ method public float getAlpha();
method public android.view.animation.Animation getAnimation();
method @Nullable public android.graphics.Matrix getAnimationMatrix();
method public android.os.IBinder getApplicationWindowToken();
method @NonNull public int[] getAttributeResolutionStack(@AttrRes int);
method @NonNull public java.util.Map<java.lang.Integer,java.lang.Integer> getAttributeSourceResourceMap();
- method @android.view.ViewDebug.ExportedProperty @Nullable public String[] getAutofillHints();
+ method @Nullable public String[] getAutofillHints();
method public final android.view.autofill.AutofillId getAutofillId();
method public int getAutofillType();
method @Nullable public android.view.autofill.AutofillValue getAutofillValue();
@@ -51659,8 +51659,8 @@ package android.view {
method @Nullable public android.graphics.BlendMode getBackgroundTintBlendMode();
method @Nullable public android.content.res.ColorStateList getBackgroundTintList();
method @Nullable public android.graphics.PorterDuff.Mode getBackgroundTintMode();
- method @android.view.ViewDebug.ExportedProperty(category="layout") public int getBaseline();
- method @android.view.ViewDebug.CapturedViewProperty public final int getBottom();
+ method public int getBaseline();
+ method public final int getBottom();
method protected float getBottomFadingEdgeStrength();
method protected int getBottomPaddingOffset();
method public float getCameraDistance();
@@ -51668,10 +51668,10 @@ package android.view {
method public boolean getClipBounds(android.graphics.Rect);
method public final boolean getClipToOutline();
method @Nullable public final android.view.contentcapture.ContentCaptureSession getContentCaptureSession();
- method @android.view.ViewDebug.ExportedProperty(category="accessibility") public CharSequence getContentDescription();
- method @android.view.ViewDebug.CapturedViewProperty public final android.content.Context getContext();
+ method public CharSequence getContentDescription();
+ method public final android.content.Context getContext();
method protected android.view.ContextMenu.ContextMenuInfo getContextMenuInfo();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public final boolean getDefaultFocusHighlightEnabled();
+ method public final boolean getDefaultFocusHighlightEnabled();
method public static int getDefaultSize(int, int);
method public android.view.Display getDisplay();
method public final int[] getDrawableState();
@@ -51681,11 +51681,11 @@ package android.view {
method @Deprecated public int getDrawingCacheQuality();
method public void getDrawingRect(android.graphics.Rect);
method public long getDrawingTime();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getElevation();
+ method public float getElevation();
method @StyleRes public int getExplicitStyle();
- method @android.view.ViewDebug.ExportedProperty public boolean getFilterTouchesWhenObscured();
- method @android.view.ViewDebug.ExportedProperty public boolean getFitsSystemWindows();
- method @android.view.ViewDebug.ExportedProperty(mapping={@android.view.ViewDebug.IntToString(from=android.view.View.NOT_FOCUSABLE, to="NOT_FOCUSABLE"), @android.view.ViewDebug.IntToString(from=android.view.View.FOCUSABLE, to="FOCUSABLE"), @android.view.ViewDebug.IntToString(from=android.view.View.FOCUSABLE_AUTO, to="FOCUSABLE_AUTO")}, category="focus") public int getFocusable();
+ method public boolean getFilterTouchesWhenObscured();
+ method public boolean getFitsSystemWindows();
+ method public int getFocusable();
method public java.util.ArrayList<android.view.View> getFocusables(int);
method public void getFocusedRect(android.graphics.Rect);
method public android.graphics.drawable.Drawable getForeground();
@@ -51697,22 +51697,22 @@ package android.view {
method public final boolean getGlobalVisibleRect(android.graphics.Rect);
method public android.os.Handler getHandler();
method public final boolean getHasOverlappingRendering();
- method @android.view.ViewDebug.ExportedProperty(category="layout") public final int getHeight();
+ method public final int getHeight();
method public void getHitRect(android.graphics.Rect);
method public int getHorizontalFadingEdgeLength();
method protected int getHorizontalScrollbarHeight();
method @Nullable public android.graphics.drawable.Drawable getHorizontalScrollbarThumbDrawable();
method @Nullable public android.graphics.drawable.Drawable getHorizontalScrollbarTrackDrawable();
- method @android.view.ViewDebug.CapturedViewProperty @IdRes public int getId();
- method @android.view.ViewDebug.ExportedProperty(category="accessibility", mapping={@android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_ACCESSIBILITY_AUTO, to="auto"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_ACCESSIBILITY_YES, to="yes"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_ACCESSIBILITY_NO, to="no"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, to="noHideDescendants")}) public int getImportantForAccessibility();
- method @android.view.ViewDebug.ExportedProperty(mapping={@android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_AUTOFILL_AUTO, to="auto"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_AUTOFILL_YES, to="yes"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_AUTOFILL_NO, to="no"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, to="yesExcludeDescendants"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, to="noExcludeDescendants")}) public int getImportantForAutofill();
+ method @IdRes public int getId();
+ method public int getImportantForAccessibility();
+ method public int getImportantForAutofill();
method public boolean getKeepScreenOn();
method public android.view.KeyEvent.DispatcherState getKeyDispatcherState();
- method @android.view.ViewDebug.ExportedProperty(category="accessibility") @IdRes public int getLabelFor();
+ method @IdRes public int getLabelFor();
method public int getLayerType();
- method @android.view.ViewDebug.ExportedProperty(category="layout", mapping={@android.view.ViewDebug.IntToString(from=android.view.View.LAYOUT_DIRECTION_LTR, to="RESOLVED_DIRECTION_LTR"), @android.view.ViewDebug.IntToString(from=android.view.View.LAYOUT_DIRECTION_RTL, to="RESOLVED_DIRECTION_RTL")}) public int getLayoutDirection();
- method @android.view.ViewDebug.ExportedProperty(deepExport=true, prefix="layout_") public android.view.ViewGroup.LayoutParams getLayoutParams();
- method @android.view.ViewDebug.CapturedViewProperty public final int getLeft();
+ method public int getLayoutDirection();
+ method public android.view.ViewGroup.LayoutParams getLayoutParams();
+ method public final int getLeft();
method protected float getLeftFadingEdgeStrength();
method protected int getLeftPaddingOffset();
method public final boolean getLocalVisibleRect(android.graphics.Rect);
@@ -51721,10 +51721,10 @@ package android.view {
method public void getLocationOnScreen(@Size(2) int[]);
method public android.graphics.Matrix getMatrix();
method public final int getMeasuredHeight();
- method @android.view.ViewDebug.ExportedProperty(category="measurement", flagMapping={@android.view.ViewDebug.FlagToString(mask=android.view.View.MEASURED_STATE_MASK, equals=android.view.View.MEASURED_STATE_TOO_SMALL, name="MEASURED_STATE_TOO_SMALL")}) public final int getMeasuredHeightAndState();
+ method public final int getMeasuredHeightAndState();
method public final int getMeasuredState();
method public final int getMeasuredWidth();
- method @android.view.ViewDebug.ExportedProperty(category="measurement", flagMapping={@android.view.ViewDebug.FlagToString(mask=android.view.View.MEASURED_STATE_MASK, equals=android.view.View.MEASURED_STATE_TOO_SMALL, name="MEASURED_STATE_TOO_SMALL")}) public final int getMeasuredWidthAndState();
+ method public final int getMeasuredWidthAndState();
method public int getMinimumHeight();
method public int getMinimumWidth();
method @IdRes public int getNextClusterForwardId();
@@ -51747,50 +51747,50 @@ package android.view {
method public int getPaddingTop();
method public final android.view.ViewParent getParent();
method public android.view.ViewParent getParentForAccessibility();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getPivotX();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getPivotY();
+ method public float getPivotX();
+ method public float getPivotY();
method public android.view.PointerIcon getPointerIcon();
method public android.content.res.Resources getResources();
method public final boolean getRevealOnFocusHint();
- method @android.view.ViewDebug.CapturedViewProperty public final int getRight();
+ method public final int getRight();
method protected float getRightFadingEdgeStrength();
method protected int getRightPaddingOffset();
method public android.view.View getRootView();
method public android.view.WindowInsets getRootWindowInsets();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getRotation();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getRotationX();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getRotationY();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getScaleX();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getScaleY();
+ method public float getRotation();
+ method public float getRotationX();
+ method public float getRotationY();
+ method public float getScaleX();
+ method public float getScaleY();
method public int getScrollBarDefaultDelayBeforeFade();
method public int getScrollBarFadeDuration();
method public int getScrollBarSize();
- method @android.view.ViewDebug.ExportedProperty(mapping={@android.view.ViewDebug.IntToString(from=android.view.View.SCROLLBARS_INSIDE_OVERLAY, to="INSIDE_OVERLAY"), @android.view.ViewDebug.IntToString(from=android.view.View.SCROLLBARS_INSIDE_INSET, to="INSIDE_INSET"), @android.view.ViewDebug.IntToString(from=android.view.View.SCROLLBARS_OUTSIDE_OVERLAY, to="OUTSIDE_OVERLAY"), @android.view.ViewDebug.IntToString(from=android.view.View.SCROLLBARS_OUTSIDE_INSET, to="OUTSIDE_INSET")}) public int getScrollBarStyle();
+ method public int getScrollBarStyle();
method public int getScrollIndicators();
method public final int getScrollX();
method public final int getScrollY();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") @ColorInt public int getSolidColor();
+ method @ColorInt public int getSolidColor();
method @LayoutRes public int getSourceLayoutResId();
method public android.animation.StateListAnimator getStateListAnimator();
method protected int getSuggestedMinimumHeight();
method protected int getSuggestedMinimumWidth();
method @NonNull public java.util.List<android.graphics.Rect> getSystemGestureExclusionRects();
method public int getSystemUiVisibility();
- method @android.view.ViewDebug.ExportedProperty public Object getTag();
+ method public Object getTag();
method public Object getTag(int);
- method @android.view.ViewDebug.ExportedProperty(category="text", mapping={@android.view.ViewDebug.IntToString(from=android.view.View.TEXT_ALIGNMENT_INHERIT, to="INHERIT"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_ALIGNMENT_GRAVITY, to="GRAVITY"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_ALIGNMENT_TEXT_START, to="TEXT_START"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_ALIGNMENT_TEXT_END, to="TEXT_END"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_ALIGNMENT_CENTER, to="CENTER"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_ALIGNMENT_VIEW_START, to="VIEW_START"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_ALIGNMENT_VIEW_END, to="VIEW_END")}) public int getTextAlignment();
- method @android.view.ViewDebug.ExportedProperty(category="text", mapping={@android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_INHERIT, to="INHERIT"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_FIRST_STRONG, to="FIRST_STRONG"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_ANY_RTL, to="ANY_RTL"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_LTR, to="LTR"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_RTL, to="RTL"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_LOCALE, to="LOCALE"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_FIRST_STRONG_LTR, to="FIRST_STRONG_LTR"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_FIRST_STRONG_RTL, to="FIRST_STRONG_RTL")}) public int getTextDirection();
+ method public int getTextAlignment();
+ method public int getTextDirection();
method @Nullable public CharSequence getTooltipText();
- method @android.view.ViewDebug.CapturedViewProperty public final int getTop();
+ method public final int getTop();
method protected float getTopFadingEdgeStrength();
method protected int getTopPaddingOffset();
method public android.view.TouchDelegate getTouchDelegate();
method public java.util.ArrayList<android.view.View> getTouchables();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getTransitionAlpha();
- method @android.view.ViewDebug.ExportedProperty public String getTransitionName();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getTranslationX();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getTranslationY();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getTranslationZ();
+ method public float getTransitionAlpha();
+ method public String getTransitionName();
+ method public float getTranslationX();
+ method public float getTranslationY();
+ method public float getTranslationZ();
method public long getUniqueDrawingId();
method public int getVerticalFadingEdgeLength();
method public int getVerticalScrollbarPosition();
@@ -51798,25 +51798,25 @@ package android.view {
method @Nullable public android.graphics.drawable.Drawable getVerticalScrollbarTrackDrawable();
method public int getVerticalScrollbarWidth();
method public android.view.ViewTreeObserver getViewTreeObserver();
- method @android.view.ViewDebug.ExportedProperty(mapping={@android.view.ViewDebug.IntToString(from=android.view.View.VISIBLE, to="VISIBLE"), @android.view.ViewDebug.IntToString(from=android.view.View.INVISIBLE, to="INVISIBLE"), @android.view.ViewDebug.IntToString(from=android.view.View.GONE, to="GONE")}) public int getVisibility();
- method @android.view.ViewDebug.ExportedProperty(category="layout") public final int getWidth();
+ method public int getVisibility();
+ method public final int getWidth();
method protected int getWindowAttachCount();
method public android.view.WindowId getWindowId();
method public int getWindowSystemUiVisibility();
method public android.os.IBinder getWindowToken();
method public int getWindowVisibility();
method public void getWindowVisibleDisplayFrame(android.graphics.Rect);
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getX();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getY();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getZ();
+ method public float getX();
+ method public float getY();
+ method public float getZ();
method public boolean hasExplicitFocusable();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public boolean hasFocus();
+ method public boolean hasFocus();
method public boolean hasFocusable();
method public boolean hasNestedScrollingParent();
method public boolean hasOnClickListeners();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean hasOverlappingRendering();
+ method public boolean hasOverlappingRendering();
method public boolean hasPointerCapture();
- method @android.view.ViewDebug.ExportedProperty(category="layout") public boolean hasTransientState();
+ method public boolean hasTransientState();
method public boolean hasWindowFocus();
method public static android.view.View inflate(android.content.Context, @LayoutRes int, android.view.ViewGroup);
method @Deprecated public void invalidate(android.graphics.Rect);
@@ -51826,48 +51826,48 @@ package android.view {
method public void invalidateOutline();
method public boolean isAccessibilityFocused();
method public boolean isAccessibilityHeading();
- method @android.view.ViewDebug.ExportedProperty public boolean isActivated();
+ method public boolean isActivated();
method public boolean isAttachedToWindow();
- method @android.view.ViewDebug.ExportedProperty public boolean isClickable();
+ method public boolean isClickable();
method public boolean isContextClickable();
method public boolean isDirty();
- method @Deprecated @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean isDrawingCacheEnabled();
+ method @Deprecated public boolean isDrawingCacheEnabled();
method public boolean isDuplicateParentStateEnabled();
- method @android.view.ViewDebug.ExportedProperty public boolean isEnabled();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public final boolean isFocusable();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public final boolean isFocusableInTouchMode();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public boolean isFocused();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public final boolean isFocusedByDefault();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean isForceDarkAllowed();
- method @android.view.ViewDebug.ExportedProperty public boolean isHapticFeedbackEnabled();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean isHardwareAccelerated();
+ method public boolean isEnabled();
+ method public final boolean isFocusable();
+ method public final boolean isFocusableInTouchMode();
+ method public boolean isFocused();
+ method public final boolean isFocusedByDefault();
+ method public boolean isForceDarkAllowed();
+ method public boolean isHapticFeedbackEnabled();
+ method public boolean isHardwareAccelerated();
method public boolean isHorizontalFadingEdgeEnabled();
method public boolean isHorizontalScrollBarEnabled();
- method @android.view.ViewDebug.ExportedProperty public boolean isHovered();
+ method public boolean isHovered();
method public boolean isImportantForAccessibility();
method public final boolean isImportantForAutofill();
method public boolean isInEditMode();
method public boolean isInLayout();
- method @android.view.ViewDebug.ExportedProperty public boolean isInTouchMode();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public final boolean isKeyboardNavigationCluster();
+ method public boolean isInTouchMode();
+ method public final boolean isKeyboardNavigationCluster();
method public boolean isLaidOut();
method public boolean isLayoutDirectionResolved();
method public boolean isLayoutRequested();
method public boolean isLongClickable();
method public boolean isNestedScrollingEnabled();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean isOpaque();
+ method public boolean isOpaque();
method protected boolean isPaddingOffsetRequired();
method public boolean isPaddingRelative();
method public boolean isPivotSet();
- method @android.view.ViewDebug.ExportedProperty public boolean isPressed();
+ method public boolean isPressed();
method public boolean isSaveEnabled();
method public boolean isSaveFromParentEnabled();
method public boolean isScreenReaderFocusable();
method public boolean isScrollContainer();
method public boolean isScrollbarFadingEnabled();
- method @android.view.ViewDebug.ExportedProperty public boolean isSelected();
+ method public boolean isSelected();
method public boolean isShown();
- method @android.view.ViewDebug.ExportedProperty public boolean isSoundEffectsEnabled();
+ method public boolean isSoundEffectsEnabled();
method public final boolean isTemporarilyDetached();
method public boolean isTextAlignmentResolved();
method public boolean isTextDirectionResolved();
@@ -52153,8 +52153,8 @@ package android.view {
method public void unscheduleDrawable(android.graphics.drawable.Drawable);
method public final void updateDragShadow(android.view.View.DragShadowBuilder);
method @CallSuper protected boolean verifyDrawable(@NonNull android.graphics.drawable.Drawable);
- method @Deprecated @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean willNotCacheDrawing();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean willNotDraw();
+ method @Deprecated public boolean willNotCacheDrawing();
+ method public boolean willNotDraw();
field public static final int ACCESSIBILITY_LIVE_REGION_ASSERTIVE = 2; // 0x2
field public static final int ACCESSIBILITY_LIVE_REGION_NONE = 0; // 0x0
field public static final int ACCESSIBILITY_LIVE_REGION_POLITE = 1; // 0x1
@@ -52589,9 +52589,9 @@ package android.view {
method public static int getChildMeasureSpec(int, int, int);
method protected boolean getChildStaticTransformation(android.view.View, android.view.animation.Transformation);
method public boolean getChildVisibleRect(android.view.View, android.graphics.Rect, android.graphics.Point);
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean getClipChildren();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean getClipToPadding();
- method @android.view.ViewDebug.ExportedProperty(category="focus", mapping={@android.view.ViewDebug.IntToString(from=android.view.ViewGroup.FOCUS_BEFORE_DESCENDANTS, to="FOCUS_BEFORE_DESCENDANTS"), @android.view.ViewDebug.IntToString(from=android.view.ViewGroup.FOCUS_AFTER_DESCENDANTS, to="FOCUS_AFTER_DESCENDANTS"), @android.view.ViewDebug.IntToString(from=android.view.ViewGroup.FOCUS_BLOCK_DESCENDANTS, to="FOCUS_BLOCK_DESCENDANTS")}) public int getDescendantFocusability();
+ method public boolean getClipChildren();
+ method public boolean getClipToPadding();
+ method public int getDescendantFocusability();
method public android.view.View getFocusedChild();
method public android.view.animation.LayoutAnimationController getLayoutAnimation();
method public android.view.animation.Animation.AnimationListener getLayoutAnimationListener();
@@ -52599,14 +52599,14 @@ package android.view {
method public android.animation.LayoutTransition getLayoutTransition();
method public int getNestedScrollAxes();
method public android.view.ViewGroupOverlay getOverlay();
- method @Deprecated @android.view.ViewDebug.ExportedProperty(category="drawing", mapping={@android.view.ViewDebug.IntToString(from=android.view.ViewGroup.PERSISTENT_NO_CACHE, to="NONE"), @android.view.ViewDebug.IntToString(from=android.view.ViewGroup.PERSISTENT_ANIMATION_CACHE, to="ANIMATION"), @android.view.ViewDebug.IntToString(from=android.view.ViewGroup.PERSISTENT_SCROLLING_CACHE, to="SCROLLING"), @android.view.ViewDebug.IntToString(from=android.view.ViewGroup.PERSISTENT_ALL_CACHES, to="ALL")}) public int getPersistentDrawingCache();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public boolean getTouchscreenBlocksFocus();
+ method @Deprecated public int getPersistentDrawingCache();
+ method public boolean getTouchscreenBlocksFocus();
method public int indexOfChild(android.view.View);
method @Deprecated public final void invalidateChild(android.view.View, android.graphics.Rect);
method @Deprecated public android.view.ViewParent invalidateChildInParent(int[], android.graphics.Rect);
method @Deprecated public boolean isAlwaysDrawnWithCacheEnabled();
method @Deprecated public boolean isAnimationCacheEnabled();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") protected boolean isChildrenDrawingOrderEnabled();
+ method protected boolean isChildrenDrawingOrderEnabled();
method @Deprecated protected boolean isChildrenDrawnWithCacheEnabled();
method public boolean isLayoutSuppressed();
method public boolean isMotionEventSplittingEnabled();
@@ -52697,9 +52697,9 @@ package android.view {
field @Deprecated public static final int FILL_PARENT = -1; // 0xffffffff
field public static final int MATCH_PARENT = -1; // 0xffffffff
field public static final int WRAP_CONTENT = -2; // 0xfffffffe
- field @android.view.ViewDebug.ExportedProperty(category="layout", mapping={@android.view.ViewDebug.IntToString(from=android.view.ViewGroup.LayoutParams.MATCH_PARENT, to="MATCH_PARENT"), @android.view.ViewDebug.IntToString(from=android.view.ViewGroup.LayoutParams.WRAP_CONTENT, to="WRAP_CONTENT")}) public int height;
+ field public int height;
field public android.view.animation.LayoutAnimationController.AnimationParameters layoutAnimationParameters;
- field @android.view.ViewDebug.ExportedProperty(category="layout", mapping={@android.view.ViewDebug.IntToString(from=android.view.ViewGroup.LayoutParams.MATCH_PARENT, to="MATCH_PARENT"), @android.view.ViewDebug.IntToString(from=android.view.ViewGroup.LayoutParams.WRAP_CONTENT, to="WRAP_CONTENT")}) public int width;
+ field public int width;
}
public static class ViewGroup.MarginLayoutParams extends android.view.ViewGroup.LayoutParams {
@@ -52715,10 +52715,10 @@ package android.view {
method public void setMarginEnd(int);
method public void setMarginStart(int);
method public void setMargins(int, int, int, int);
- field @android.view.ViewDebug.ExportedProperty(category="layout") public int bottomMargin;
- field @android.view.ViewDebug.ExportedProperty(category="layout") public int leftMargin;
- field @android.view.ViewDebug.ExportedProperty(category="layout") public int rightMargin;
- field @android.view.ViewDebug.ExportedProperty(category="layout") public int topMargin;
+ field public int bottomMargin;
+ field public int leftMargin;
+ field public int rightMargin;
+ field public int topMargin;
}
public static interface ViewGroup.OnHierarchyChangeListener {
@@ -53403,11 +53403,11 @@ package android.view {
field public float alpha;
field public float buttonBrightness;
field public float dimAmount;
- field @android.view.ViewDebug.ExportedProperty(flagMapping={@android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON, equals=android.view.WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON, name="ALLOW_LOCK_WHILE_SCREEN_ON"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_DIM_BEHIND, equals=android.view.WindowManager.LayoutParams.FLAG_DIM_BEHIND, name="DIM_BEHIND"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_BLUR_BEHIND, equals=android.view.WindowManager.LayoutParams.FLAG_BLUR_BEHIND, name="BLUR_BEHIND"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, equals=android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, name="NOT_FOCUSABLE"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE, equals=android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE, name="NOT_TOUCHABLE"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL, equals=android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL, name="NOT_TOUCH_MODAL"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING, equals=android.view.WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING, name="TOUCHABLE_WHEN_WAKING"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, equals=android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, name="KEEP_SCREEN_ON"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN, equals=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN, name="LAYOUT_IN_SCREEN"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, equals=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, name="LAYOUT_NO_LIMITS"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN, equals=android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN, name="FULLSCREEN"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, equals=android.view.WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, name="FORCE_NOT_FULLSCREEN"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_DITHER, equals=android.view.WindowManager.LayoutParams.FLAG_DITHER, name="DITHER"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_SECURE, equals=android.view.WindowManager.LayoutParams.FLAG_SECURE, name="SECURE"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_SCALED, equals=android.view.WindowManager.LayoutParams.FLAG_SCALED, name="SCALED"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_IGNORE_CHEEK_PRESSES, equals=android.view.WindowManager.LayoutParams.FLAG_IGNORE_CHEEK_PRESSES, name="IGNORE_CHEEK_PRESSES"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR, equals=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR, name="LAYOUT_INSET_DECOR"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM, equals=android.view.WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM, name="ALT_FOCUSABLE_IM"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH, equals=android.view.WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH, name="WATCH_OUTSIDE_TOUCH"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED, equals=android.view.WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED, name="SHOW_WHEN_LOCKED"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER, equals=android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER, name="SHOW_WALLPAPER"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON, equals=android.view.WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON, name="TURN_SCREEN_ON"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD, equals=android.view.WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD, name="DISMISS_KEYGUARD"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_SPLIT_TOUCH, equals=android.view.WindowManager.LayoutParams.FLAG_SPLIT_TOUCH, name="SPLIT_TOUCH"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, equals=android.view.WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, name="HARDWARE_ACCELERATED"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_OVERSCAN, equals=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_OVERSCAN, name="LOCAL_FOCUS_MODE"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, equals=android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, name="TRANSLUCENT_STATUS"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, equals=android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, name="TRANSLUCENT_NAVIGATION"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_LOCAL_FOCUS_MODE, equals=android.view.WindowManager.LayoutParams.FLAG_LOCAL_FOCUS_MODE, name="LOCAL_FOCUS_MODE"), @android.view.ViewDebug.FlagToString(mask=0x20000000, equals=0x20000000, name="FLAG_SLIPPERY"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_ATTACHED_IN_DECOR, equals=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_ATTACHED_IN_DECOR, name="FLAG_LAYOUT_ATTACHED_IN_DECOR"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, equals=android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, name="DRAWS_SYSTEM_BAR_BACKGROUNDS")}, formatToHexString=true) public int flags;
+ field public int flags;
field public int format;
field public int gravity;
field public float horizontalMargin;
- field @android.view.ViewDebug.ExportedProperty public float horizontalWeight;
+ field public float horizontalWeight;
field public int layoutInDisplayCutoutMode;
field @Deprecated public int memoryType;
field public String packageName;
@@ -53419,12 +53419,12 @@ package android.view {
field public int softInputMode;
field public int systemUiVisibility;
field public android.os.IBinder token;
- field @android.view.ViewDebug.ExportedProperty(mapping={@android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION, to="BASE_APPLICATION"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_APPLICATION, to="APPLICATION"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING, to="APPLICATION_STARTING"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_DRAWN_APPLICATION, to="DRAWN_APPLICATION"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL, to="APPLICATION_PANEL"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA, to="APPLICATION_MEDIA"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL, to="APPLICATION_SUB_PANEL"), @android.view.ViewDebug.IntToString(from=0x3ed, to="APPLICATION_ABOVE_SUB_PANEL"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG, to="APPLICATION_ATTACHED_DIALOG"), @android.view.ViewDebug.IntToString(from=0x3ec, to="APPLICATION_MEDIA_OVERLAY"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR, to="STATUS_BAR"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_SEARCH_BAR, to="SEARCH_BAR"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_PHONE, to="PHONE"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT, to="SYSTEM_ALERT"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_TOAST, to="TOAST"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY, to="SYSTEM_OVERLAY"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_PRIORITY_PHONE, to="PRIORITY_PHONE"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG, to="SYSTEM_DIALOG"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG, to="KEYGUARD_DIALOG"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ERROR, to="SYSTEM_ERROR"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD, to="INPUT_METHOD"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG, to="INPUT_METHOD_DIALOG"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_WALLPAPER, to="WALLPAPER"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL, to="STATUS_BAR_PANEL"), @android.view.ViewDebug.IntToString(from=0x7df, to="SECURE_SYSTEM_OVERLAY"), @android.view.ViewDebug.IntToString(from=0x7e0, to="DRAG"), @android.view.ViewDebug.IntToString(from=0x7e1, to="STATUS_BAR_SUB_PANEL"), @android.view.ViewDebug.IntToString(from=0x7e2, to="POINTER"), @android.view.ViewDebug.IntToString(from=0x7e3, to="NAVIGATION_BAR"), @android.view.ViewDebug.IntToString(from=0x7e4, to="VOLUME_OVERLAY"), @android.view.ViewDebug.IntToString(from=0x7e5, to="BOOT_PROGRESS"), @android.view.ViewDebug.IntToString(from=0x7e6, to="INPUT_CONSUMER"), @android.view.ViewDebug.IntToString(from=0x7e7, to="DREAM"), @android.view.ViewDebug.IntToString(from=0x7e8, to="NAVIGATION_BAR_PANEL"), @android.view.ViewDebug.IntToString(from=0x7ea, to="DISPLAY_OVERLAY"), @android.view.ViewDebug.IntToString(from=0x7eb, to="MAGNIFICATION_OVERLAY"), @android.view.ViewDebug.IntToString(from=0x7f5, to="PRESENTATION"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION, to="PRIVATE_PRESENTATION"), @android.view.ViewDebug.IntToString(from=0x7ef, to="VOICE_INTERACTION"), @android.view.ViewDebug.IntToString(from=0x7f1, to="VOICE_INTERACTION_STARTING"), @android.view.ViewDebug.IntToString(from=0x7f2, to="DOCK_DIVIDER"), @android.view.ViewDebug.IntToString(from=0x7f3, to="QS_DIALOG"), @android.view.ViewDebug.IntToString(from=0x7f4, to="SCREENSHOT"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY, to="APPLICATION_OVERLAY")}) public int type;
+ field public int type;
field public float verticalMargin;
- field @android.view.ViewDebug.ExportedProperty public float verticalWeight;
+ field public float verticalWeight;
field public int windowAnimations;
- field @android.view.ViewDebug.ExportedProperty public int x;
- field @android.view.ViewDebug.ExportedProperty public int y;
+ field public int x;
+ field public int y;
}
}
@@ -56035,21 +56035,21 @@ package android.webkit {
method public void flingScroll(int, int);
method @Deprecated public void freeMemory();
method @Nullable public android.net.http.SslCertificate getCertificate();
- method @android.view.ViewDebug.ExportedProperty(category="webview") public int getContentHeight();
+ method public int getContentHeight();
method @Nullable public static android.content.pm.PackageInfo getCurrentWebViewPackage();
method public android.graphics.Bitmap getFavicon();
method public android.webkit.WebView.HitTestResult getHitTestResult();
method @Deprecated @Nullable public String[] getHttpAuthUsernamePassword(String, String);
- method @android.view.ViewDebug.ExportedProperty(category="webview") public String getOriginalUrl();
+ method public String getOriginalUrl();
method public int getProgress();
method public boolean getRendererPriorityWaivedWhenNotVisible();
method public int getRendererRequestedPriority();
method @NonNull public static android.net.Uri getSafeBrowsingPrivacyPolicyUrl();
- method @Deprecated @android.view.ViewDebug.ExportedProperty(category="webview") public float getScale();
+ method @Deprecated public float getScale();
method public android.webkit.WebSettings getSettings();
method @NonNull public android.view.textclassifier.TextClassifier getTextClassifier();
- method @android.view.ViewDebug.ExportedProperty(category="webview") public String getTitle();
- method @android.view.ViewDebug.ExportedProperty(category="webview") public String getUrl();
+ method public String getTitle();
+ method public String getUrl();
method @Nullable public android.webkit.WebChromeClient getWebChromeClient();
method @NonNull public static ClassLoader getWebViewClassLoader();
method public android.webkit.WebViewClient getWebViewClient();
@@ -56251,7 +56251,7 @@ package android.widget {
method public void fling(int);
method public android.widget.AbsListView.LayoutParams generateLayoutParams(android.util.AttributeSet);
method @ColorInt public int getBottomEdgeEffectColor();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") @ColorInt public int getCacheColorHint();
+ method @ColorInt public int getCacheColorHint();
method public int getCheckedItemCount();
method public long[] getCheckedItemIds();
method public int getCheckedItemPosition();
@@ -56261,7 +56261,7 @@ package android.widget {
method public int getListPaddingLeft();
method public int getListPaddingRight();
method public int getListPaddingTop();
- method @android.view.ViewDebug.ExportedProperty public android.view.View getSelectedView();
+ method public android.view.View getSelectedView();
method public android.graphics.drawable.Drawable getSelector();
method public CharSequence getTextFilter();
method @ColorInt public int getTopEdgeEffectColor();
@@ -56271,13 +56271,13 @@ package android.widget {
method public void invalidateViews();
method public boolean isDrawSelectorOnTop();
method public boolean isFastScrollAlwaysVisible();
- method @android.view.ViewDebug.ExportedProperty public boolean isFastScrollEnabled();
+ method public boolean isFastScrollEnabled();
method protected boolean isInFilterMode();
method public boolean isItemChecked(int);
- method @android.view.ViewDebug.ExportedProperty public boolean isScrollingCacheEnabled();
- method @android.view.ViewDebug.ExportedProperty public boolean isSmoothScrollbarEnabled();
- method @android.view.ViewDebug.ExportedProperty public boolean isStackFromBottom();
- method @android.view.ViewDebug.ExportedProperty public boolean isTextFilterEnabled();
+ method public boolean isScrollingCacheEnabled();
+ method public boolean isSmoothScrollbarEnabled();
+ method public boolean isStackFromBottom();
+ method public boolean isTextFilterEnabled();
method protected void layoutChildren();
method public void onFilterComplete(int);
method public void onGlobalLayout();
@@ -56474,7 +56474,7 @@ package android.widget {
ctor public AdapterView(android.content.Context, android.util.AttributeSet, int);
ctor public AdapterView(android.content.Context, android.util.AttributeSet, int, int);
method public abstract T getAdapter();
- method @android.view.ViewDebug.CapturedViewProperty public int getCount();
+ method public int getCount();
method public android.view.View getEmptyView();
method public int getFirstVisiblePosition();
method public Object getItemAtPosition(int);
@@ -56485,8 +56485,8 @@ package android.widget {
method @Nullable public final android.widget.AdapterView.OnItemSelectedListener getOnItemSelectedListener();
method public int getPositionForView(android.view.View);
method public Object getSelectedItem();
- method @android.view.ViewDebug.CapturedViewProperty public long getSelectedItemId();
- method @android.view.ViewDebug.CapturedViewProperty public int getSelectedItemPosition();
+ method public long getSelectedItemId();
+ method public int getSelectedItemPosition();
method public abstract android.view.View getSelectedView();
method public boolean performItemClick(android.view.View, int, long);
method public abstract void setAdapter(T);
@@ -56787,7 +56787,7 @@ package android.widget {
method @Nullable public android.graphics.BlendMode getCheckMarkTintBlendMode();
method @Nullable public android.content.res.ColorStateList getCheckMarkTintList();
method @Nullable public android.graphics.PorterDuff.Mode getCheckMarkTintMode();
- method @android.view.ViewDebug.ExportedProperty public boolean isChecked();
+ method public boolean isChecked();
method public void setCheckMarkDrawable(@DrawableRes int);
method public void setCheckMarkDrawable(@Nullable android.graphics.drawable.Drawable);
method public void setCheckMarkTintBlendMode(@Nullable android.graphics.BlendMode);
@@ -56828,7 +56828,7 @@ package android.widget {
method @Nullable public android.graphics.BlendMode getButtonTintBlendMode();
method @Nullable public android.content.res.ColorStateList getButtonTintList();
method @Nullable public android.graphics.PorterDuff.Mode getButtonTintMode();
- method @android.view.ViewDebug.ExportedProperty public boolean isChecked();
+ method public boolean isChecked();
method public void setButtonDrawable(@DrawableRes int);
method public void setButtonDrawable(@Nullable android.graphics.drawable.Drawable);
method public void setButtonTintBlendMode(@Nullable android.graphics.BlendMode);
@@ -57217,7 +57217,7 @@ package android.widget {
method public int getColumnWidth();
method public int getGravity();
method public int getHorizontalSpacing();
- method @android.view.ViewDebug.ExportedProperty public int getNumColumns();
+ method public int getNumColumns();
method public int getRequestedColumnWidth();
method public int getRequestedHorizontalSpacing();
method public int getStretchMode();
@@ -57408,8 +57408,8 @@ package android.widget {
ctor public LinearLayout.LayoutParams(android.view.ViewGroup.MarginLayoutParams);
ctor public LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams);
method public String debug(String);
- field @android.view.ViewDebug.ExportedProperty(category="layout", mapping={@android.view.ViewDebug.IntToString(from=0xffffffff, to="NONE"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.NO_GRAVITY, to="NONE"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.TOP, to="TOP"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.BOTTOM, to="BOTTOM"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.LEFT, to="LEFT"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.RIGHT, to="RIGHT"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.START, to="START"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.END, to="END"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.CENTER_VERTICAL, to="CENTER_VERTICAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.FILL_VERTICAL, to="FILL_VERTICAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.CENTER_HORIZONTAL, to="CENTER_HORIZONTAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.FILL_HORIZONTAL, to="FILL_HORIZONTAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.CENTER, to="CENTER"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.FILL, to="FILL")}) public int gravity;
- field @android.view.ViewDebug.ExportedProperty(category="layout") public float weight;
+ field public int gravity;
+ field public float weight;
}
public interface ListAdapter extends android.widget.Adapter {
@@ -57798,13 +57798,13 @@ package android.widget {
method @Nullable public android.content.res.ColorStateList getIndeterminateTintList();
method @Nullable public android.graphics.PorterDuff.Mode getIndeterminateTintMode();
method public android.view.animation.Interpolator getInterpolator();
- method @android.view.ViewDebug.ExportedProperty(category="progress") public int getMax();
+ method public int getMax();
method @Px public int getMaxHeight();
method @Px public int getMaxWidth();
- method @android.view.ViewDebug.ExportedProperty(category="progress") public int getMin();
+ method public int getMin();
method @Px public int getMinHeight();
method @Px public int getMinWidth();
- method @android.view.ViewDebug.ExportedProperty(category="progress") public int getProgress();
+ method public int getProgress();
method @Nullable public android.graphics.BlendMode getProgressBackgroundTintBlendMode();
method @Nullable public android.content.res.ColorStateList getProgressBackgroundTintList();
method @Nullable public android.graphics.PorterDuff.Mode getProgressBackgroundTintMode();
@@ -57812,14 +57812,14 @@ package android.widget {
method @Nullable public android.graphics.BlendMode getProgressTintBlendMode();
method @Nullable public android.content.res.ColorStateList getProgressTintList();
method @Nullable public android.graphics.PorterDuff.Mode getProgressTintMode();
- method @android.view.ViewDebug.ExportedProperty(category="progress") public int getSecondaryProgress();
+ method public int getSecondaryProgress();
method @Nullable public android.graphics.BlendMode getSecondaryProgressTintBlendMode();
method @Nullable public android.content.res.ColorStateList getSecondaryProgressTintList();
method @Nullable public android.graphics.PorterDuff.Mode getSecondaryProgressTintMode();
method public final void incrementProgressBy(int);
method public final void incrementSecondaryProgressBy(int);
method public boolean isAnimating();
- method @android.view.ViewDebug.ExportedProperty(category="progress") public boolean isIndeterminate();
+ method public boolean isIndeterminate();
method public void onRestoreInstanceState(android.os.Parcelable);
method public android.os.Parcelable onSaveInstanceState();
method public void setIndeterminate(boolean);
@@ -57970,7 +57970,7 @@ package android.widget {
method public int getRule(int);
method public int[] getRules();
method public void removeRule(int);
- field @android.view.ViewDebug.ExportedProperty(category="layout") public boolean alignWithParent;
+ field public boolean alignWithParent;
}
public class RemoteViews implements android.view.LayoutInflater.Filter android.os.Parcelable {
@@ -58529,8 +58529,8 @@ package android.widget {
ctor public TableRow.LayoutParams(int);
ctor public TableRow.LayoutParams(android.view.ViewGroup.LayoutParams);
ctor public TableRow.LayoutParams(android.view.ViewGroup.MarginLayoutParams);
- field @android.view.ViewDebug.ExportedProperty(category="layout") public int column;
- field @android.view.ViewDebug.ExportedProperty(category="layout") public int span;
+ field public int column;
+ field public int span;
}
@android.widget.RemoteViews.RemoteView public class TextClock extends android.widget.TextView {
@@ -58538,8 +58538,8 @@ package android.widget {
ctor public TextClock(android.content.Context, android.util.AttributeSet);
ctor public TextClock(android.content.Context, android.util.AttributeSet, int);
ctor public TextClock(android.content.Context, android.util.AttributeSet, int, int);
- method @android.view.ViewDebug.ExportedProperty public CharSequence getFormat12Hour();
- method @android.view.ViewDebug.ExportedProperty public CharSequence getFormat24Hour();
+ method public CharSequence getFormat12Hour();
+ method public CharSequence getFormat24Hour();
method public String getTimeZone();
method public boolean is24HourModeEnabled();
method public void setFormat12Hour(CharSequence);
@@ -58597,7 +58597,7 @@ package android.widget {
method protected boolean getDefaultEditable();
method protected android.text.method.MovementMethod getDefaultMovementMethod();
method public android.text.Editable getEditableText();
- method @android.view.ViewDebug.ExportedProperty public android.text.TextUtils.TruncateAt getEllipsize();
+ method public android.text.TextUtils.TruncateAt getEllipsize();
method public CharSequence getError();
method public int getExtendedPaddingBottom();
method public int getExtendedPaddingTop();
@@ -58608,7 +58608,7 @@ package android.widget {
method public boolean getFreezesText();
method public int getGravity();
method @ColorInt public int getHighlightColor();
- method @android.view.ViewDebug.CapturedViewProperty public CharSequence getHint();
+ method public CharSequence getHint();
method public final android.content.res.ColorStateList getHintTextColors();
method public int getHyphenationFrequency();
method public int getImeActionId();
@@ -58644,14 +58644,14 @@ package android.widget {
method public android.text.TextPaint getPaint();
method public int getPaintFlags();
method public String getPrivateImeOptions();
- method @android.view.ViewDebug.ExportedProperty(category="text") public int getSelectionEnd();
- method @android.view.ViewDebug.ExportedProperty(category="text") public int getSelectionStart();
+ method public int getSelectionEnd();
+ method public int getSelectionStart();
method @ColorInt public int getShadowColor();
method public float getShadowDx();
method public float getShadowDy();
method public float getShadowRadius();
method public final boolean getShowSoftInputOnFocus();
- method @android.view.ViewDebug.CapturedViewProperty public CharSequence getText();
+ method public CharSequence getText();
method @NonNull public android.view.textclassifier.TextClassifier getTextClassifier();
method public final android.content.res.ColorStateList getTextColors();
method @Nullable public android.graphics.drawable.Drawable getTextCursorDrawable();
@@ -58663,7 +58663,7 @@ package android.widget {
method @Nullable public android.graphics.drawable.Drawable getTextSelectHandle();
method @Nullable public android.graphics.drawable.Drawable getTextSelectHandleLeft();
method @Nullable public android.graphics.drawable.Drawable getTextSelectHandleRight();
- method @android.view.ViewDebug.ExportedProperty(category="text") public float getTextSize();
+ method public float getTextSize();
method public int getTotalPaddingBottom();
method public int getTotalPaddingEnd();
method public int getTotalPaddingLeft();
diff --git a/api/test-current.txt b/api/test-current.txt
index 9747647845ed..68c91058cabf 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -4312,7 +4312,7 @@ package android.view {
}
@UiThread public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.view.KeyEvent.Callback {
- method @android.view.ViewDebug.ExportedProperty(mapping={@android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_CONTENT_CAPTURE_AUTO, to="auto"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_CONTENT_CAPTURE_YES, to="yes"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_CONTENT_CAPTURE_NO, to="no"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS, to="yesExcludeDescendants"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS, to="noExcludeDescendants")}) public int getImportantForContentCapture();
+ method public int getImportantForContentCapture();
method public android.view.View getTooltipView();
method public boolean isAutofilled();
method public static boolean isDefaultFocusHighlightEnabled();
@@ -4363,7 +4363,7 @@ package android.view {
field public static final int ACCESSIBILITY_TITLE_CHANGED = 33554432; // 0x2000000
field public static final int PRIVATE_FLAG_NO_MOVE_ANIMATION = 64; // 0x40
field public CharSequence accessibilityTitle;
- field @android.view.ViewDebug.ExportedProperty(flagMapping={@android.view.ViewDebug.FlagToString(mask=0x1, equals=0x1, name="FAKE_HARDWARE_ACCELERATED"), @android.view.ViewDebug.FlagToString(mask=0x2, equals=0x2, name="FORCE_HARDWARE_ACCELERATED"), @android.view.ViewDebug.FlagToString(mask=0x4, equals=0x4, name="WANTS_OFFSET_NOTIFICATIONS"), @android.view.ViewDebug.FlagToString(mask=0x10, equals=0x10, name="SHOW_FOR_ALL_USERS"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION, equals=android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION, name="NO_MOVE_ANIMATION"), @android.view.ViewDebug.FlagToString(mask=0x80, equals=0x80, name="COMPATIBLE_WINDOW"), @android.view.ViewDebug.FlagToString(mask=0x100, equals=0x100, name="SYSTEM_ERROR"), @android.view.ViewDebug.FlagToString(mask=0x200, equals=0x200, name="INHERIT_TRANSLUCENT_DECOR"), @android.view.ViewDebug.FlagToString(mask=0x400, equals=0x400, name="KEYGUARD"), @android.view.ViewDebug.FlagToString(mask=0x800, equals=0x800, name="DISABLE_WALLPAPER_TOUCH_EVENTS"), @android.view.ViewDebug.FlagToString(mask=0x1000, equals=0x1000, name="FORCE_STATUS_BAR_VISIBLE_TRANSPARENT"), @android.view.ViewDebug.FlagToString(mask=0x2000, equals=0x2000, name="PRESERVE_GEOMETRY"), @android.view.ViewDebug.FlagToString(mask=0x4000, equals=0x4000, name="FORCE_DECOR_VIEW_VISIBILITY"), @android.view.ViewDebug.FlagToString(mask=0x8000, equals=0x8000, name="WILL_NOT_REPLACE_ON_RELAUNCH"), @android.view.ViewDebug.FlagToString(mask=0x10000, equals=0x10000, name="LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME"), @android.view.ViewDebug.FlagToString(mask=0x20000, equals=0x20000, name="FORCE_DRAW_STATUS_BAR_BACKGROUND"), @android.view.ViewDebug.FlagToString(mask=0x40000, equals=0x40000, name="SUSTAINED_PERFORMANCE_MODE"), @android.view.ViewDebug.FlagToString(mask=0x80000, equals=0x80000, name="HIDE_NON_SYSTEM_OVERLAY_WINDOWS"), @android.view.ViewDebug.FlagToString(mask=0x100000, equals=0x100000, name="IS_ROUNDED_CORNERS_OVERLAY"), @android.view.ViewDebug.FlagToString(mask=0x400000, equals=0x400000, name="IS_SCREEN_DECOR"), @android.view.ViewDebug.FlagToString(mask=0x800000, equals=0x800000, name="STATUS_FORCE_SHOW_NAVIGATION"), @android.view.ViewDebug.FlagToString(mask=0x1000000, equals=0x1000000, name="COLOR_SPACE_AGNOSTIC")}) public int privateFlags;
+ field public int privateFlags;
}
}
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 52e93856a0c7..a2d9c77d202b 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -363,7 +363,7 @@ message Atom {
}
// Pulled events will start at field 10000.
- // Next: 10067
+ // Next: 10080
oneof pulled {
WifiBytesTransfer wifi_bytes_transfer = 10000;
WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001;
@@ -429,6 +429,11 @@ message Atom {
ProcessSystemIonHeapSize process_system_ion_heap_size = 10061;
VmsClientStats vms_client_stats = 10065;
NotificationRemoteViews notification_remote_views = 10066;
+ VoiceCallSession voice_call_session = 10076 [(log_from_module) = "telephony"];
+ VoiceCallRatUsage voice_call_rat_usage = 10077 [(log_from_module) = "telephony"];
+ SimSlotState sim_slot_state = 10078 [(log_from_module) = "telephony"];
+ SupportedRadioAccessFamily supported_radio_access_family =
+ 10079 [(log_from_module) = "telephony"];
}
// DO NOT USE field numbers above 100,000 in AOSP.
@@ -7558,3 +7563,153 @@ message UserspaceRebootReported {
// State of primary user's encryption storage at the moment boot completed. Always set.
optional UserEncryptionState user_encryption_state = 3;
}
+
+/**
+ * Pulls information for a single voice call.
+ *
+ * Each pull creates multiple atoms, one for each call. The sequence is randomized when pulled.
+ *
+ * Pulled from:
+ * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
+ */
+message VoiceCallSession {
+ // Bearer (IMS or CS) when the call started.
+ optional android.telephony.CallBearerEnum bearer_at_start = 1;
+
+ // Bearer (IMS or CS) when the call ended.
+ // The bearer may change during the call, e.g. due to SRVCC.
+ optional android.telephony.CallBearerEnum bearer_at_end = 2;
+
+ // Direction of the call (incoming or outgoing).
+ optional android.telephony.CallDirectionEnum direction = 3;
+
+ // Time spent setting up the call.
+ optional android.telephony.CallSetupDurationEnum setup_duration = 4;
+
+ // Whether the call ended before the setup was completed.
+ optional bool setup_failed = 5;
+
+ // IMS reason code or CS disconnect cause.
+ // For IMS, see: frameworks/base/telephony/java/android/telephony/ims/ImsReasonInfo.java
+ // For CS, see: frameworks/base/telephony/java/android/telephony/DisconnectCause.java
+ optional int32 disconnect_reason_code = 6;
+
+ // IMS extra code or CS precise disconnect cause.
+ // For IMS, this code is vendor-specific
+ // For CS, see: frameworks/base/telephony/java/android/telephony/PreciseDisconnectCause.java
+ optional int32 disconnect_extra_code = 7;
+
+ // IMS extra message or CS vendor cause.
+ optional string disconnect_extra_message = 8;
+
+ // Radio access technology (RAT) used when call started.
+ optional android.telephony.NetworkTypeEnum rat_at_start = 9;
+
+ // Radio access technology (RAT) used when call terminated.
+ optional android.telephony.NetworkTypeEnum rat_at_end = 10;
+
+ // Number of times RAT changed during the call.
+ optional int64 rat_switch_count = 11;
+
+ // A bitmask of all codecs used during the call.
+ // See: frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/VoiceCallSessionStats.java
+ optional int64 codec_bitmask = 12;
+
+ // Number of other calls going on during call setup, for the same SIM slot.
+ optional int32 concurrent_call_count_at_start = 13;
+
+ // Number of other calls going on during call termination, for the same SIM slot.
+ optional int32 concurrent_call_count_at_end = 14;
+
+ // Index of the SIM is used, 0 for single-SIM devices.
+ optional int32 sim_slot_index = 15;
+
+ // Whether the device was in multi-SIM mode (with multiple active SIM profiles).
+ optional bool is_multi_sim = 16;
+
+ // Whether the call was made with an eSIM profile.
+ optional bool is_esim = 17;
+
+ // Carrier ID of the SIM card.
+ // See https://source.android.com/devices/tech/config/carrierid.
+ optional int32 carrier_id = 18;
+
+ // Whether an SRVCC has been completed successfully for this call.
+ optional bool srvcc_completed = 19;
+
+ // Number of SRVCC failures.
+ optional int64 srvcc_failure_count = 20;
+
+ // Number of SRVCC cancellations.
+ optional int64 srvcc_cancellation_count = 21;
+
+ // Whether the Real-Time Text (RTT) was ever used in the call (rather than whether RTT was
+ // enabled in the dialer's settings).
+ optional bool rtt_enabled = 22;
+
+ // Whether this was an emergency call.
+ optional bool is_emergency = 23;
+
+ // Whether the call was performed while roaming.
+ optional bool is_roaming = 24;
+
+ // A random number used as the dimension field to pull multiple atoms.
+ optional int32 dimension = 25;
+}
+
+/**
+ * Pulls voice call radio access technology (RAT) usage.
+ *
+ * Each pull creates multiple atoms, one for each carrier/RAT, the order of which is irrelevant to
+ * time. The atom will be skipped if not enough data is available.
+ *
+ * Pulled from:
+ * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
+ */
+message VoiceCallRatUsage {
+ // Carrier ID (https://source.android.com/devices/tech/config/carrierid).
+ optional int32 carrier_id = 1;
+
+ // Radio access technology.
+ optional android.telephony.NetworkTypeEnum rat = 2;
+
+ // Total duration that voice calls spent on this carrier and RAT.
+ optional int64 total_duration_seconds = 3;
+
+ // Total number of calls using this carrier and RAT.
+ // A call is counted once even if it used the RAT multiple times.
+ optional int64 call_count = 4;
+}
+
+/**
+ * Pulls the number of active SIM slots and SIMs/eSIM profiles.
+ *
+ * Pulled from:
+ * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
+ */
+message SimSlotState {
+ // Number of active SIM slots (both physical and eSIM profiles) in the device.
+ optional int32 active_slot_count = 1;
+
+ // Number of SIM cards (both physical and active eSIM profiles).
+ // This number is always equal to or less than the number of active SIM slots.
+ optional int32 sim_count = 2;
+
+ // Number of active eSIM profiles.
+ // This number is always equal to or less than the number of SIMs.
+ optional int32 esim_count = 3;
+}
+
+/**
+ * Pulls supported cellular radio access technologies.
+ *
+ * This atom reports the capabilities of the device, rather than the network it has access to.
+ *
+ * Pulled from:
+ * frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/MetricsCollector.java
+ */
+message SupportedRadioAccessFamily {
+ // A bitmask of supported radio technologies.
+ // See android.telephony.TelephonyManager.NetworkTypeBitMask.
+ optional int64 network_type_bitmask = 1;
+}
diff --git a/core/proto/android/telephony/enums.proto b/core/proto/android/telephony/enums.proto
index 477716982008..f14e3ed1872d 100644
--- a/core/proto/android/telephony/enums.proto
+++ b/core/proto/android/telephony/enums.proto
@@ -20,6 +20,43 @@ package android.telephony;
option java_outer_classname = "TelephonyProtoEnums";
option java_multiple_files = true;
+enum CallBearerEnum {
+ /** Call bearer is unknown or invalid */
+ CALL_BEARER_UNKNOWN = 0;
+
+ /** Call bearer is legacy CS */
+ CALL_BEARER_CS = 1;
+
+ /** Call bearer is IMS */
+ CALL_BEARER_IMS = 2;
+}
+
+enum CallDirectionEnum {
+ /** Call direction: unknown or invalid */
+ CALL_DIRECTION_UNKNOWN = 0;
+
+ /** Call direction: mobile originated (outgoing for this device) */
+ CALL_DIRECTION_MO = 1;
+
+ /** Call direction: mobile terminated (incoming for this device) */
+ CALL_DIRECTION_MT = 2;
+}
+
+// Call setup duration buckets.
+// See com.android.internal.telephony.metrics.VoiceCallSessionStats for definition.
+enum CallSetupDurationEnum {
+ CALL_SETUP_DURATION_UNKNOWN = 0;
+ CALL_SETUP_DURATION_EXTREMELY_FAST = 1;
+ CALL_SETUP_DURATION_ULTRA_FAST = 2;
+ CALL_SETUP_DURATION_VERY_FAST = 3;
+ CALL_SETUP_DURATION_FAST = 4;
+ CALL_SETUP_DURATION_NORMAL = 5;
+ CALL_SETUP_DURATION_SLOW = 6;
+ CALL_SETUP_DURATION_VERY_SLOW = 7;
+ CALL_SETUP_DURATION_ULTRA_SLOW = 8;
+ CALL_SETUP_DURATION_EXTREMELY_SLOW = 9;
+}
+
// Data conn. power states, primarily used by android/telephony/DataConnectionRealTimeInfo.java.
enum DataConnectionPowerStateEnum {
DATA_CONNECTION_POWER_STATE_LOW = 1;
@@ -63,7 +100,6 @@ enum SignalStrengthEnum {
SIGNAL_STRENGTH_GREAT = 4;
}
-
enum ServiceStateEnum {
/**
* Normal operation condition, the phone is registered
diff --git a/data/etc/car/Android.bp b/data/etc/car/Android.bp
index 7faf4cdcf66d..ff8eb0cfc60a 100644
--- a/data/etc/car/Android.bp
+++ b/data/etc/car/Android.bp
@@ -115,6 +115,13 @@ prebuilt_etc {
}
prebuilt_etc {
+ name: "privapp_whitelist_com.android.car.bugreport",
+ sub_dir: "permissions",
+ src: "com.android.car.bugreport.xml",
+ filename_from_src: true,
+}
+
+prebuilt_etc {
name: "privapp_whitelist_com.google.android.car.kitchensink",
sub_dir: "permissions",
src: "com.google.android.car.kitchensink.xml",
diff --git a/data/etc/car/com.android.car.bugreport.xml b/data/etc/car/com.android.car.bugreport.xml
new file mode 100644
index 000000000000..432a838a90e8
--- /dev/null
+++ b/data/etc/car/com.android.car.bugreport.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+<permissions>
+ <privapp-permissions package="com.android.car.bugreport">
+ <permission name="android.permission.DUMP"/>
+ <permission name="android.permission.INTERACT_ACROSS_USERS"/>
+ <permission name="android.permission.READ_LOGS"/>
+ <permission name="android.permission.MANAGE_USERS"/>
+ </privapp-permissions>
+ </permissions>
diff --git a/non-updatable-api/current.txt b/non-updatable-api/current.txt
index 9fb012bf8123..4dffc4bd2e8d 100644
--- a/non-updatable-api/current.txt
+++ b/non-updatable-api/current.txt
@@ -3618,7 +3618,7 @@ package android.app {
ctor public ActionBar.LayoutParams(int);
ctor public ActionBar.LayoutParams(android.app.ActionBar.LayoutParams);
ctor public ActionBar.LayoutParams(android.view.ViewGroup.LayoutParams);
- field @android.view.ViewDebug.ExportedProperty(category="layout", mapping={@android.view.ViewDebug.IntToString(from=0xffffffff, to="NONE"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.NO_GRAVITY, to="NONE"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.TOP, to="TOP"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.BOTTOM, to="BOTTOM"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.LEFT, to="LEFT"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.RIGHT, to="RIGHT"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.START, to="START"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.END, to="END"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.CENTER_VERTICAL, to="CENTER_VERTICAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.FILL_VERTICAL, to="FILL_VERTICAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.CENTER_HORIZONTAL, to="CENTER_HORIZONTAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.FILL_HORIZONTAL, to="FILL_HORIZONTAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.CENTER, to="CENTER"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.FILL, to="FILL")}) public int gravity;
+ field public int gravity;
}
public static interface ActionBar.OnMenuVisibilityListener {
@@ -9741,7 +9741,7 @@ package android.content {
method public final <T> T getSystemService(@NonNull Class<T>);
method @Nullable public abstract String getSystemServiceName(@NonNull Class<?>);
method @NonNull public final CharSequence getText(@StringRes int);
- method @android.view.ViewDebug.ExportedProperty(deepExport=true) public abstract android.content.res.Resources.Theme getTheme();
+ method public abstract android.content.res.Resources.Theme getTheme();
method @Deprecated public abstract android.graphics.drawable.Drawable getWallpaper();
method @Deprecated public abstract int getWallpaperDesiredMinimumHeight();
method @Deprecated public abstract int getWallpaperDesiredMinimumWidth();
@@ -51501,13 +51501,13 @@ package android.view {
method @Nullable public CharSequence getAccessibilityPaneTitle();
method @IdRes public int getAccessibilityTraversalAfter();
method @IdRes public int getAccessibilityTraversalBefore();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getAlpha();
+ method public float getAlpha();
method public android.view.animation.Animation getAnimation();
method @Nullable public android.graphics.Matrix getAnimationMatrix();
method public android.os.IBinder getApplicationWindowToken();
method @NonNull public int[] getAttributeResolutionStack(@AttrRes int);
method @NonNull public java.util.Map<java.lang.Integer,java.lang.Integer> getAttributeSourceResourceMap();
- method @android.view.ViewDebug.ExportedProperty @Nullable public String[] getAutofillHints();
+ method @Nullable public String[] getAutofillHints();
method public final android.view.autofill.AutofillId getAutofillId();
method public int getAutofillType();
method @Nullable public android.view.autofill.AutofillValue getAutofillValue();
@@ -51515,8 +51515,8 @@ package android.view {
method @Nullable public android.graphics.BlendMode getBackgroundTintBlendMode();
method @Nullable public android.content.res.ColorStateList getBackgroundTintList();
method @Nullable public android.graphics.PorterDuff.Mode getBackgroundTintMode();
- method @android.view.ViewDebug.ExportedProperty(category="layout") public int getBaseline();
- method @android.view.ViewDebug.CapturedViewProperty public final int getBottom();
+ method public int getBaseline();
+ method public final int getBottom();
method protected float getBottomFadingEdgeStrength();
method protected int getBottomPaddingOffset();
method public float getCameraDistance();
@@ -51524,10 +51524,10 @@ package android.view {
method public boolean getClipBounds(android.graphics.Rect);
method public final boolean getClipToOutline();
method @Nullable public final android.view.contentcapture.ContentCaptureSession getContentCaptureSession();
- method @android.view.ViewDebug.ExportedProperty(category="accessibility") public CharSequence getContentDescription();
- method @android.view.ViewDebug.CapturedViewProperty public final android.content.Context getContext();
+ method public CharSequence getContentDescription();
+ method public final android.content.Context getContext();
method protected android.view.ContextMenu.ContextMenuInfo getContextMenuInfo();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public final boolean getDefaultFocusHighlightEnabled();
+ method public final boolean getDefaultFocusHighlightEnabled();
method public static int getDefaultSize(int, int);
method public android.view.Display getDisplay();
method public final int[] getDrawableState();
@@ -51537,11 +51537,11 @@ package android.view {
method @Deprecated public int getDrawingCacheQuality();
method public void getDrawingRect(android.graphics.Rect);
method public long getDrawingTime();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getElevation();
+ method public float getElevation();
method @StyleRes public int getExplicitStyle();
- method @android.view.ViewDebug.ExportedProperty public boolean getFilterTouchesWhenObscured();
- method @android.view.ViewDebug.ExportedProperty public boolean getFitsSystemWindows();
- method @android.view.ViewDebug.ExportedProperty(mapping={@android.view.ViewDebug.IntToString(from=android.view.View.NOT_FOCUSABLE, to="NOT_FOCUSABLE"), @android.view.ViewDebug.IntToString(from=android.view.View.FOCUSABLE, to="FOCUSABLE"), @android.view.ViewDebug.IntToString(from=android.view.View.FOCUSABLE_AUTO, to="FOCUSABLE_AUTO")}, category="focus") public int getFocusable();
+ method public boolean getFilterTouchesWhenObscured();
+ method public boolean getFitsSystemWindows();
+ method public int getFocusable();
method public java.util.ArrayList<android.view.View> getFocusables(int);
method public void getFocusedRect(android.graphics.Rect);
method public android.graphics.drawable.Drawable getForeground();
@@ -51553,22 +51553,22 @@ package android.view {
method public final boolean getGlobalVisibleRect(android.graphics.Rect);
method public android.os.Handler getHandler();
method public final boolean getHasOverlappingRendering();
- method @android.view.ViewDebug.ExportedProperty(category="layout") public final int getHeight();
+ method public final int getHeight();
method public void getHitRect(android.graphics.Rect);
method public int getHorizontalFadingEdgeLength();
method protected int getHorizontalScrollbarHeight();
method @Nullable public android.graphics.drawable.Drawable getHorizontalScrollbarThumbDrawable();
method @Nullable public android.graphics.drawable.Drawable getHorizontalScrollbarTrackDrawable();
- method @android.view.ViewDebug.CapturedViewProperty @IdRes public int getId();
- method @android.view.ViewDebug.ExportedProperty(category="accessibility", mapping={@android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_ACCESSIBILITY_AUTO, to="auto"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_ACCESSIBILITY_YES, to="yes"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_ACCESSIBILITY_NO, to="no"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, to="noHideDescendants")}) public int getImportantForAccessibility();
- method @android.view.ViewDebug.ExportedProperty(mapping={@android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_AUTOFILL_AUTO, to="auto"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_AUTOFILL_YES, to="yes"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_AUTOFILL_NO, to="no"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, to="yesExcludeDescendants"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, to="noExcludeDescendants")}) public int getImportantForAutofill();
+ method @IdRes public int getId();
+ method public int getImportantForAccessibility();
+ method public int getImportantForAutofill();
method public boolean getKeepScreenOn();
method public android.view.KeyEvent.DispatcherState getKeyDispatcherState();
- method @android.view.ViewDebug.ExportedProperty(category="accessibility") @IdRes public int getLabelFor();
+ method @IdRes public int getLabelFor();
method public int getLayerType();
- method @android.view.ViewDebug.ExportedProperty(category="layout", mapping={@android.view.ViewDebug.IntToString(from=android.view.View.LAYOUT_DIRECTION_LTR, to="RESOLVED_DIRECTION_LTR"), @android.view.ViewDebug.IntToString(from=android.view.View.LAYOUT_DIRECTION_RTL, to="RESOLVED_DIRECTION_RTL")}) public int getLayoutDirection();
- method @android.view.ViewDebug.ExportedProperty(deepExport=true, prefix="layout_") public android.view.ViewGroup.LayoutParams getLayoutParams();
- method @android.view.ViewDebug.CapturedViewProperty public final int getLeft();
+ method public int getLayoutDirection();
+ method public android.view.ViewGroup.LayoutParams getLayoutParams();
+ method public final int getLeft();
method protected float getLeftFadingEdgeStrength();
method protected int getLeftPaddingOffset();
method public final boolean getLocalVisibleRect(android.graphics.Rect);
@@ -51577,10 +51577,10 @@ package android.view {
method public void getLocationOnScreen(@Size(2) int[]);
method public android.graphics.Matrix getMatrix();
method public final int getMeasuredHeight();
- method @android.view.ViewDebug.ExportedProperty(category="measurement", flagMapping={@android.view.ViewDebug.FlagToString(mask=android.view.View.MEASURED_STATE_MASK, equals=android.view.View.MEASURED_STATE_TOO_SMALL, name="MEASURED_STATE_TOO_SMALL")}) public final int getMeasuredHeightAndState();
+ method public final int getMeasuredHeightAndState();
method public final int getMeasuredState();
method public final int getMeasuredWidth();
- method @android.view.ViewDebug.ExportedProperty(category="measurement", flagMapping={@android.view.ViewDebug.FlagToString(mask=android.view.View.MEASURED_STATE_MASK, equals=android.view.View.MEASURED_STATE_TOO_SMALL, name="MEASURED_STATE_TOO_SMALL")}) public final int getMeasuredWidthAndState();
+ method public final int getMeasuredWidthAndState();
method public int getMinimumHeight();
method public int getMinimumWidth();
method @IdRes public int getNextClusterForwardId();
@@ -51603,50 +51603,50 @@ package android.view {
method public int getPaddingTop();
method public final android.view.ViewParent getParent();
method public android.view.ViewParent getParentForAccessibility();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getPivotX();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getPivotY();
+ method public float getPivotX();
+ method public float getPivotY();
method public android.view.PointerIcon getPointerIcon();
method public android.content.res.Resources getResources();
method public final boolean getRevealOnFocusHint();
- method @android.view.ViewDebug.CapturedViewProperty public final int getRight();
+ method public final int getRight();
method protected float getRightFadingEdgeStrength();
method protected int getRightPaddingOffset();
method public android.view.View getRootView();
method public android.view.WindowInsets getRootWindowInsets();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getRotation();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getRotationX();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getRotationY();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getScaleX();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getScaleY();
+ method public float getRotation();
+ method public float getRotationX();
+ method public float getRotationY();
+ method public float getScaleX();
+ method public float getScaleY();
method public int getScrollBarDefaultDelayBeforeFade();
method public int getScrollBarFadeDuration();
method public int getScrollBarSize();
- method @android.view.ViewDebug.ExportedProperty(mapping={@android.view.ViewDebug.IntToString(from=android.view.View.SCROLLBARS_INSIDE_OVERLAY, to="INSIDE_OVERLAY"), @android.view.ViewDebug.IntToString(from=android.view.View.SCROLLBARS_INSIDE_INSET, to="INSIDE_INSET"), @android.view.ViewDebug.IntToString(from=android.view.View.SCROLLBARS_OUTSIDE_OVERLAY, to="OUTSIDE_OVERLAY"), @android.view.ViewDebug.IntToString(from=android.view.View.SCROLLBARS_OUTSIDE_INSET, to="OUTSIDE_INSET")}) public int getScrollBarStyle();
+ method public int getScrollBarStyle();
method public int getScrollIndicators();
method public final int getScrollX();
method public final int getScrollY();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") @ColorInt public int getSolidColor();
+ method @ColorInt public int getSolidColor();
method @LayoutRes public int getSourceLayoutResId();
method public android.animation.StateListAnimator getStateListAnimator();
method protected int getSuggestedMinimumHeight();
method protected int getSuggestedMinimumWidth();
method @NonNull public java.util.List<android.graphics.Rect> getSystemGestureExclusionRects();
method public int getSystemUiVisibility();
- method @android.view.ViewDebug.ExportedProperty public Object getTag();
+ method public Object getTag();
method public Object getTag(int);
- method @android.view.ViewDebug.ExportedProperty(category="text", mapping={@android.view.ViewDebug.IntToString(from=android.view.View.TEXT_ALIGNMENT_INHERIT, to="INHERIT"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_ALIGNMENT_GRAVITY, to="GRAVITY"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_ALIGNMENT_TEXT_START, to="TEXT_START"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_ALIGNMENT_TEXT_END, to="TEXT_END"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_ALIGNMENT_CENTER, to="CENTER"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_ALIGNMENT_VIEW_START, to="VIEW_START"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_ALIGNMENT_VIEW_END, to="VIEW_END")}) public int getTextAlignment();
- method @android.view.ViewDebug.ExportedProperty(category="text", mapping={@android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_INHERIT, to="INHERIT"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_FIRST_STRONG, to="FIRST_STRONG"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_ANY_RTL, to="ANY_RTL"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_LTR, to="LTR"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_RTL, to="RTL"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_LOCALE, to="LOCALE"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_FIRST_STRONG_LTR, to="FIRST_STRONG_LTR"), @android.view.ViewDebug.IntToString(from=android.view.View.TEXT_DIRECTION_FIRST_STRONG_RTL, to="FIRST_STRONG_RTL")}) public int getTextDirection();
+ method public int getTextAlignment();
+ method public int getTextDirection();
method @Nullable public CharSequence getTooltipText();
- method @android.view.ViewDebug.CapturedViewProperty public final int getTop();
+ method public final int getTop();
method protected float getTopFadingEdgeStrength();
method protected int getTopPaddingOffset();
method public android.view.TouchDelegate getTouchDelegate();
method public java.util.ArrayList<android.view.View> getTouchables();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getTransitionAlpha();
- method @android.view.ViewDebug.ExportedProperty public String getTransitionName();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getTranslationX();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getTranslationY();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getTranslationZ();
+ method public float getTransitionAlpha();
+ method public String getTransitionName();
+ method public float getTranslationX();
+ method public float getTranslationY();
+ method public float getTranslationZ();
method public long getUniqueDrawingId();
method public int getVerticalFadingEdgeLength();
method public int getVerticalScrollbarPosition();
@@ -51654,25 +51654,25 @@ package android.view {
method @Nullable public android.graphics.drawable.Drawable getVerticalScrollbarTrackDrawable();
method public int getVerticalScrollbarWidth();
method public android.view.ViewTreeObserver getViewTreeObserver();
- method @android.view.ViewDebug.ExportedProperty(mapping={@android.view.ViewDebug.IntToString(from=android.view.View.VISIBLE, to="VISIBLE"), @android.view.ViewDebug.IntToString(from=android.view.View.INVISIBLE, to="INVISIBLE"), @android.view.ViewDebug.IntToString(from=android.view.View.GONE, to="GONE")}) public int getVisibility();
- method @android.view.ViewDebug.ExportedProperty(category="layout") public final int getWidth();
+ method public int getVisibility();
+ method public final int getWidth();
method protected int getWindowAttachCount();
method public android.view.WindowId getWindowId();
method public int getWindowSystemUiVisibility();
method public android.os.IBinder getWindowToken();
method public int getWindowVisibility();
method public void getWindowVisibleDisplayFrame(android.graphics.Rect);
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getX();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getY();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getZ();
+ method public float getX();
+ method public float getY();
+ method public float getZ();
method public boolean hasExplicitFocusable();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public boolean hasFocus();
+ method public boolean hasFocus();
method public boolean hasFocusable();
method public boolean hasNestedScrollingParent();
method public boolean hasOnClickListeners();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean hasOverlappingRendering();
+ method public boolean hasOverlappingRendering();
method public boolean hasPointerCapture();
- method @android.view.ViewDebug.ExportedProperty(category="layout") public boolean hasTransientState();
+ method public boolean hasTransientState();
method public boolean hasWindowFocus();
method public static android.view.View inflate(android.content.Context, @LayoutRes int, android.view.ViewGroup);
method @Deprecated public void invalidate(android.graphics.Rect);
@@ -51682,48 +51682,48 @@ package android.view {
method public void invalidateOutline();
method public boolean isAccessibilityFocused();
method public boolean isAccessibilityHeading();
- method @android.view.ViewDebug.ExportedProperty public boolean isActivated();
+ method public boolean isActivated();
method public boolean isAttachedToWindow();
- method @android.view.ViewDebug.ExportedProperty public boolean isClickable();
+ method public boolean isClickable();
method public boolean isContextClickable();
method public boolean isDirty();
- method @Deprecated @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean isDrawingCacheEnabled();
+ method @Deprecated public boolean isDrawingCacheEnabled();
method public boolean isDuplicateParentStateEnabled();
- method @android.view.ViewDebug.ExportedProperty public boolean isEnabled();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public final boolean isFocusable();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public final boolean isFocusableInTouchMode();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public boolean isFocused();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public final boolean isFocusedByDefault();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean isForceDarkAllowed();
- method @android.view.ViewDebug.ExportedProperty public boolean isHapticFeedbackEnabled();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean isHardwareAccelerated();
+ method public boolean isEnabled();
+ method public final boolean isFocusable();
+ method public final boolean isFocusableInTouchMode();
+ method public boolean isFocused();
+ method public final boolean isFocusedByDefault();
+ method public boolean isForceDarkAllowed();
+ method public boolean isHapticFeedbackEnabled();
+ method public boolean isHardwareAccelerated();
method public boolean isHorizontalFadingEdgeEnabled();
method public boolean isHorizontalScrollBarEnabled();
- method @android.view.ViewDebug.ExportedProperty public boolean isHovered();
+ method public boolean isHovered();
method public boolean isImportantForAccessibility();
method public final boolean isImportantForAutofill();
method public boolean isInEditMode();
method public boolean isInLayout();
- method @android.view.ViewDebug.ExportedProperty public boolean isInTouchMode();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public final boolean isKeyboardNavigationCluster();
+ method public boolean isInTouchMode();
+ method public final boolean isKeyboardNavigationCluster();
method public boolean isLaidOut();
method public boolean isLayoutDirectionResolved();
method public boolean isLayoutRequested();
method public boolean isLongClickable();
method public boolean isNestedScrollingEnabled();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean isOpaque();
+ method public boolean isOpaque();
method protected boolean isPaddingOffsetRequired();
method public boolean isPaddingRelative();
method public boolean isPivotSet();
- method @android.view.ViewDebug.ExportedProperty public boolean isPressed();
+ method public boolean isPressed();
method public boolean isSaveEnabled();
method public boolean isSaveFromParentEnabled();
method public boolean isScreenReaderFocusable();
method public boolean isScrollContainer();
method public boolean isScrollbarFadingEnabled();
- method @android.view.ViewDebug.ExportedProperty public boolean isSelected();
+ method public boolean isSelected();
method public boolean isShown();
- method @android.view.ViewDebug.ExportedProperty public boolean isSoundEffectsEnabled();
+ method public boolean isSoundEffectsEnabled();
method public final boolean isTemporarilyDetached();
method public boolean isTextAlignmentResolved();
method public boolean isTextDirectionResolved();
@@ -52009,8 +52009,8 @@ package android.view {
method public void unscheduleDrawable(android.graphics.drawable.Drawable);
method public final void updateDragShadow(android.view.View.DragShadowBuilder);
method @CallSuper protected boolean verifyDrawable(@NonNull android.graphics.drawable.Drawable);
- method @Deprecated @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean willNotCacheDrawing();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean willNotDraw();
+ method @Deprecated public boolean willNotCacheDrawing();
+ method public boolean willNotDraw();
field public static final int ACCESSIBILITY_LIVE_REGION_ASSERTIVE = 2; // 0x2
field public static final int ACCESSIBILITY_LIVE_REGION_NONE = 0; // 0x0
field public static final int ACCESSIBILITY_LIVE_REGION_POLITE = 1; // 0x1
@@ -52445,9 +52445,9 @@ package android.view {
method public static int getChildMeasureSpec(int, int, int);
method protected boolean getChildStaticTransformation(android.view.View, android.view.animation.Transformation);
method public boolean getChildVisibleRect(android.view.View, android.graphics.Rect, android.graphics.Point);
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean getClipChildren();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") public boolean getClipToPadding();
- method @android.view.ViewDebug.ExportedProperty(category="focus", mapping={@android.view.ViewDebug.IntToString(from=android.view.ViewGroup.FOCUS_BEFORE_DESCENDANTS, to="FOCUS_BEFORE_DESCENDANTS"), @android.view.ViewDebug.IntToString(from=android.view.ViewGroup.FOCUS_AFTER_DESCENDANTS, to="FOCUS_AFTER_DESCENDANTS"), @android.view.ViewDebug.IntToString(from=android.view.ViewGroup.FOCUS_BLOCK_DESCENDANTS, to="FOCUS_BLOCK_DESCENDANTS")}) public int getDescendantFocusability();
+ method public boolean getClipChildren();
+ method public boolean getClipToPadding();
+ method public int getDescendantFocusability();
method public android.view.View getFocusedChild();
method public android.view.animation.LayoutAnimationController getLayoutAnimation();
method public android.view.animation.Animation.AnimationListener getLayoutAnimationListener();
@@ -52455,14 +52455,14 @@ package android.view {
method public android.animation.LayoutTransition getLayoutTransition();
method public int getNestedScrollAxes();
method public android.view.ViewGroupOverlay getOverlay();
- method @Deprecated @android.view.ViewDebug.ExportedProperty(category="drawing", mapping={@android.view.ViewDebug.IntToString(from=android.view.ViewGroup.PERSISTENT_NO_CACHE, to="NONE"), @android.view.ViewDebug.IntToString(from=android.view.ViewGroup.PERSISTENT_ANIMATION_CACHE, to="ANIMATION"), @android.view.ViewDebug.IntToString(from=android.view.ViewGroup.PERSISTENT_SCROLLING_CACHE, to="SCROLLING"), @android.view.ViewDebug.IntToString(from=android.view.ViewGroup.PERSISTENT_ALL_CACHES, to="ALL")}) public int getPersistentDrawingCache();
- method @android.view.ViewDebug.ExportedProperty(category="focus") public boolean getTouchscreenBlocksFocus();
+ method @Deprecated public int getPersistentDrawingCache();
+ method public boolean getTouchscreenBlocksFocus();
method public int indexOfChild(android.view.View);
method @Deprecated public final void invalidateChild(android.view.View, android.graphics.Rect);
method @Deprecated public android.view.ViewParent invalidateChildInParent(int[], android.graphics.Rect);
method @Deprecated public boolean isAlwaysDrawnWithCacheEnabled();
method @Deprecated public boolean isAnimationCacheEnabled();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") protected boolean isChildrenDrawingOrderEnabled();
+ method protected boolean isChildrenDrawingOrderEnabled();
method @Deprecated protected boolean isChildrenDrawnWithCacheEnabled();
method public boolean isLayoutSuppressed();
method public boolean isMotionEventSplittingEnabled();
@@ -52553,9 +52553,9 @@ package android.view {
field @Deprecated public static final int FILL_PARENT = -1; // 0xffffffff
field public static final int MATCH_PARENT = -1; // 0xffffffff
field public static final int WRAP_CONTENT = -2; // 0xfffffffe
- field @android.view.ViewDebug.ExportedProperty(category="layout", mapping={@android.view.ViewDebug.IntToString(from=android.view.ViewGroup.LayoutParams.MATCH_PARENT, to="MATCH_PARENT"), @android.view.ViewDebug.IntToString(from=android.view.ViewGroup.LayoutParams.WRAP_CONTENT, to="WRAP_CONTENT")}) public int height;
+ field public int height;
field public android.view.animation.LayoutAnimationController.AnimationParameters layoutAnimationParameters;
- field @android.view.ViewDebug.ExportedProperty(category="layout", mapping={@android.view.ViewDebug.IntToString(from=android.view.ViewGroup.LayoutParams.MATCH_PARENT, to="MATCH_PARENT"), @android.view.ViewDebug.IntToString(from=android.view.ViewGroup.LayoutParams.WRAP_CONTENT, to="WRAP_CONTENT")}) public int width;
+ field public int width;
}
public static class ViewGroup.MarginLayoutParams extends android.view.ViewGroup.LayoutParams {
@@ -52571,10 +52571,10 @@ package android.view {
method public void setMarginEnd(int);
method public void setMarginStart(int);
method public void setMargins(int, int, int, int);
- field @android.view.ViewDebug.ExportedProperty(category="layout") public int bottomMargin;
- field @android.view.ViewDebug.ExportedProperty(category="layout") public int leftMargin;
- field @android.view.ViewDebug.ExportedProperty(category="layout") public int rightMargin;
- field @android.view.ViewDebug.ExportedProperty(category="layout") public int topMargin;
+ field public int bottomMargin;
+ field public int leftMargin;
+ field public int rightMargin;
+ field public int topMargin;
}
public static interface ViewGroup.OnHierarchyChangeListener {
@@ -53259,11 +53259,11 @@ package android.view {
field public float alpha;
field public float buttonBrightness;
field public float dimAmount;
- field @android.view.ViewDebug.ExportedProperty(flagMapping={@android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON, equals=android.view.WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON, name="ALLOW_LOCK_WHILE_SCREEN_ON"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_DIM_BEHIND, equals=android.view.WindowManager.LayoutParams.FLAG_DIM_BEHIND, name="DIM_BEHIND"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_BLUR_BEHIND, equals=android.view.WindowManager.LayoutParams.FLAG_BLUR_BEHIND, name="BLUR_BEHIND"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, equals=android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, name="NOT_FOCUSABLE"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE, equals=android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE, name="NOT_TOUCHABLE"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL, equals=android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL, name="NOT_TOUCH_MODAL"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING, equals=android.view.WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING, name="TOUCHABLE_WHEN_WAKING"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, equals=android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, name="KEEP_SCREEN_ON"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN, equals=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN, name="LAYOUT_IN_SCREEN"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, equals=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, name="LAYOUT_NO_LIMITS"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN, equals=android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN, name="FULLSCREEN"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, equals=android.view.WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, name="FORCE_NOT_FULLSCREEN"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_DITHER, equals=android.view.WindowManager.LayoutParams.FLAG_DITHER, name="DITHER"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_SECURE, equals=android.view.WindowManager.LayoutParams.FLAG_SECURE, name="SECURE"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_SCALED, equals=android.view.WindowManager.LayoutParams.FLAG_SCALED, name="SCALED"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_IGNORE_CHEEK_PRESSES, equals=android.view.WindowManager.LayoutParams.FLAG_IGNORE_CHEEK_PRESSES, name="IGNORE_CHEEK_PRESSES"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR, equals=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR, name="LAYOUT_INSET_DECOR"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM, equals=android.view.WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM, name="ALT_FOCUSABLE_IM"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH, equals=android.view.WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH, name="WATCH_OUTSIDE_TOUCH"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED, equals=android.view.WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED, name="SHOW_WHEN_LOCKED"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER, equals=android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER, name="SHOW_WALLPAPER"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON, equals=android.view.WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON, name="TURN_SCREEN_ON"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD, equals=android.view.WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD, name="DISMISS_KEYGUARD"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_SPLIT_TOUCH, equals=android.view.WindowManager.LayoutParams.FLAG_SPLIT_TOUCH, name="SPLIT_TOUCH"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, equals=android.view.WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, name="HARDWARE_ACCELERATED"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_OVERSCAN, equals=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_OVERSCAN, name="LOCAL_FOCUS_MODE"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, equals=android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, name="TRANSLUCENT_STATUS"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, equals=android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, name="TRANSLUCENT_NAVIGATION"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_LOCAL_FOCUS_MODE, equals=android.view.WindowManager.LayoutParams.FLAG_LOCAL_FOCUS_MODE, name="LOCAL_FOCUS_MODE"), @android.view.ViewDebug.FlagToString(mask=0x20000000, equals=0x20000000, name="FLAG_SLIPPERY"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_ATTACHED_IN_DECOR, equals=android.view.WindowManager.LayoutParams.FLAG_LAYOUT_ATTACHED_IN_DECOR, name="FLAG_LAYOUT_ATTACHED_IN_DECOR"), @android.view.ViewDebug.FlagToString(mask=android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, equals=android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, name="DRAWS_SYSTEM_BAR_BACKGROUNDS")}, formatToHexString=true) public int flags;
+ field public int flags;
field public int format;
field public int gravity;
field public float horizontalMargin;
- field @android.view.ViewDebug.ExportedProperty public float horizontalWeight;
+ field public float horizontalWeight;
field public int layoutInDisplayCutoutMode;
field @Deprecated public int memoryType;
field public String packageName;
@@ -53275,12 +53275,12 @@ package android.view {
field public int softInputMode;
field public int systemUiVisibility;
field public android.os.IBinder token;
- field @android.view.ViewDebug.ExportedProperty(mapping={@android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION, to="BASE_APPLICATION"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_APPLICATION, to="APPLICATION"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING, to="APPLICATION_STARTING"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_DRAWN_APPLICATION, to="DRAWN_APPLICATION"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL, to="APPLICATION_PANEL"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA, to="APPLICATION_MEDIA"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL, to="APPLICATION_SUB_PANEL"), @android.view.ViewDebug.IntToString(from=0x3ed, to="APPLICATION_ABOVE_SUB_PANEL"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG, to="APPLICATION_ATTACHED_DIALOG"), @android.view.ViewDebug.IntToString(from=0x3ec, to="APPLICATION_MEDIA_OVERLAY"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR, to="STATUS_BAR"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_SEARCH_BAR, to="SEARCH_BAR"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_PHONE, to="PHONE"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT, to="SYSTEM_ALERT"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_TOAST, to="TOAST"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY, to="SYSTEM_OVERLAY"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_PRIORITY_PHONE, to="PRIORITY_PHONE"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG, to="SYSTEM_DIALOG"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG, to="KEYGUARD_DIALOG"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ERROR, to="SYSTEM_ERROR"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD, to="INPUT_METHOD"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG, to="INPUT_METHOD_DIALOG"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_WALLPAPER, to="WALLPAPER"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL, to="STATUS_BAR_PANEL"), @android.view.ViewDebug.IntToString(from=0x7df, to="SECURE_SYSTEM_OVERLAY"), @android.view.ViewDebug.IntToString(from=0x7e0, to="DRAG"), @android.view.ViewDebug.IntToString(from=0x7e1, to="STATUS_BAR_SUB_PANEL"), @android.view.ViewDebug.IntToString(from=0x7e2, to="POINTER"), @android.view.ViewDebug.IntToString(from=0x7e3, to="NAVIGATION_BAR"), @android.view.ViewDebug.IntToString(from=0x7e4, to="VOLUME_OVERLAY"), @android.view.ViewDebug.IntToString(from=0x7e5, to="BOOT_PROGRESS"), @android.view.ViewDebug.IntToString(from=0x7e6, to="INPUT_CONSUMER"), @android.view.ViewDebug.IntToString(from=0x7e7, to="DREAM"), @android.view.ViewDebug.IntToString(from=0x7e8, to="NAVIGATION_BAR_PANEL"), @android.view.ViewDebug.IntToString(from=0x7ea, to="DISPLAY_OVERLAY"), @android.view.ViewDebug.IntToString(from=0x7eb, to="MAGNIFICATION_OVERLAY"), @android.view.ViewDebug.IntToString(from=0x7f5, to="PRESENTATION"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION, to="PRIVATE_PRESENTATION"), @android.view.ViewDebug.IntToString(from=0x7ef, to="VOICE_INTERACTION"), @android.view.ViewDebug.IntToString(from=0x7f1, to="VOICE_INTERACTION_STARTING"), @android.view.ViewDebug.IntToString(from=0x7f2, to="DOCK_DIVIDER"), @android.view.ViewDebug.IntToString(from=0x7f3, to="QS_DIALOG"), @android.view.ViewDebug.IntToString(from=0x7f4, to="SCREENSHOT"), @android.view.ViewDebug.IntToString(from=android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY, to="APPLICATION_OVERLAY")}) public int type;
+ field public int type;
field public float verticalMargin;
- field @android.view.ViewDebug.ExportedProperty public float verticalWeight;
+ field public float verticalWeight;
field public int windowAnimations;
- field @android.view.ViewDebug.ExportedProperty public int x;
- field @android.view.ViewDebug.ExportedProperty public int y;
+ field public int x;
+ field public int y;
}
}
@@ -55891,21 +55891,21 @@ package android.webkit {
method public void flingScroll(int, int);
method @Deprecated public void freeMemory();
method @Nullable public android.net.http.SslCertificate getCertificate();
- method @android.view.ViewDebug.ExportedProperty(category="webview") public int getContentHeight();
+ method public int getContentHeight();
method @Nullable public static android.content.pm.PackageInfo getCurrentWebViewPackage();
method public android.graphics.Bitmap getFavicon();
method public android.webkit.WebView.HitTestResult getHitTestResult();
method @Deprecated @Nullable public String[] getHttpAuthUsernamePassword(String, String);
- method @android.view.ViewDebug.ExportedProperty(category="webview") public String getOriginalUrl();
+ method public String getOriginalUrl();
method public int getProgress();
method public boolean getRendererPriorityWaivedWhenNotVisible();
method public int getRendererRequestedPriority();
method @NonNull public static android.net.Uri getSafeBrowsingPrivacyPolicyUrl();
- method @Deprecated @android.view.ViewDebug.ExportedProperty(category="webview") public float getScale();
+ method @Deprecated public float getScale();
method public android.webkit.WebSettings getSettings();
method @NonNull public android.view.textclassifier.TextClassifier getTextClassifier();
- method @android.view.ViewDebug.ExportedProperty(category="webview") public String getTitle();
- method @android.view.ViewDebug.ExportedProperty(category="webview") public String getUrl();
+ method public String getTitle();
+ method public String getUrl();
method @Nullable public android.webkit.WebChromeClient getWebChromeClient();
method @NonNull public static ClassLoader getWebViewClassLoader();
method public android.webkit.WebViewClient getWebViewClient();
@@ -56107,7 +56107,7 @@ package android.widget {
method public void fling(int);
method public android.widget.AbsListView.LayoutParams generateLayoutParams(android.util.AttributeSet);
method @ColorInt public int getBottomEdgeEffectColor();
- method @android.view.ViewDebug.ExportedProperty(category="drawing") @ColorInt public int getCacheColorHint();
+ method @ColorInt public int getCacheColorHint();
method public int getCheckedItemCount();
method public long[] getCheckedItemIds();
method public int getCheckedItemPosition();
@@ -56117,7 +56117,7 @@ package android.widget {
method public int getListPaddingLeft();
method public int getListPaddingRight();
method public int getListPaddingTop();
- method @android.view.ViewDebug.ExportedProperty public android.view.View getSelectedView();
+ method public android.view.View getSelectedView();
method public android.graphics.drawable.Drawable getSelector();
method public CharSequence getTextFilter();
method @ColorInt public int getTopEdgeEffectColor();
@@ -56127,13 +56127,13 @@ package android.widget {
method public void invalidateViews();
method public boolean isDrawSelectorOnTop();
method public boolean isFastScrollAlwaysVisible();
- method @android.view.ViewDebug.ExportedProperty public boolean isFastScrollEnabled();
+ method public boolean isFastScrollEnabled();
method protected boolean isInFilterMode();
method public boolean isItemChecked(int);
- method @android.view.ViewDebug.ExportedProperty public boolean isScrollingCacheEnabled();
- method @android.view.ViewDebug.ExportedProperty public boolean isSmoothScrollbarEnabled();
- method @android.view.ViewDebug.ExportedProperty public boolean isStackFromBottom();
- method @android.view.ViewDebug.ExportedProperty public boolean isTextFilterEnabled();
+ method public boolean isScrollingCacheEnabled();
+ method public boolean isSmoothScrollbarEnabled();
+ method public boolean isStackFromBottom();
+ method public boolean isTextFilterEnabled();
method protected void layoutChildren();
method public void onFilterComplete(int);
method public void onGlobalLayout();
@@ -56330,7 +56330,7 @@ package android.widget {
ctor public AdapterView(android.content.Context, android.util.AttributeSet, int);
ctor public AdapterView(android.content.Context, android.util.AttributeSet, int, int);
method public abstract T getAdapter();
- method @android.view.ViewDebug.CapturedViewProperty public int getCount();
+ method public int getCount();
method public android.view.View getEmptyView();
method public int getFirstVisiblePosition();
method public Object getItemAtPosition(int);
@@ -56341,8 +56341,8 @@ package android.widget {
method @Nullable public final android.widget.AdapterView.OnItemSelectedListener getOnItemSelectedListener();
method public int getPositionForView(android.view.View);
method public Object getSelectedItem();
- method @android.view.ViewDebug.CapturedViewProperty public long getSelectedItemId();
- method @android.view.ViewDebug.CapturedViewProperty public int getSelectedItemPosition();
+ method public long getSelectedItemId();
+ method public int getSelectedItemPosition();
method public abstract android.view.View getSelectedView();
method public boolean performItemClick(android.view.View, int, long);
method public abstract void setAdapter(T);
@@ -56643,7 +56643,7 @@ package android.widget {
method @Nullable public android.graphics.BlendMode getCheckMarkTintBlendMode();
method @Nullable public android.content.res.ColorStateList getCheckMarkTintList();
method @Nullable public android.graphics.PorterDuff.Mode getCheckMarkTintMode();
- method @android.view.ViewDebug.ExportedProperty public boolean isChecked();
+ method public boolean isChecked();
method public void setCheckMarkDrawable(@DrawableRes int);
method public void setCheckMarkDrawable(@Nullable android.graphics.drawable.Drawable);
method public void setCheckMarkTintBlendMode(@Nullable android.graphics.BlendMode);
@@ -56684,7 +56684,7 @@ package android.widget {
method @Nullable public android.graphics.BlendMode getButtonTintBlendMode();
method @Nullable public android.content.res.ColorStateList getButtonTintList();
method @Nullable public android.graphics.PorterDuff.Mode getButtonTintMode();
- method @android.view.ViewDebug.ExportedProperty public boolean isChecked();
+ method public boolean isChecked();
method public void setButtonDrawable(@DrawableRes int);
method public void setButtonDrawable(@Nullable android.graphics.drawable.Drawable);
method public void setButtonTintBlendMode(@Nullable android.graphics.BlendMode);
@@ -57073,7 +57073,7 @@ package android.widget {
method public int getColumnWidth();
method public int getGravity();
method public int getHorizontalSpacing();
- method @android.view.ViewDebug.ExportedProperty public int getNumColumns();
+ method public int getNumColumns();
method public int getRequestedColumnWidth();
method public int getRequestedHorizontalSpacing();
method public int getStretchMode();
@@ -57264,8 +57264,8 @@ package android.widget {
ctor public LinearLayout.LayoutParams(android.view.ViewGroup.MarginLayoutParams);
ctor public LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams);
method public String debug(String);
- field @android.view.ViewDebug.ExportedProperty(category="layout", mapping={@android.view.ViewDebug.IntToString(from=0xffffffff, to="NONE"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.NO_GRAVITY, to="NONE"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.TOP, to="TOP"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.BOTTOM, to="BOTTOM"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.LEFT, to="LEFT"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.RIGHT, to="RIGHT"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.START, to="START"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.END, to="END"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.CENTER_VERTICAL, to="CENTER_VERTICAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.FILL_VERTICAL, to="FILL_VERTICAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.CENTER_HORIZONTAL, to="CENTER_HORIZONTAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.FILL_HORIZONTAL, to="FILL_HORIZONTAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.CENTER, to="CENTER"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.FILL, to="FILL")}) public int gravity;
- field @android.view.ViewDebug.ExportedProperty(category="layout") public float weight;
+ field public int gravity;
+ field public float weight;
}
public interface ListAdapter extends android.widget.Adapter {
@@ -57654,13 +57654,13 @@ package android.widget {
method @Nullable public android.content.res.ColorStateList getIndeterminateTintList();
method @Nullable public android.graphics.PorterDuff.Mode getIndeterminateTintMode();
method public android.view.animation.Interpolator getInterpolator();
- method @android.view.ViewDebug.ExportedProperty(category="progress") public int getMax();
+ method public int getMax();
method @Px public int getMaxHeight();
method @Px public int getMaxWidth();
- method @android.view.ViewDebug.ExportedProperty(category="progress") public int getMin();
+ method public int getMin();
method @Px public int getMinHeight();
method @Px public int getMinWidth();
- method @android.view.ViewDebug.ExportedProperty(category="progress") public int getProgress();
+ method public int getProgress();
method @Nullable public android.graphics.BlendMode getProgressBackgroundTintBlendMode();
method @Nullable public android.content.res.ColorStateList getProgressBackgroundTintList();
method @Nullable public android.graphics.PorterDuff.Mode getProgressBackgroundTintMode();
@@ -57668,14 +57668,14 @@ package android.widget {
method @Nullable public android.graphics.BlendMode getProgressTintBlendMode();
method @Nullable public android.content.res.ColorStateList getProgressTintList();
method @Nullable public android.graphics.PorterDuff.Mode getProgressTintMode();
- method @android.view.ViewDebug.ExportedProperty(category="progress") public int getSecondaryProgress();
+ method public int getSecondaryProgress();
method @Nullable public android.graphics.BlendMode getSecondaryProgressTintBlendMode();
method @Nullable public android.content.res.ColorStateList getSecondaryProgressTintList();
method @Nullable public android.graphics.PorterDuff.Mode getSecondaryProgressTintMode();
method public final void incrementProgressBy(int);
method public final void incrementSecondaryProgressBy(int);
method public boolean isAnimating();
- method @android.view.ViewDebug.ExportedProperty(category="progress") public boolean isIndeterminate();
+ method public boolean isIndeterminate();
method public void onRestoreInstanceState(android.os.Parcelable);
method public android.os.Parcelable onSaveInstanceState();
method public void setIndeterminate(boolean);
@@ -57826,7 +57826,7 @@ package android.widget {
method public int getRule(int);
method public int[] getRules();
method public void removeRule(int);
- field @android.view.ViewDebug.ExportedProperty(category="layout") public boolean alignWithParent;
+ field public boolean alignWithParent;
}
public class RemoteViews implements android.view.LayoutInflater.Filter android.os.Parcelable {
@@ -58385,8 +58385,8 @@ package android.widget {
ctor public TableRow.LayoutParams(int);
ctor public TableRow.LayoutParams(android.view.ViewGroup.LayoutParams);
ctor public TableRow.LayoutParams(android.view.ViewGroup.MarginLayoutParams);
- field @android.view.ViewDebug.ExportedProperty(category="layout") public int column;
- field @android.view.ViewDebug.ExportedProperty(category="layout") public int span;
+ field public int column;
+ field public int span;
}
@android.widget.RemoteViews.RemoteView public class TextClock extends android.widget.TextView {
@@ -58394,8 +58394,8 @@ package android.widget {
ctor public TextClock(android.content.Context, android.util.AttributeSet);
ctor public TextClock(android.content.Context, android.util.AttributeSet, int);
ctor public TextClock(android.content.Context, android.util.AttributeSet, int, int);
- method @android.view.ViewDebug.ExportedProperty public CharSequence getFormat12Hour();
- method @android.view.ViewDebug.ExportedProperty public CharSequence getFormat24Hour();
+ method public CharSequence getFormat12Hour();
+ method public CharSequence getFormat24Hour();
method public String getTimeZone();
method public boolean is24HourModeEnabled();
method public void setFormat12Hour(CharSequence);
@@ -58453,7 +58453,7 @@ package android.widget {
method protected boolean getDefaultEditable();
method protected android.text.method.MovementMethod getDefaultMovementMethod();
method public android.text.Editable getEditableText();
- method @android.view.ViewDebug.ExportedProperty public android.text.TextUtils.TruncateAt getEllipsize();
+ method public android.text.TextUtils.TruncateAt getEllipsize();
method public CharSequence getError();
method public int getExtendedPaddingBottom();
method public int getExtendedPaddingTop();
@@ -58464,7 +58464,7 @@ package android.widget {
method public boolean getFreezesText();
method public int getGravity();
method @ColorInt public int getHighlightColor();
- method @android.view.ViewDebug.CapturedViewProperty public CharSequence getHint();
+ method public CharSequence getHint();
method public final android.content.res.ColorStateList getHintTextColors();
method public int getHyphenationFrequency();
method public int getImeActionId();
@@ -58500,14 +58500,14 @@ package android.widget {
method public android.text.TextPaint getPaint();
method public int getPaintFlags();
method public String getPrivateImeOptions();
- method @android.view.ViewDebug.ExportedProperty(category="text") public int getSelectionEnd();
- method @android.view.ViewDebug.ExportedProperty(category="text") public int getSelectionStart();
+ method public int getSelectionEnd();
+ method public int getSelectionStart();
method @ColorInt public int getShadowColor();
method public float getShadowDx();
method public float getShadowDy();
method public float getShadowRadius();
method public final boolean getShowSoftInputOnFocus();
- method @android.view.ViewDebug.CapturedViewProperty public CharSequence getText();
+ method public CharSequence getText();
method @NonNull public android.view.textclassifier.TextClassifier getTextClassifier();
method public final android.content.res.ColorStateList getTextColors();
method @Nullable public android.graphics.drawable.Drawable getTextCursorDrawable();
@@ -58519,7 +58519,7 @@ package android.widget {
method @Nullable public android.graphics.drawable.Drawable getTextSelectHandle();
method @Nullable public android.graphics.drawable.Drawable getTextSelectHandleLeft();
method @Nullable public android.graphics.drawable.Drawable getTextSelectHandleRight();
- method @android.view.ViewDebug.ExportedProperty(category="text") public float getTextSize();
+ method public float getTextSize();
method public int getTotalPaddingBottom();
method public int getTotalPaddingEnd();
method public int getTotalPaddingLeft();
diff --git a/packages/Tethering/TEST_MAPPING b/packages/Tethering/TEST_MAPPING
index 73254cdc79a9..5617b0c13c1c 100644
--- a/packages/Tethering/TEST_MAPPING
+++ b/packages/Tethering/TEST_MAPPING
@@ -1,7 +1,12 @@
{
- "postsubmit": [
+ "presubmit": [
{
"name": "TetheringTests"
}
+ ],
+ "postsubmit": [
+ {
+ "name": "TetheringIntegrationTests"
+ }
]
}
diff --git a/packages/Tethering/src/android/net/ip/IpServer.java b/packages/Tethering/src/android/net/ip/IpServer.java
index 830f6a0fec56..1671dda4bd57 100644
--- a/packages/Tethering/src/android/net/ip/IpServer.java
+++ b/packages/Tethering/src/android/net/ip/IpServer.java
@@ -77,7 +77,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
-import java.util.LinkedHashMap;
import java.util.List;
import java.util.Objects;
import java.util.Random;
@@ -272,9 +271,6 @@ public class IpServer extends StateMachine {
}
}
- private final LinkedHashMap<Inet6Address, Ipv6ForwardingRule> mIpv6ForwardingRules =
- new LinkedHashMap<>();
-
private final IpNeighborMonitor mIpNeighborMonitor;
private LinkAddress mIpv4Address;
@@ -843,43 +839,29 @@ public class IpServer extends StateMachine {
// TODO: Perhaps remove this protection check.
if (!mUsingBpfOffload) return;
- try {
- mNetd.tetherOffloadRuleAdd(rule.toTetherOffloadRuleParcel());
- mIpv6ForwardingRules.put(rule.address, rule);
- } catch (RemoteException | ServiceSpecificException e) {
- mLog.e("Could not add IPv6 downstream rule: ", e);
- }
+ mBpfCoordinator.tetherOffloadRuleAdd(this, rule);
}
- private void removeIpv6ForwardingRule(Ipv6ForwardingRule rule, boolean removeFromMap) {
- // Theoretically, we don't need this check because IP neighbor monitor doesn't start if BPF
- // offload is disabled. Add this check just in case.
+ private void removeIpv6ForwardingRule(Ipv6ForwardingRule rule) {
// TODO: Perhaps remove this protection check.
+ // See the related comment in #addIpv6ForwardingRule.
if (!mUsingBpfOffload) return;
- try {
- mNetd.tetherOffloadRuleRemove(rule.toTetherOffloadRuleParcel());
- if (removeFromMap) {
- mIpv6ForwardingRules.remove(rule.address);
- }
- } catch (RemoteException | ServiceSpecificException e) {
- mLog.e("Could not remove IPv6 downstream rule: ", e);
- }
+ mBpfCoordinator.tetherOffloadRuleRemove(this, rule);
}
private void clearIpv6ForwardingRules() {
- for (Ipv6ForwardingRule rule : mIpv6ForwardingRules.values()) {
- removeIpv6ForwardingRule(rule, false /*removeFromMap*/);
- }
- mIpv6ForwardingRules.clear();
+ if (!mUsingBpfOffload) return;
+
+ mBpfCoordinator.tetherOffloadRuleClear(this);
}
- // Convenience method to replace a rule with the same rule on a new upstream interface.
- // Allows replacing the rules in one iteration pass without ConcurrentModificationExceptions.
- // Relies on the fact that rules are in a map indexed by IP address.
- private void updateIpv6ForwardingRule(Ipv6ForwardingRule rule, int newIfindex) {
- addIpv6ForwardingRule(rule.onNewUpstream(newIfindex));
- removeIpv6ForwardingRule(rule, false /*removeFromMap*/);
+ private void updateIpv6ForwardingRule(int newIfindex) {
+ // TODO: Perhaps remove this protection check.
+ // See the related comment in #addIpv6ForwardingRule.
+ if (!mUsingBpfOffload) return;
+
+ mBpfCoordinator.tetherOffloadRuleUpdate(this, newIfindex);
}
// Handles all updates to IPv6 forwarding rules. These can currently change only if the upstream
@@ -895,9 +877,7 @@ public class IpServer extends StateMachine {
// If the upstream interface has changed, remove all rules and re-add them with the new
// upstream interface.
if (prevUpstreamIfindex != upstreamIfindex) {
- for (Ipv6ForwardingRule rule : mIpv6ForwardingRules.values()) {
- updateIpv6ForwardingRule(rule, upstreamIfindex);
- }
+ updateIpv6ForwardingRule(upstreamIfindex);
}
// If we're here to process a NeighborEvent, do so now.
@@ -917,7 +897,7 @@ public class IpServer extends StateMachine {
if (e.isValid()) {
addIpv6ForwardingRule(rule);
} else {
- removeIpv6ForwardingRule(rule, true /*removeFromMap*/);
+ removeIpv6ForwardingRule(rule);
}
}
diff --git a/packages/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java b/packages/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java
index 089b12aa3990..fc27b6add052 100644
--- a/packages/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java
+++ b/packages/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java
@@ -32,6 +32,7 @@ import android.net.NetworkStats;
import android.net.NetworkStats.Entry;
import android.net.TetherOffloadRuleParcel;
import android.net.TetherStatsParcel;
+import android.net.ip.IpServer;
import android.net.netstats.provider.NetworkStatsProvider;
import android.net.util.SharedLog;
import android.net.util.TetheringUtils.ForwardedStats;
@@ -48,11 +49,17 @@ import androidx.annotation.Nullable;
import com.android.internal.annotations.VisibleForTesting;
import java.net.Inet6Address;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Objects;
/**
* This coordinator is responsible for providing BPF offload relevant functionality.
* - Get tethering stats.
+ * - Set data limit.
* - Set global alert.
+ * - Add/remove forwarding rules.
*
* @hide
*/
@@ -77,7 +84,14 @@ public class BpfCoordinator {
private final Dependencies mDeps;
@Nullable
private final BpfTetherStatsProvider mStatsProvider;
- private boolean mStarted = false;
+
+ // Tracks whether BPF tethering is started or not. This is set by tethering before it
+ // starts the first IpServer and is cleared by tethering shortly before the last IpServer
+ // is stopped. Note that rule updates (especially deletions, but sometimes additions as
+ // well) may arrive when this is false. If they do, they must be communicated to netd.
+ // Changes in data limits may also arrive when this is false, and if they do, they must
+ // also be communicated to netd.
+ private boolean mPollingStarted = false;
// Tracking remaining alert quota. Unlike limit quota is subject to interface, the alert
// quota is interface independent and global for tether offload.
@@ -86,13 +100,40 @@ public class BpfCoordinator {
// Maps upstream interface index to offloaded traffic statistics.
// Always contains the latest total bytes/packets, since each upstream was started, received
// from the BPF maps for each interface.
- private SparseArray<ForwardedStats> mStats = new SparseArray<>();
+ private final SparseArray<ForwardedStats> mStats = new SparseArray<>();
+
+ // Maps upstream interface names to interface quotas.
+ // Always contains the latest value received from the framework for each interface, regardless
+ // of whether offload is currently running (or is even supported) on that interface. Only
+ // includes interfaces that have a quota set. Note that this map is used for storing the quota
+ // which is set from the service. Because the service uses the interface name to present the
+ // interface, this map uses the interface name to be the mapping index.
+ private final HashMap<String, Long> mInterfaceQuotas = new HashMap<>();
// Maps upstream interface index to interface names.
// Store all interface name since boot. Used for lookup what interface name it is from the
// tether stats got from netd because netd reports interface index to present an interface.
// TODO: Remove the unused interface name.
- private SparseArray<String> mInterfaceNames = new SparseArray<>();
+ private final SparseArray<String> mInterfaceNames = new SparseArray<>();
+
+ // Map of downstream rule maps. Each of these maps represents the IPv6 forwarding rules for a
+ // given downstream. Each map:
+ // - Is owned by the IpServer that is responsible for that downstream.
+ // - Must only be modified by that IpServer.
+ // - Is created when the IpServer adds its first rule, and deleted when the IpServer deletes
+ // its last rule (or clears its rules).
+ // TODO: Perhaps seal the map and rule operations which communicates with netd into a class.
+ // TODO: Does this need to be a LinkedHashMap or can it just be a HashMap? Also, could it be
+ // a ConcurrentHashMap, in order to avoid the copies in tetherOffloadRuleClear
+ // and tetherOffloadRuleUpdate?
+ // TODO: Perhaps use one-dimensional map and access specific downstream rules via downstream
+ // index. For doing that, IpServer must guarantee that it always has a valid IPv6 downstream
+ // interface index while calling function to clear all rules. IpServer may be calling clear
+ // rules function without a valid IPv6 downstream interface index even if it may have one
+ // before. IpServer would need to call getInterfaceParams() in the constructor instead of when
+ // startIpv6() is called, and make mInterfaceParams final.
+ private final HashMap<IpServer, LinkedHashMap<Inet6Address, Ipv6ForwardingRule>>
+ mIpv6ForwardingRules = new LinkedHashMap<>();
// Runnable that used by scheduling next polling of stats.
private final Runnable mScheduledPollingTask = () -> {
@@ -101,14 +142,15 @@ public class BpfCoordinator {
};
@VisibleForTesting
- static class Dependencies {
+ public static class Dependencies {
int getPerformPollInterval() {
// TODO: Consider make this configurable.
return DEFAULT_PERFORM_POLL_INTERVAL_MS;
}
}
- BpfCoordinator(@NonNull Handler handler, @NonNull INetd netd,
+ @VisibleForTesting
+ public BpfCoordinator(@NonNull Handler handler, @NonNull INetd netd,
@NonNull NetworkStatsManager nsm, @NonNull SharedLog log, @NonNull Dependencies deps) {
mHandler = handler;
mNetd = netd;
@@ -132,31 +174,153 @@ public class BpfCoordinator {
* TODO: Perhaps check BPF support before starting.
* TODO: Start the stats polling only if there is any client on the downstream.
*/
- public void start() {
- if (mStarted) return;
+ public void startPolling() {
+ if (mPollingStarted) return;
- mStarted = true;
+ mPollingStarted = true;
maybeSchedulePollingStats();
- mLog.i("BPF tethering coordinator started");
+ mLog.i("Polling started");
}
/**
- * Stop BPF tethering offload stats polling and cleanup upstream parameters.
+ * Stop BPF tethering offload stats polling.
+ * The data limit cleanup and the tether stats maps cleanup are not implemented here.
+ * These cleanups rely on all IpServers calling #tetherOffloadRuleRemove. After the
+ * last rule is removed from the upstream, #tetherOffloadRuleRemove does the cleanup
+ * functionality.
* Note that this can be only called on handler thread.
*/
- public void stop() {
- if (!mStarted) return;
+ public void stopPolling() {
+ if (!mPollingStarted) return;
// Stop scheduled polling tasks and poll the latest stats from BPF maps.
if (mHandler.hasCallbacks(mScheduledPollingTask)) {
mHandler.removeCallbacks(mScheduledPollingTask);
}
updateForwardedStatsFromNetd();
+ mPollingStarted = false;
+
+ mLog.i("Polling stopped");
+ }
+
+ /**
+ * Add forwarding rule. After adding the first rule on a given upstream, must add the data
+ * limit on the given upstream.
+ * Note that this can be only called on handler thread.
+ */
+ public void tetherOffloadRuleAdd(
+ @NonNull final IpServer ipServer, @NonNull final Ipv6ForwardingRule rule) {
+ try {
+ // TODO: Perhaps avoid to add a duplicate rule.
+ mNetd.tetherOffloadRuleAdd(rule.toTetherOffloadRuleParcel());
+ } catch (RemoteException | ServiceSpecificException e) {
+ mLog.e("Could not add IPv6 forwarding rule: ", e);
+ return;
+ }
+
+ if (!mIpv6ForwardingRules.containsKey(ipServer)) {
+ mIpv6ForwardingRules.put(ipServer, new LinkedHashMap<Inet6Address,
+ Ipv6ForwardingRule>());
+ }
+ LinkedHashMap<Inet6Address, Ipv6ForwardingRule> rules = mIpv6ForwardingRules.get(ipServer);
+
+ // Setup the data limit on the given upstream if the first rule is added.
+ final int upstreamIfindex = rule.upstreamIfindex;
+ if (!isAnyRuleOnUpstream(upstreamIfindex)) {
+ // If failed to set a data limit, probably should not use this upstream, because
+ // the upstream may not want to blow through the data limit that was told to apply.
+ // TODO: Perhaps stop the coordinator.
+ boolean success = updateDataLimit(upstreamIfindex);
+ if (!success) {
+ final String iface = mInterfaceNames.get(upstreamIfindex);
+ mLog.e("Setting data limit for " + iface + " failed.");
+ }
+ }
+
+ // Must update the adding rule after calling #isAnyRuleOnUpstream because it needs to
+ // check if it is about adding a first rule for a given upstream.
+ rules.put(rule.address, rule);
+ }
+
+ /**
+ * Remove forwarding rule. After removing the last rule on a given upstream, must clear
+ * data limit, update the last tether stats and remove the tether stats in the BPF maps.
+ * Note that this can be only called on handler thread.
+ */
+ public void tetherOffloadRuleRemove(
+ @NonNull final IpServer ipServer, @NonNull final Ipv6ForwardingRule rule) {
+ try {
+ // TODO: Perhaps avoid to remove a non-existent rule.
+ mNetd.tetherOffloadRuleRemove(rule.toTetherOffloadRuleParcel());
+ } catch (RemoteException | ServiceSpecificException e) {
+ mLog.e("Could not remove IPv6 forwarding rule: ", e);
+ return;
+ }
- mStarted = false;
+ LinkedHashMap<Inet6Address, Ipv6ForwardingRule> rules = mIpv6ForwardingRules.get(ipServer);
+ if (rules == null) return;
- mLog.i("BPF tethering coordinator stopped");
+ // Must remove rules before calling #isAnyRuleOnUpstream because it needs to check if
+ // the last rule is removed for a given upstream. If no rule is removed, return early.
+ // Avoid unnecessary work on a non-existent rule which may have never been added or
+ // removed already.
+ if (rules.remove(rule.address) == null) return;
+
+ // Remove the downstream entry if it has no more rule.
+ if (rules.isEmpty()) {
+ mIpv6ForwardingRules.remove(ipServer);
+ }
+
+ // Do cleanup functionality if there is no more rule on the given upstream.
+ final int upstreamIfindex = rule.upstreamIfindex;
+ if (!isAnyRuleOnUpstream(upstreamIfindex)) {
+ try {
+ final TetherStatsParcel stats =
+ mNetd.tetherOffloadGetAndClearStats(upstreamIfindex);
+ // Update the last stats delta and delete the local cache for a given upstream.
+ updateQuotaAndStatsFromSnapshot(new TetherStatsParcel[] {stats});
+ mStats.remove(upstreamIfindex);
+ } catch (RemoteException | ServiceSpecificException e) {
+ Log.wtf(TAG, "Exception when cleanup tether stats for upstream index "
+ + upstreamIfindex + ": ", e);
+ }
+ }
+ }
+
+ /**
+ * Clear all forwarding rules for a given downstream.
+ * Note that this can be only called on handler thread.
+ */
+ public void tetherOffloadRuleClear(@NonNull final IpServer ipServer) {
+ final LinkedHashMap<Inet6Address, Ipv6ForwardingRule> rules = mIpv6ForwardingRules.get(
+ ipServer);
+ if (rules == null) return;
+
+ // Need to build a rule list because the rule map may be changed in the iteration.
+ for (final Ipv6ForwardingRule rule : new ArrayList<Ipv6ForwardingRule>(rules.values())) {
+ tetherOffloadRuleRemove(ipServer, rule);
+ }
+ }
+
+ /**
+ * Update existing forwarding rules to new upstream for a given downstream.
+ * Note that this can be only called on handler thread.
+ */
+ public void tetherOffloadRuleUpdate(@NonNull final IpServer ipServer, int newUpstreamIfindex) {
+ final LinkedHashMap<Inet6Address, Ipv6ForwardingRule> rules = mIpv6ForwardingRules.get(
+ ipServer);
+ if (rules == null) return;
+
+ // Need to build a rule list because the rule map may be changed in the iteration.
+ for (final Ipv6ForwardingRule rule : new ArrayList<Ipv6ForwardingRule>(rules.values())) {
+ // Remove the old rule before adding the new one because the map uses the same key for
+ // both rules. Reversing the processing order causes that the new rule is removed as
+ // unexpected.
+ // TODO: Add new rule first to reduce the latency which has no rule.
+ tetherOffloadRuleRemove(ipServer, rule);
+ tetherOffloadRuleAdd(ipServer, rule.onNewUpstream(newUpstreamIfindex));
+ }
}
/**
@@ -184,12 +348,17 @@ public class BpfCoordinator {
public static class Ipv6ForwardingRule {
public final int upstreamIfindex;
public final int downstreamIfindex;
+
+ @NonNull
public final Inet6Address address;
+ @NonNull
public final MacAddress srcMac;
+ @NonNull
public final MacAddress dstMac;
- public Ipv6ForwardingRule(int upstreamIfindex, int downstreamIfIndex, Inet6Address address,
- MacAddress srcMac, MacAddress dstMac) {
+ public Ipv6ForwardingRule(int upstreamIfindex, int downstreamIfIndex,
+ @NonNull Inet6Address address, @NonNull MacAddress srcMac,
+ @NonNull MacAddress dstMac) {
this.upstreamIfindex = upstreamIfindex;
this.downstreamIfindex = downstreamIfIndex;
this.address = address;
@@ -198,6 +367,7 @@ public class BpfCoordinator {
}
/** Return a new rule object which updates with new upstream index. */
+ @NonNull
public Ipv6ForwardingRule onNewUpstream(int newUpstreamIfindex) {
return new Ipv6ForwardingRule(newUpstreamIfindex, downstreamIfindex, address, srcMac,
dstMac);
@@ -207,6 +377,7 @@ public class BpfCoordinator {
* Don't manipulate TetherOffloadRuleParcel directly because implementing onNewUpstream()
* would be error-prone due to generated stable AIDL classes not having a copy constructor.
*/
+ @NonNull
public TetherOffloadRuleParcel toTetherOffloadRuleParcel() {
final TetherOffloadRuleParcel parcel = new TetherOffloadRuleParcel();
parcel.inputInterfaceIndex = upstreamIfindex;
@@ -217,6 +388,24 @@ public class BpfCoordinator {
parcel.dstL2Address = dstMac.toByteArray();
return parcel;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (!(o instanceof Ipv6ForwardingRule)) return false;
+ Ipv6ForwardingRule that = (Ipv6ForwardingRule) o;
+ return this.upstreamIfindex == that.upstreamIfindex
+ && this.downstreamIfindex == that.downstreamIfindex
+ && Objects.equals(this.address, that.address)
+ && Objects.equals(this.srcMac, that.srcMac)
+ && Objects.equals(this.dstMac, that.dstMac);
+ }
+
+ @Override
+ public int hashCode() {
+ // TODO: if this is ever used in production code, don't pass ifindices
+ // to Objects.hash() to avoid autoboxing overhead.
+ return Objects.hash(upstreamIfindex, downstreamIfindex, address, srcMac, dstMac);
+ }
}
/**
@@ -245,7 +434,22 @@ public class BpfCoordinator {
@Override
public void onSetLimit(@NonNull String iface, long quotaBytes) {
- // no-op
+ if (quotaBytes < QUOTA_UNLIMITED) {
+ throw new IllegalArgumentException("invalid quota value " + quotaBytes);
+ }
+
+ mHandler.post(() -> {
+ final Long curIfaceQuota = mInterfaceQuotas.get(iface);
+
+ if (null == curIfaceQuota && QUOTA_UNLIMITED == quotaBytes) return;
+
+ if (quotaBytes == QUOTA_UNLIMITED) {
+ mInterfaceQuotas.remove(iface);
+ } else {
+ mInterfaceQuotas.put(iface, quotaBytes);
+ }
+ maybeUpdateDataLimit(iface);
+ });
}
@VisibleForTesting
@@ -270,9 +474,79 @@ public class BpfCoordinator {
}
}
+ private int getInterfaceIndexFromRules(@NonNull String ifName) {
+ for (LinkedHashMap<Inet6Address, Ipv6ForwardingRule> rules : mIpv6ForwardingRules
+ .values()) {
+ for (Ipv6ForwardingRule rule : rules.values()) {
+ final int upstreamIfindex = rule.upstreamIfindex;
+ if (TextUtils.equals(ifName, mInterfaceNames.get(upstreamIfindex))) {
+ return upstreamIfindex;
+ }
+ }
+ }
+ return 0;
+ }
+
+ private long getQuotaBytes(@NonNull String iface) {
+ final Long limit = mInterfaceQuotas.get(iface);
+ final long quotaBytes = (limit != null) ? limit : QUOTA_UNLIMITED;
+
+ return quotaBytes;
+ }
+
+ private boolean sendDataLimitToNetd(int ifIndex, long quotaBytes) {
+ if (ifIndex == 0) {
+ Log.wtf(TAG, "Invalid interface index.");
+ return false;
+ }
+
+ try {
+ mNetd.tetherOffloadSetInterfaceQuota(ifIndex, quotaBytes);
+ } catch (RemoteException | ServiceSpecificException e) {
+ mLog.e("Exception when updating quota " + quotaBytes + ": ", e);
+ return false;
+ }
+
+ return true;
+ }
+
+ // Handle the data limit update from the service which is the stats provider registered for.
+ private void maybeUpdateDataLimit(@NonNull String iface) {
+ // Set data limit only on a given upstream which has at least one rule. If we can't get
+ // an interface index for a given interface name, it means either there is no rule for
+ // a given upstream or the interface name is not an upstream which is monitored by the
+ // coordinator.
+ final int ifIndex = getInterfaceIndexFromRules(iface);
+ if (ifIndex == 0) return;
+
+ final long quotaBytes = getQuotaBytes(iface);
+ sendDataLimitToNetd(ifIndex, quotaBytes);
+ }
+
+ // Handle the data limit update while adding forwarding rules.
+ private boolean updateDataLimit(int ifIndex) {
+ final String iface = mInterfaceNames.get(ifIndex);
+ if (iface == null) {
+ mLog.e("Fail to get the interface name for index " + ifIndex);
+ return false;
+ }
+ final long quotaBytes = getQuotaBytes(iface);
+ return sendDataLimitToNetd(ifIndex, quotaBytes);
+ }
+
+ private boolean isAnyRuleOnUpstream(int upstreamIfindex) {
+ for (LinkedHashMap<Inet6Address, Ipv6ForwardingRule> rules : mIpv6ForwardingRules
+ .values()) {
+ for (Ipv6ForwardingRule rule : rules.values()) {
+ if (upstreamIfindex == rule.upstreamIfindex) return true;
+ }
+ }
+ return false;
+ }
+
@NonNull
private NetworkStats buildNetworkStats(@NonNull StatsType type, int ifIndex,
- @NonNull ForwardedStats diff) {
+ @NonNull final ForwardedStats diff) {
NetworkStats stats = new NetworkStats(0L, 0);
final String iface = mInterfaceNames.get(ifIndex);
if (iface == null) {
@@ -302,17 +576,8 @@ public class BpfCoordinator {
}
}
- private void updateForwardedStatsFromNetd() {
- final TetherStatsParcel[] tetherStatsList;
- try {
- // The reported tether stats are total data usage for all currently-active upstream
- // interfaces since tethering start.
- tetherStatsList = mNetd.tetherOffloadGetStats();
- } catch (RemoteException | ServiceSpecificException e) {
- mLog.e("Problem fetching tethering stats: ", e);
- return;
- }
-
+ private void updateQuotaAndStatsFromSnapshot(
+ @NonNull final TetherStatsParcel[] tetherStatsList) {
long usedAlertQuota = 0;
for (TetherStatsParcel tetherStats : tetherStatsList) {
final Integer ifIndex = tetherStats.ifIndex;
@@ -332,7 +597,7 @@ public class BpfCoordinator {
buildNetworkStats(StatsType.STATS_PER_IFACE, ifIndex, diff),
buildNetworkStats(StatsType.STATS_PER_UID, ifIndex, diff));
} catch (ArrayIndexOutOfBoundsException e) {
- Log.wtf("Fail to update the accumulated stats delta for interface index "
+ Log.wtf(TAG, "Fail to update the accumulated stats delta for interface index "
+ ifIndex + " : ", e);
}
}
@@ -344,10 +609,24 @@ public class BpfCoordinator {
updateAlertQuota(newQuota);
}
+ // TODO: Count the used limit quota for notifying data limit reached.
+ }
+
+ private void updateForwardedStatsFromNetd() {
+ final TetherStatsParcel[] tetherStatsList;
+ try {
+ // The reported tether stats are total data usage for all currently-active upstream
+ // interfaces since tethering start.
+ tetherStatsList = mNetd.tetherOffloadGetStats();
+ } catch (RemoteException | ServiceSpecificException e) {
+ mLog.e("Problem fetching tethering stats: ", e);
+ return;
+ }
+ updateQuotaAndStatsFromSnapshot(tetherStatsList);
}
private void maybeSchedulePollingStats() {
- if (!mStarted) return;
+ if (!mPollingStarted) return;
if (mHandler.hasCallbacks(mScheduledPollingTask)) {
mHandler.removeCallbacks(mScheduledPollingTask);
diff --git a/packages/Tethering/src/com/android/networkstack/tethering/PrivateAddressCoordinator.java b/packages/Tethering/src/com/android/networkstack/tethering/PrivateAddressCoordinator.java
index 160a166b632b..aa58a4b6a320 100644
--- a/packages/Tethering/src/com/android/networkstack/tethering/PrivateAddressCoordinator.java
+++ b/packages/Tethering/src/com/android/networkstack/tethering/PrivateAddressCoordinator.java
@@ -15,6 +15,8 @@
*/
package com.android.networkstack.tethering;
+import static java.util.Arrays.asList;
+
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.IpPrefix;
@@ -34,9 +36,10 @@ import com.android.internal.util.IndentingPrintWriter;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
-import java.util.Arrays;
+import java.util.HashSet;
import java.util.List;
import java.util.Random;
+import java.util.Set;
/**
* This class coordinate IP addresses conflict problem.
@@ -60,8 +63,8 @@ public class PrivateAddressCoordinator {
// Upstream monitor would be stopped when tethering is down. When tethering restart, downstream
// address may be requested before coordinator get current upstream notification. To ensure
// coordinator do not select conflict downstream prefix, mUpstreamPrefixMap would not be cleared
- // when tethering is down. Instead coordinator would remove all depcreted upstreams from
- // mUpstreamPrefixMap when tethering is starting. See #maybeRemoveDeprectedUpstreams().
+ // when tethering is down. Instead tethering would remove all deprecated upstreams from
+ // mUpstreamPrefixMap when tethering is starting. See #maybeRemoveDeprecatedUpstreams().
private final ArrayMap<Network, List<IpPrefix>> mUpstreamPrefixMap;
private final ArraySet<IpServer> mDownstreams;
// IANA has reserved the following three blocks of the IP address space for private intranets:
@@ -124,15 +127,16 @@ public class PrivateAddressCoordinator {
mUpstreamPrefixMap.remove(network);
}
- private void maybeRemoveDeprectedUpstreams() {
- if (!mDownstreams.isEmpty() || mUpstreamPrefixMap.isEmpty()) return;
+ /**
+ * Maybe remove deprecated upstream records, this would be called once tethering started without
+ * any exiting tethered downstream.
+ */
+ public void maybeRemoveDeprecatedUpstreams() {
+ if (mUpstreamPrefixMap.isEmpty()) return;
- final ArrayList<Network> toBeRemoved = new ArrayList<>();
- List<Network> allNetworks = Arrays.asList(mConnectivityMgr.getAllNetworks());
- for (int i = 0; i < mUpstreamPrefixMap.size(); i++) {
- final Network network = mUpstreamPrefixMap.keyAt(i);
- if (!allNetworks.contains(network)) toBeRemoved.add(network);
- }
+ // Remove all upstreams that are no longer valid networks
+ final Set<Network> toBeRemoved = new HashSet<>(mUpstreamPrefixMap.keySet());
+ toBeRemoved.removeAll(asList(mConnectivityMgr.getAllNetworks()));
mUpstreamPrefixMap.removeAll(toBeRemoved);
}
@@ -143,8 +147,6 @@ public class PrivateAddressCoordinator {
*/
@Nullable
public LinkAddress requestDownstreamAddress(final IpServer ipServer) {
- maybeRemoveDeprectedUpstreams();
-
// Address would be 192.168.[subAddress]/24.
final byte[] bytes = mTetheringPrefix.getRawAddress();
final int subAddress = getRandomSubAddr();
@@ -237,7 +239,6 @@ public class PrivateAddressCoordinator {
}
void dump(final IndentingPrintWriter pw) {
- pw.decreaseIndent();
pw.println("mUpstreamPrefixMap:");
pw.increaseIndent();
for (int i = 0; i < mUpstreamPrefixMap.size(); i++) {
diff --git a/packages/Tethering/src/com/android/networkstack/tethering/Tethering.java b/packages/Tethering/src/com/android/networkstack/tethering/Tethering.java
index 00723ac73b43..8deac537ffef 100644
--- a/packages/Tethering/src/com/android/networkstack/tethering/Tethering.java
+++ b/packages/Tethering/src/com/android/networkstack/tethering/Tethering.java
@@ -1698,6 +1698,7 @@ public class Tethering {
return;
}
+ mPrivateAddressCoordinator.maybeRemoveDeprecatedUpstreams();
mUpstreamNetworkMonitor.startObserveAllNetworks();
// TODO: De-duplicate with updateUpstreamWanted() below.
@@ -1709,7 +1710,7 @@ public class Tethering {
}
// TODO: Check the upstream interface if it is managed by BPF offload.
- mBpfCoordinator.start();
+ mBpfCoordinator.startPolling();
}
@Override
@@ -1722,7 +1723,7 @@ public class Tethering {
mTetherUpstream = null;
reportUpstreamChanged(null);
}
- mBpfCoordinator.stop();
+ mBpfCoordinator.stopPolling();
}
private boolean updateUpstreamWanted() {
diff --git a/packages/Tethering/tests/unit/src/android/net/ip/IpServerTest.java b/packages/Tethering/tests/unit/src/android/net/ip/IpServerTest.java
index 433aacfaff44..c3bc915a232d 100644
--- a/packages/Tethering/tests/unit/src/android/net/ip/IpServerTest.java
+++ b/packages/Tethering/tests/unit/src/android/net/ip/IpServerTest.java
@@ -54,12 +54,14 @@ import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.timeout;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
+import android.app.usage.NetworkStatsManager;
import android.net.INetd;
import android.net.InetAddresses;
import android.net.InterfaceConfigurationParcel;
@@ -69,6 +71,7 @@ import android.net.LinkProperties;
import android.net.MacAddress;
import android.net.RouteInfo;
import android.net.TetherOffloadRuleParcel;
+import android.net.TetherStatsParcel;
import android.net.dhcp.DhcpServingParamsParcel;
import android.net.dhcp.IDhcpEventCallbacks;
import android.net.dhcp.IDhcpServer;
@@ -80,14 +83,17 @@ import android.net.util.InterfaceParams;
import android.net.util.InterfaceSet;
import android.net.util.PrefixUtils;
import android.net.util.SharedLog;
+import android.os.Handler;
import android.os.RemoteException;
import android.os.test.TestLooper;
import android.text.TextUtils;
+import androidx.annotation.NonNull;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.networkstack.tethering.BpfCoordinator;
+import com.android.networkstack.tethering.BpfCoordinator.Ipv6ForwardingRule;
import com.android.networkstack.tethering.PrivateAddressCoordinator;
import org.junit.Before;
@@ -101,6 +107,7 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import java.net.Inet4Address;
+import java.net.Inet6Address;
import java.net.InetAddress;
import java.util.Arrays;
import java.util.List;
@@ -127,7 +134,6 @@ public class IpServerTest {
private final IpPrefix mBluetoothPrefix = new IpPrefix("192.168.44.0/24");
@Mock private INetd mNetd;
- @Mock private BpfCoordinator mBpfCoordinator;
@Mock private IpServer.Callback mCallback;
@Mock private SharedLog mSharedLog;
@Mock private IDhcpServer mDhcpServer;
@@ -135,6 +141,7 @@ public class IpServerTest {
@Mock private IpNeighborMonitor mIpNeighborMonitor;
@Mock private IpServer.Dependencies mDependencies;
@Mock private PrivateAddressCoordinator mAddressCoordinator;
+ @Mock private NetworkStatsManager mStatsManager;
@Captor private ArgumentCaptor<DhcpServingParamsParcel> mDhcpParamsCaptor;
@@ -144,6 +151,7 @@ public class IpServerTest {
private IpServer mIpServer;
private InterfaceConfigurationParcel mInterfaceConfiguration;
private NeighborEventConsumer mNeighborEventConsumer;
+ private BpfCoordinator mBpfCoordinator;
private void initStateMachine(int interfaceType) throws Exception {
initStateMachine(interfaceType, false /* usingLegacyDhcp */, DEFAULT_USING_BPF_OFFLOAD);
@@ -217,6 +225,10 @@ public class IpServerTest {
MockitoAnnotations.initMocks(this);
when(mSharedLog.forSubComponent(anyString())).thenReturn(mSharedLog);
when(mAddressCoordinator.requestDownstreamAddress(any())).thenReturn(mTestAddress);
+
+ BpfCoordinator bc = new BpfCoordinator(new Handler(mLooper.getLooper()), mNetd,
+ mStatsManager, mSharedLog, new BpfCoordinator.Dependencies());
+ mBpfCoordinator = spy(bc);
}
@Test
@@ -621,6 +633,10 @@ public class IpServerTest {
* (actual: "android.net.TetherOffloadRuleParcel@8c827b0" or some such), but at least it does
* work.
*
+ * TODO: consider making the error message more readable by adding a method that catching the
+ * AssertionFailedError and throwing a new assertion with more details. See
+ * NetworkMonitorTest#verifyNetworkTested.
+ *
* See ConnectivityServiceTest#assertRoutesAdded for an alternative approach which solves the
* TooManyActualInvocations problem described above by forcing the caller of the custom assert
* method to specify all expected invocations in one call. This is useful when the stable
@@ -660,6 +676,27 @@ public class IpServerTest {
return argThat(new TetherOffloadRuleParcelMatcher(upstreamIfindex, dst, dstMac));
}
+ private static Ipv6ForwardingRule makeForwardingRule(
+ int upstreamIfindex, @NonNull InetAddress dst, @NonNull MacAddress dstMac) {
+ return new Ipv6ForwardingRule(upstreamIfindex, TEST_IFACE_PARAMS.index,
+ (Inet6Address) dst, TEST_IFACE_PARAMS.macAddr, dstMac);
+ }
+
+ private TetherStatsParcel buildEmptyTetherStatsParcel(int ifIndex) {
+ TetherStatsParcel parcel = new TetherStatsParcel();
+ parcel.ifIndex = ifIndex;
+ return parcel;
+ }
+
+ private void resetNetdAndBpfCoordinator() throws Exception {
+ reset(mNetd, mBpfCoordinator);
+ when(mNetd.tetherOffloadGetStats()).thenReturn(new TetherStatsParcel[0]);
+ when(mNetd.tetherOffloadGetAndClearStats(UPSTREAM_IFINDEX))
+ .thenReturn(buildEmptyTetherStatsParcel(UPSTREAM_IFINDEX));
+ when(mNetd.tetherOffloadGetAndClearStats(UPSTREAM_IFINDEX2))
+ .thenReturn(buildEmptyTetherStatsParcel(UPSTREAM_IFINDEX2));
+ }
+
@Test
public void addRemoveipv6ForwardingRules() throws Exception {
initTetheredStateMachine(TETHERING_WIFI, UPSTREAM_IFACE, false /* usingLegacyDhcp */,
@@ -677,75 +714,100 @@ public class IpServerTest {
final MacAddress macA = MacAddress.fromString("00:00:00:00:00:0a");
final MacAddress macB = MacAddress.fromString("11:22:33:00:00:0b");
- reset(mNetd);
+ resetNetdAndBpfCoordinator();
+ verifyNoMoreInteractions(mBpfCoordinator, mNetd);
+
+ // TODO: Perhaps verify the interaction of tetherOffloadSetInterfaceQuota and
+ // tetherOffloadGetAndClearStats in netd while the rules are changed.
// Events on other interfaces are ignored.
recvNewNeigh(notMyIfindex, neighA, NUD_REACHABLE, macA);
- verifyNoMoreInteractions(mNetd);
+ verifyNoMoreInteractions(mBpfCoordinator, mNetd);
// Events on this interface are received and sent to netd.
recvNewNeigh(myIfindex, neighA, NUD_REACHABLE, macA);
+ verify(mBpfCoordinator).tetherOffloadRuleAdd(
+ mIpServer, makeForwardingRule(UPSTREAM_IFINDEX, neighA, macA));
verify(mNetd).tetherOffloadRuleAdd(matches(UPSTREAM_IFINDEX, neighA, macA));
- reset(mNetd);
+ resetNetdAndBpfCoordinator();
recvNewNeigh(myIfindex, neighB, NUD_REACHABLE, macB);
+ verify(mBpfCoordinator).tetherOffloadRuleAdd(
+ mIpServer, makeForwardingRule(UPSTREAM_IFINDEX, neighB, macB));
verify(mNetd).tetherOffloadRuleAdd(matches(UPSTREAM_IFINDEX, neighB, macB));
- reset(mNetd);
+ resetNetdAndBpfCoordinator();
// Link-local and multicast neighbors are ignored.
recvNewNeigh(myIfindex, neighLL, NUD_REACHABLE, macA);
- verifyNoMoreInteractions(mNetd);
+ verifyNoMoreInteractions(mBpfCoordinator, mNetd);
recvNewNeigh(myIfindex, neighMC, NUD_REACHABLE, macA);
- verifyNoMoreInteractions(mNetd);
+ verifyNoMoreInteractions(mBpfCoordinator, mNetd);
// A neighbor that is no longer valid causes the rule to be removed.
// NUD_FAILED events do not have a MAC address.
recvNewNeigh(myIfindex, neighA, NUD_FAILED, null);
+ verify(mBpfCoordinator).tetherOffloadRuleRemove(
+ mIpServer, makeForwardingRule(UPSTREAM_IFINDEX, neighA, macNull));
verify(mNetd).tetherOffloadRuleRemove(matches(UPSTREAM_IFINDEX, neighA, macNull));
- reset(mNetd);
+ resetNetdAndBpfCoordinator();
// A neighbor that is deleted causes the rule to be removed.
recvDelNeigh(myIfindex, neighB, NUD_STALE, macB);
+ verify(mBpfCoordinator).tetherOffloadRuleRemove(
+ mIpServer, makeForwardingRule(UPSTREAM_IFINDEX, neighB, macNull));
verify(mNetd).tetherOffloadRuleRemove(matches(UPSTREAM_IFINDEX, neighB, macNull));
- reset(mNetd);
+ resetNetdAndBpfCoordinator();
- // Upstream changes result in deleting and re-adding the rules.
+ // Upstream changes result in updating the rules.
recvNewNeigh(myIfindex, neighA, NUD_REACHABLE, macA);
recvNewNeigh(myIfindex, neighB, NUD_REACHABLE, macB);
- reset(mNetd);
+ resetNetdAndBpfCoordinator();
InOrder inOrder = inOrder(mNetd);
LinkProperties lp = new LinkProperties();
lp.setInterfaceName(UPSTREAM_IFACE2);
dispatchTetherConnectionChanged(UPSTREAM_IFACE2, lp, -1);
- inOrder.verify(mNetd).tetherOffloadRuleAdd(matches(UPSTREAM_IFINDEX2, neighA, macA));
+ verify(mBpfCoordinator).tetherOffloadRuleUpdate(mIpServer, UPSTREAM_IFINDEX2);
inOrder.verify(mNetd).tetherOffloadRuleRemove(matches(UPSTREAM_IFINDEX, neighA, macA));
- inOrder.verify(mNetd).tetherOffloadRuleAdd(matches(UPSTREAM_IFINDEX2, neighB, macB));
+ inOrder.verify(mNetd).tetherOffloadRuleAdd(matches(UPSTREAM_IFINDEX2, neighA, macA));
inOrder.verify(mNetd).tetherOffloadRuleRemove(matches(UPSTREAM_IFINDEX, neighB, macB));
- reset(mNetd);
+ inOrder.verify(mNetd).tetherOffloadRuleAdd(matches(UPSTREAM_IFINDEX2, neighB, macB));
+ resetNetdAndBpfCoordinator();
// When the upstream is lost, rules are removed.
dispatchTetherConnectionChanged(null, null, 0);
+ // Clear function is called two times by:
+ // - processMessage CMD_TETHER_CONNECTION_CHANGED for the upstream is lost.
+ // - processMessage CMD_IPV6_TETHER_UPDATE for the IPv6 upstream is lost.
+ // See dispatchTetherConnectionChanged.
+ verify(mBpfCoordinator, times(2)).tetherOffloadRuleClear(mIpServer);
verify(mNetd).tetherOffloadRuleRemove(matches(UPSTREAM_IFINDEX2, neighA, macA));
verify(mNetd).tetherOffloadRuleRemove(matches(UPSTREAM_IFINDEX2, neighB, macB));
- reset(mNetd);
+ resetNetdAndBpfCoordinator();
// If the upstream is IPv4-only, no rules are added.
dispatchTetherConnectionChanged(UPSTREAM_IFACE);
- reset(mNetd);
+ resetNetdAndBpfCoordinator();
recvNewNeigh(myIfindex, neighA, NUD_REACHABLE, macA);
- verifyNoMoreInteractions(mNetd);
+ // Clear function is called by #updateIpv6ForwardingRules for the IPv6 upstream is lost.
+ verify(mBpfCoordinator).tetherOffloadRuleClear(mIpServer);
+ verifyNoMoreInteractions(mBpfCoordinator, mNetd);
// Rules can be added again once upstream IPv6 connectivity is available.
lp.setInterfaceName(UPSTREAM_IFACE);
dispatchTetherConnectionChanged(UPSTREAM_IFACE, lp, -1);
recvNewNeigh(myIfindex, neighB, NUD_REACHABLE, macB);
+ verify(mBpfCoordinator).tetherOffloadRuleAdd(
+ mIpServer, makeForwardingRule(UPSTREAM_IFINDEX, neighB, macB));
verify(mNetd).tetherOffloadRuleAdd(matches(UPSTREAM_IFINDEX, neighB, macB));
+ verify(mBpfCoordinator, never()).tetherOffloadRuleAdd(
+ mIpServer, makeForwardingRule(UPSTREAM_IFINDEX, neighA, macA));
verify(mNetd, never()).tetherOffloadRuleAdd(matches(UPSTREAM_IFINDEX, neighA, macA));
// If upstream IPv6 connectivity is lost, rules are removed.
- reset(mNetd);
+ resetNetdAndBpfCoordinator();
dispatchTetherConnectionChanged(UPSTREAM_IFACE, null, 0);
+ verify(mBpfCoordinator).tetherOffloadRuleClear(mIpServer);
verify(mNetd).tetherOffloadRuleRemove(matches(UPSTREAM_IFINDEX, neighB, macB));
// When the interface goes down, rules are removed.
@@ -753,15 +815,20 @@ public class IpServerTest {
dispatchTetherConnectionChanged(UPSTREAM_IFACE, lp, -1);
recvNewNeigh(myIfindex, neighA, NUD_REACHABLE, macA);
recvNewNeigh(myIfindex, neighB, NUD_REACHABLE, macB);
+ verify(mBpfCoordinator).tetherOffloadRuleAdd(
+ mIpServer, makeForwardingRule(UPSTREAM_IFINDEX, neighA, macA));
verify(mNetd).tetherOffloadRuleAdd(matches(UPSTREAM_IFINDEX, neighA, macA));
+ verify(mBpfCoordinator).tetherOffloadRuleAdd(
+ mIpServer, makeForwardingRule(UPSTREAM_IFINDEX, neighB, macB));
verify(mNetd).tetherOffloadRuleAdd(matches(UPSTREAM_IFINDEX, neighB, macB));
- reset(mNetd);
+ resetNetdAndBpfCoordinator();
mIpServer.stop();
mLooper.dispatchAll();
+ verify(mBpfCoordinator).tetherOffloadRuleClear(mIpServer);
verify(mNetd).tetherOffloadRuleRemove(matches(UPSTREAM_IFINDEX, neighA, macA));
verify(mNetd).tetherOffloadRuleRemove(matches(UPSTREAM_IFINDEX, neighB, macB));
- reset(mNetd);
+ resetNetdAndBpfCoordinator();
}
@Test
@@ -771,35 +838,46 @@ public class IpServerTest {
final MacAddress macA = MacAddress.fromString("00:00:00:00:00:0a");
final MacAddress macNull = MacAddress.fromString("00:00:00:00:00:00");
- reset(mNetd);
-
// Expect that rules can be only added/removed when the BPF offload config is enabled.
- // Note that the usingBpfOffload false case is not a realistic test case. Because IP
+ // Note that the BPF offload disabled case is not a realistic test case. Because IP
// neighbor monitor doesn't start if BPF offload is disabled, there should have no
// neighbor event listening. This is used for testing the protection check just in case.
- // TODO: Perhaps remove this test once we don't need this check anymore.
- for (boolean usingBpfOffload : new boolean[]{true, false}) {
- initTetheredStateMachine(TETHERING_WIFI, UPSTREAM_IFACE, false /* usingLegacyDhcp */,
- usingBpfOffload);
-
- // A neighbor is added.
- recvNewNeigh(myIfindex, neigh, NUD_REACHABLE, macA);
- if (usingBpfOffload) {
- verify(mNetd).tetherOffloadRuleAdd(matches(UPSTREAM_IFINDEX, neigh, macA));
- } else {
- verify(mNetd, never()).tetherOffloadRuleAdd(any());
- }
- reset(mNetd);
-
- // A neighbor is deleted.
- recvDelNeigh(myIfindex, neigh, NUD_STALE, macA);
- if (usingBpfOffload) {
- verify(mNetd).tetherOffloadRuleRemove(matches(UPSTREAM_IFINDEX, neigh, macNull));
- } else {
- verify(mNetd, never()).tetherOffloadRuleRemove(any());
- }
- reset(mNetd);
- }
+ // TODO: Perhaps remove the BPF offload disabled case test once this check isn't needed
+ // anymore.
+
+ // [1] Enable BPF offload.
+ // A neighbor that is added or deleted causes the rule to be added or removed.
+ initTetheredStateMachine(TETHERING_WIFI, UPSTREAM_IFACE, false /* usingLegacyDhcp */,
+ true /* usingBpfOffload */);
+ resetNetdAndBpfCoordinator();
+
+ recvNewNeigh(myIfindex, neigh, NUD_REACHABLE, macA);
+ verify(mBpfCoordinator).tetherOffloadRuleAdd(
+ mIpServer, makeForwardingRule(UPSTREAM_IFINDEX, neigh, macA));
+ verify(mNetd).tetherOffloadRuleAdd(matches(UPSTREAM_IFINDEX, neigh, macA));
+ resetNetdAndBpfCoordinator();
+
+ recvDelNeigh(myIfindex, neigh, NUD_STALE, macA);
+ verify(mBpfCoordinator).tetherOffloadRuleRemove(
+ mIpServer, makeForwardingRule(UPSTREAM_IFINDEX, neigh, macNull));
+ verify(mNetd).tetherOffloadRuleRemove(matches(UPSTREAM_IFINDEX, neigh, macNull));
+ resetNetdAndBpfCoordinator();
+
+ // [2] Disable BPF offload.
+ // A neighbor that is added or deleted doesn’t cause the rule to be added or removed.
+ initTetheredStateMachine(TETHERING_WIFI, UPSTREAM_IFACE, false /* usingLegacyDhcp */,
+ false /* usingBpfOffload */);
+ resetNetdAndBpfCoordinator();
+
+ recvNewNeigh(myIfindex, neigh, NUD_REACHABLE, macA);
+ verify(mBpfCoordinator, never()).tetherOffloadRuleAdd(any(), any());
+ verify(mNetd, never()).tetherOffloadRuleAdd(any());
+ resetNetdAndBpfCoordinator();
+
+ recvDelNeigh(myIfindex, neigh, NUD_STALE, macA);
+ verify(mBpfCoordinator, never()).tetherOffloadRuleRemove(any(), any());
+ verify(mNetd, never()).tetherOffloadRuleRemove(any());
+ resetNetdAndBpfCoordinator();
}
@Test
diff --git a/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java b/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java
index 3e19ddfc0bf8..e2d7aab4e33f 100644
--- a/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java
+++ b/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java
@@ -141,7 +141,7 @@ public class BpfCoordinatorTest {
setupFunctioningNetdInterface();
final BpfCoordinator coordinator = makeBpfCoordinator();
- coordinator.start();
+ coordinator.startPolling();
final String wlanIface = "wlan0";
final Integer wlanIfIndex = 100;
@@ -197,7 +197,7 @@ public class BpfCoordinatorTest {
// [3] Stop coordinator.
// Shutdown the coordinator and clear the invocation history, especially the
// tetherOffloadGetStats() calls.
- coordinator.stop();
+ coordinator.stopPolling();
clearInvocations(mNetd);
// Verify the polling update thread stopped.
@@ -211,7 +211,7 @@ public class BpfCoordinatorTest {
setupFunctioningNetdInterface();
final BpfCoordinator coordinator = makeBpfCoordinator();
- coordinator.start();
+ coordinator.startPolling();
final String mobileIface = "rmnet_data0";
final Integer mobileIfIndex = 100;
diff --git a/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/PrivateAddressCoordinatorTest.java b/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/PrivateAddressCoordinatorTest.java
index 93efd49a6d69..2c0df6fc6327 100644
--- a/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/PrivateAddressCoordinatorTest.java
+++ b/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/PrivateAddressCoordinatorTest.java
@@ -127,10 +127,15 @@ public final class PrivateAddressCoordinatorTest {
mPrivateAddressCoordinator.releaseDownstream(mHotspotIpServer);
}
+ private int getBluetoothSubAddress() {
+ final byte[] rawAddress = mBluetoothPrefix.getRawAddress();
+ int bluetoothSubNet = rawAddress[2] & 0xff;
+ return (bluetoothSubNet << 8) + 0x5;
+ }
+
@Test
public void testReserveBluetoothPrefix() throws Exception {
- final int fakeSubAddr = 0x2c05;
- when(mPrivateAddressCoordinator.getRandomSubAddr()).thenReturn(fakeSubAddr);
+ when(mPrivateAddressCoordinator.getRandomSubAddr()).thenReturn(getBluetoothSubAddress());
LinkAddress address = mPrivateAddressCoordinator.requestDownstreamAddress(
mHotspotIpServer);
final IpPrefix hotspotPrefix = PrefixUtils.asIpPrefix(address);
@@ -146,7 +151,7 @@ public final class PrivateAddressCoordinatorTest {
LinkAddress address = mPrivateAddressCoordinator.requestDownstreamAddress(
mHotspotIpServer);
final IpPrefix hotspotPrefix = PrefixUtils.asIpPrefix(address);
- assertEquals("Wrong wifi perfix: ", predefinedPrefix, hotspotPrefix);
+ assertEquals("Wrong wifi prefix: ", predefinedPrefix, hotspotPrefix);
when(mHotspotIpServer.getAddress()).thenReturn(address);
address = mPrivateAddressCoordinator.requestDownstreamAddress(
@@ -159,7 +164,7 @@ public final class PrivateAddressCoordinatorTest {
address = mPrivateAddressCoordinator.requestDownstreamAddress(
mUsbIpServer);
final IpPrefix allowUseFreePrefix = PrefixUtils.asIpPrefix(address);
- assertEquals("Fail to reselect available perfix: ", predefinedPrefix, allowUseFreePrefix);
+ assertEquals("Fail to reselect available prefix: ", predefinedPrefix, allowUseFreePrefix);
}
private LinkProperties buildUpstreamLinkProperties(boolean withIPv4, boolean withIPv6,
@@ -202,7 +207,7 @@ public final class PrivateAddressCoordinatorTest {
final LinkAddress hotspotAddr = mPrivateAddressCoordinator.requestDownstreamAddress(
mHotspotIpServer);
final IpPrefix hotspotPrefix = PrefixUtils.asIpPrefix(hotspotAddr);
- assertEquals("Wrong wifi perfix: ", predefinedPrefix, hotspotPrefix);
+ assertEquals("Wrong wifi prefix: ", predefinedPrefix, hotspotPrefix);
when(mHotspotIpServer.getAddress()).thenReturn(hotspotAddr);
// 2. Update v6 only mobile network, hotspot prefix should not be removed.
List<String> testConflicts;
diff --git a/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringTest.java b/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringTest.java
index 329d8a515c70..02dbd4cc1c5f 100644
--- a/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringTest.java
+++ b/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringTest.java
@@ -1884,7 +1884,7 @@ public class TetheringTest {
0,
upstreamNetwork);
mLooper.dispatchAll();
- // verify trun off usb tethering
+ // verify turn off usb tethering
verify(mUsbManager).setCurrentFunctions(UsbManager.FUNCTION_NONE);
mTethering.interfaceRemoved(TEST_USB_IFNAME);
mLooper.dispatchAll();
@@ -1922,9 +1922,9 @@ public class TetheringTest {
0,
upstreamNetwork);
mLooper.dispatchAll();
- // verify trun off usb tethering
+ // verify turn off usb tethering
verify(mUsbManager).setCurrentFunctions(UsbManager.FUNCTION_NONE);
- // verify trun off ethernet tethering
+ // verify turn off ethernet tethering
verify(mockRequest).release();
mTethering.interfaceRemoved(TEST_USB_IFNAME);
ethCallback.onUnavailable();
diff --git a/services/core/java/com/android/server/adb/AdbService.java b/services/core/java/com/android/server/adb/AdbService.java
index 7aaf9be1fdd2..b75a57d51f17 100644
--- a/services/core/java/com/android/server/adb/AdbService.java
+++ b/services/core/java/com/android/server/adb/AdbService.java
@@ -241,12 +241,7 @@ public class AdbService extends IAdbManager.Stub {
private AdbService(Context context) {
mContext = context;
mContentResolver = context.getContentResolver();
-
- boolean secureAdbEnabled = AdbProperties.secure().orElse(false);
- boolean dataEncrypted = "1".equals(SystemProperties.get("vold.decrypt"));
- if (secureAdbEnabled && !dataEncrypted) {
- mDebuggingManager = new AdbDebuggingManager(context);
- }
+ mDebuggingManager = new AdbDebuggingManager(context);
initAdbState();
LocalServices.addService(AdbManagerInternal.class, new AdbManagerInternalImpl());
diff --git a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
index da175792268f..74b7a38e37b8 100644
--- a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
+++ b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
@@ -294,7 +294,11 @@ JavaObject::JavaObject(JNIEnv* env, jclass clazz, jmethodID defaultCtor) : env_(
JavaObject::JavaObject(JNIEnv* env, jclass clazz, jmethodID stringCtor, const char * sz_arg_1)
: env_(env), clazz_(clazz) {
- object_ = env_->NewObject(clazz_, stringCtor, env->NewStringUTF(sz_arg_1));
+ jstring szArg = env->NewStringUTF(sz_arg_1);
+ object_ = env_->NewObject(clazz_, stringCtor, szArg);
+ if (szArg) {
+ env_->DeleteLocalRef(szArg);
+ }
}
@@ -627,6 +631,9 @@ Return<void> GnssCallback::gnssNameCb(const android::hardware::hidl_string& name
JNIEnv* env = getJniEnv();
jstring jstringName = env->NewStringUTF(name.c_str());
env->CallVoidMethod(mCallbacksObj, method_setGnssHardwareModelName, jstringName);
+ if (jstringName) {
+ env->DeleteLocalRef(jstringName);
+ }
checkAndClearExceptionFromCallback(env, __FUNCTION__);
return Void();
@@ -719,6 +726,12 @@ Return<void> GnssCallback::gnssSvStatusCbImpl(const T& svStatus) {
static_cast<jint>(listSize), svidWithFlagArray, cn0Array, elevArray, azimArray,
carrierFreqArray);
+ env->DeleteLocalRef(svidWithFlagArray);
+ env->DeleteLocalRef(cn0Array);
+ env->DeleteLocalRef(elevArray);
+ env->DeleteLocalRef(azimArray);
+ env->DeleteLocalRef(carrierFreqArray);
+
checkAndClearExceptionFromCallback(env, __FUNCTION__);
return Void();
}
@@ -1107,13 +1120,18 @@ void GnssMeasurementCallback::translateSingleGnssMeasurement
JNIEnv* env = getJniEnv();
translateSingleGnssMeasurement(&(measurement_V2_0->v1_1), object);
- SET(CodeType, env->NewStringUTF(measurement_V2_0->codeType.c_str()));
+ jstring codeType = env->NewStringUTF(measurement_V2_0->codeType.c_str());
+ SET(CodeType, codeType);
// Overwrite with v2_0.state since v2_0->v1_1->v1_0.state is deprecated.
SET(State, static_cast<int32_t>(measurement_V2_0->state));
// Overwrite with v2_0.constellation since v2_0->v1_1->v1_0.constellation is deprecated.
SET(ConstellationType, static_cast<int32_t>(measurement_V2_0->constellation));
+
+ if (codeType) {
+ env->DeleteLocalRef(codeType);
+ }
}
template<class T>
@@ -1187,7 +1205,9 @@ jobjectArray GnssMeasurementCallback::translateAllGnssMeasurements(JNIEnv* env,
for (uint16_t i = 0; i < count; ++i) {
JavaObject object(env, class_gnssMeasurement, method_gnssMeasurementCtor);
translateSingleGnssMeasurement(&(measurements[i]), object);
- env->SetObjectArrayElement(gnssMeasurementArray, i, object.get());
+ jobject gnssMeasurement = object.get();
+ env->SetObjectArrayElement(gnssMeasurementArray, i, gnssMeasurement);
+ env->DeleteLocalRef(gnssMeasurement);
}
return gnssMeasurementArray;
diff --git a/test-base/hiddenapi/src/android/test/AndroidTestCase.java b/test-base/hiddenapi/src/android/test/AndroidTestCase.java
deleted file mode 100644
index fcb8d432a631..000000000000
--- a/test-base/hiddenapi/src/android/test/AndroidTestCase.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.test;
-
-import android.compat.annotation.UnsupportedAppUsage;
-import android.content.Context;
-
-import junit.framework.TestCase;
-
-/**
- * @deprecated Stub only
- */
-@SuppressWarnings({ "unchecked", "deprecation", "all" })
-@Deprecated
-public class AndroidTestCase extends TestCase {
-
- /**
- * Stub only
- */
- @UnsupportedAppUsage
- public void setTestContext(Context context) {
- throw new RuntimeException("Stub!");
- }
-
- /**
- * Stub only
- */
- @UnsupportedAppUsage
- public Context getTestContext() {
- throw new RuntimeException("Stub!");
- }
-}