Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1025e82 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add max target sdk for ActivityGroup related APIs"

parents 4ef72702 5c0943db
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -808,7 +808,9 @@ public class Activity extends ContextThemeWrapper
    /*package*/ ActivityInfo mActivityInfo;
    @UnsupportedAppUsage
    /*package*/ ActivityThread mMainThread;
    @UnsupportedAppUsage
    @UnsupportedAppUsage(trackingBug = 137825207, maxTargetSdk = Build.VERSION_CODES.Q,
            publicAlternatives = "Use {@code androidx.fragment.app.Fragment} and "
                    + "{@code androidx.fragment.app.FragmentManager} instead")
    Activity mParent;
    @UnsupportedAppUsage
    boolean mCalled;
+35 −7
Original line number Diff line number Diff line
@@ -59,13 +59,21 @@ public class TabHost extends FrameLayout implements ViewTreeObserver.OnTouchMode
    private static final int TABWIDGET_LOCATION_BOTTOM = 3;
    private TabWidget mTabWidget;
    private FrameLayout mTabContent;
    @UnsupportedAppUsage
    @UnsupportedAppUsage(trackingBug = 137825207, maxTargetSdk = Build.VERSION_CODES.Q,
            publicAlternatives = "Use {@code androidx.viewpager.widget.ViewPager} and "
                    + "{@code com.google.android.material.tabs.TabLayout} instead.\n"
                    + "See <a href=\"{@docRoot}guide/navigation/navigation-swipe-view"
                    + "\">TabLayout and ViewPager</a>")
    private List<TabSpec> mTabSpecs = new ArrayList<TabSpec>(2);
    /**
     * This field should be made private, so it is hidden from the SDK.
     * {@hide}
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(trackingBug = 137825207, maxTargetSdk = Build.VERSION_CODES.Q,
            publicAlternatives = "Use {@code androidx.viewpager.widget.ViewPager} and "
                    + "{@code com.google.android.material.tabs.TabLayout} instead.\n"
                    + "See <a href=\"{@docRoot}guide/navigation/navigation-swipe-view"
                    + "\">TabLayout and ViewPager</a>")
    protected int mCurrentTab = -1;
    private View mCurrentView = null;
    /**
@@ -73,7 +81,11 @@ public class TabHost extends FrameLayout implements ViewTreeObserver.OnTouchMode
     * {@hide}
     */
    protected LocalActivityManager mLocalActivityManager = null;
    @UnsupportedAppUsage
    @UnsupportedAppUsage(trackingBug = 137825207, maxTargetSdk = Build.VERSION_CODES.Q,
            publicAlternatives = "Use {@code androidx.viewpager.widget.ViewPager} and "
                    + "{@code com.google.android.material.tabs.TabLayout} instead.\n"
                    + "See <a href=\"{@docRoot}guide/navigation/navigation-swipe-view"
                    + "\">TabLayout and ViewPager</a>")
    private OnTabChangeListener mOnTabChangeListener;
    private OnKeyListener mTabKeyListener;

@@ -514,9 +526,17 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1");

        private final @NonNull String mTag;

        @UnsupportedAppUsage
        @UnsupportedAppUsage(trackingBug = 137825207, maxTargetSdk = Build.VERSION_CODES.Q,
                publicAlternatives = "Use {@code androidx.viewpager.widget.ViewPager} and "
                        + "{@code com.google.android.material.tabs.TabLayout} instead.\n"
                        + "See <a href=\"{@docRoot}guide/navigation/navigation-swipe-view"
                        + "\">TabLayout and ViewPager</a>")
        private IndicatorStrategy mIndicatorStrategy;
        @UnsupportedAppUsage
        @UnsupportedAppUsage(trackingBug = 137825207, maxTargetSdk = Build.VERSION_CODES.Q,
                publicAlternatives = "Use {@code androidx.viewpager.widget.ViewPager} and "
                        + "{@code com.google.android.material.tabs.TabLayout} instead.\n"
                        + "See <a href=\"{@docRoot}guide/navigation/navigation-swipe-view"
                        + "\">TabLayout and ViewPager</a>")
        private ContentStrategy mContentStrategy;

        /**
@@ -779,7 +799,11 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1");
            mIntent = intent;
        }

        @UnsupportedAppUsage
        @UnsupportedAppUsage(trackingBug = 137825207, maxTargetSdk = Build.VERSION_CODES.Q,
                publicAlternatives = "Use {@code androidx.viewpager.widget.ViewPager} and "
                        + "{@code com.google.android.material.tabs.TabLayout} instead.\n"
                        + "See <a href=\"{@docRoot}guide/navigation/navigation-swipe-view"
                        + "\">TabLayout and ViewPager</a>")
        public View getContentView() {
            if (mLocalActivityManager == null) {
                throw new IllegalStateException("Did you forget to call 'public void setup(LocalActivityManager activityGroup)'?");
@@ -809,7 +833,11 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1");
            return mLaunchedView;
        }

        @UnsupportedAppUsage
        @UnsupportedAppUsage(trackingBug = 137825207, maxTargetSdk = Build.VERSION_CODES.Q,
                publicAlternatives = "Use {@code androidx.viewpager.widget.ViewPager} and "
                        + "{@code com.google.android.material.tabs.TabLayout} instead.\n"
                        + "See <a href=\"{@docRoot}guide/navigation/navigation-swipe-view"
                        + "\">TabLayout and ViewPager</a>")
        public void tabClosed() {
            if (mLaunchedView != null) {
                mLaunchedView.setVisibility(View.GONE);
+15 −3
Original line number Diff line number Diff line
@@ -65,7 +65,11 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener {
    private OnTabSelectionChanged mSelectionChangedListener;

    // This value will be set to 0 as soon as the first tab is added to TabHost.
    @UnsupportedAppUsage
    @UnsupportedAppUsage(trackingBug = 137825207, maxTargetSdk = Build.VERSION_CODES.Q,
            publicAlternatives = "Use {@code androidx.viewpager.widget.ViewPager} and "
                    + "{@code com.google.android.material.tabs.TabLayout} instead.\n"
                    + "See <a href=\"{@docRoot}guide/navigation/navigation-swipe-view"
                    + "\">TabLayout and ViewPager</a>")
    private int mSelectedTab = -1;

    @Nullable
@@ -74,7 +78,11 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener {
    @Nullable
    private Drawable mRightStrip;

    @UnsupportedAppUsage
    @UnsupportedAppUsage(trackingBug = 137825207, maxTargetSdk = Build.VERSION_CODES.Q,
            publicAlternatives = "Use {@code androidx.viewpager.widget.ViewPager} and "
                    + "{@code com.google.android.material.tabs.TabLayout} instead.\n"
                    + "See <a href=\"{@docRoot}guide/navigation/navigation-swipe-view"
                    + "\">TabLayout and ViewPager</a>")
    private boolean mDrawBottomStrips = true;
    private boolean mStripMoved;

@@ -551,7 +559,11 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener {
     * Provides a way for {@link TabHost} to be notified that the user clicked
     * on a tab indicator.
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(trackingBug = 137825207, maxTargetSdk = Build.VERSION_CODES.Q,
            publicAlternatives = "Use {@code androidx.viewpager.widget.ViewPager} and "
                    + "{@code com.google.android.material.tabs.TabLayout} instead.\n"
                    + "See <a href=\"{@docRoot}guide/navigation/navigation-swipe-view"
                    + "\">TabLayout and ViewPager</a>")
    void setTabSelectionListener(OnTabSelectionChanged listener) {
        mSelectionChangedListener = listener;
    }