Loading res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,9 @@ <!-- View IDs to store item highlight information --> <item type="id" name="view_unhighlight_background" /> <!-- view ID used to restore work tab state --> <item type="id" name="work_tab_state_id" /> <!-- Menu id for feature flags --> <item type="id" name="menu_apply_flags" /> Loading src/com/android/launcher3/allapps/AllAppsContainerView.java +23 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.graphics.Color; import android.graphics.Paint; import android.graphics.Point; import android.graphics.Rect; import android.os.Bundle; import android.os.Parcelable; import android.os.Process; import android.text.Selection; Loading Loading @@ -82,6 +83,8 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo Insettable, OnDeviceProfileChangeListener, OnActivePageChangedListener, ScrimView.ScrimDrawingController { private static final String BUNDLE_KEY_CURRENT_PAGE = "launcher.allapps.current_page"; public static final float PULL_MULTIPLIER = .02f; public static final float FLING_VELOCITY_MULTIPLIER = 1200f; Loading Loading @@ -181,6 +184,23 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo } catch (Exception e) { Log.e("AllAppsContainerView", "restoreInstanceState viewId = 0", e); } Bundle state = (Bundle) sparseArray.get(R.id.work_tab_state_id, null); if (state != null) { int currentPage = state.getInt(BUNDLE_KEY_CURRENT_PAGE, 0); if (currentPage != 0) { rebindAdapters(true); mViewPager.setCurrentPage(currentPage); } } } @Override protected void dispatchSaveInstanceState(SparseArray<Parcelable> container) { super.dispatchSaveInstanceState(container); Bundle state = new Bundle(); state.putInt(BUNDLE_KEY_CURRENT_PAGE, getCurrentPage()); container.put(R.id.work_tab_state_id, state); } /** Loading Loading @@ -231,7 +251,9 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo private void resetWorkProfile() { boolean isEnabled = !mAllAppsStore.hasModelFlag(FLAG_QUIET_MODE_ENABLED); if (mWorkModeSwitch != null) { mWorkModeSwitch.updateCurrentState(isEnabled); } mWorkAdapterProvider.updateCurrentState(isEnabled); mAH[AdapterHolder.WORK].applyPadding(); } Loading src/com/android/launcher3/allapps/WorkModeSwitch.java +1 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ public class WorkModeSwitch extends Button implements Insettable, View.OnClickLi @Override protected void onFinishInflate() { super.onFinishInflate(); setSelected(true); setOnClickListener(this); if (Utilities.ATLEAST_R) { mKeyboardInsetAnimationCallback = new KeyboardInsetAnimationCallback(this); Loading src/com/android/launcher3/views/SpringRelativeLayout.java +0 −2 Original line number Diff line number Diff line Loading @@ -108,8 +108,6 @@ public class SpringRelativeLayout extends RelativeLayout { switch (direction) { case DIRECTION_TOP: return new EdgeEffectProxy(getContext(), mEdgeGlowTop); case DIRECTION_BOTTOM: return new EdgeEffectProxy(getContext(), mEdgeGlowBottom); } return super.createEdgeEffect(view, direction); } Loading src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java +1 −1 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ public class PersonalWorkSlidingTabStrip extends LinearLayout implements PageInd @Override public void setActiveMarker(int activePage) { updateTabTextColor(activePage); updateIndicatorPosition(activePage); updateIndicatorPosition(mIsRtl ? 1 - activePage : activePage); if (mOnActivePageChangedListener != null && mLastActivePage != activePage) { mOnActivePageChangedListener.onActivePageChanged(activePage); } Loading Loading
res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,9 @@ <!-- View IDs to store item highlight information --> <item type="id" name="view_unhighlight_background" /> <!-- view ID used to restore work tab state --> <item type="id" name="work_tab_state_id" /> <!-- Menu id for feature flags --> <item type="id" name="menu_apply_flags" /> Loading
src/com/android/launcher3/allapps/AllAppsContainerView.java +23 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.graphics.Color; import android.graphics.Paint; import android.graphics.Point; import android.graphics.Rect; import android.os.Bundle; import android.os.Parcelable; import android.os.Process; import android.text.Selection; Loading Loading @@ -82,6 +83,8 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo Insettable, OnDeviceProfileChangeListener, OnActivePageChangedListener, ScrimView.ScrimDrawingController { private static final String BUNDLE_KEY_CURRENT_PAGE = "launcher.allapps.current_page"; public static final float PULL_MULTIPLIER = .02f; public static final float FLING_VELOCITY_MULTIPLIER = 1200f; Loading Loading @@ -181,6 +184,23 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo } catch (Exception e) { Log.e("AllAppsContainerView", "restoreInstanceState viewId = 0", e); } Bundle state = (Bundle) sparseArray.get(R.id.work_tab_state_id, null); if (state != null) { int currentPage = state.getInt(BUNDLE_KEY_CURRENT_PAGE, 0); if (currentPage != 0) { rebindAdapters(true); mViewPager.setCurrentPage(currentPage); } } } @Override protected void dispatchSaveInstanceState(SparseArray<Parcelable> container) { super.dispatchSaveInstanceState(container); Bundle state = new Bundle(); state.putInt(BUNDLE_KEY_CURRENT_PAGE, getCurrentPage()); container.put(R.id.work_tab_state_id, state); } /** Loading Loading @@ -231,7 +251,9 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo private void resetWorkProfile() { boolean isEnabled = !mAllAppsStore.hasModelFlag(FLAG_QUIET_MODE_ENABLED); if (mWorkModeSwitch != null) { mWorkModeSwitch.updateCurrentState(isEnabled); } mWorkAdapterProvider.updateCurrentState(isEnabled); mAH[AdapterHolder.WORK].applyPadding(); } Loading
src/com/android/launcher3/allapps/WorkModeSwitch.java +1 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ public class WorkModeSwitch extends Button implements Insettable, View.OnClickLi @Override protected void onFinishInflate() { super.onFinishInflate(); setSelected(true); setOnClickListener(this); if (Utilities.ATLEAST_R) { mKeyboardInsetAnimationCallback = new KeyboardInsetAnimationCallback(this); Loading
src/com/android/launcher3/views/SpringRelativeLayout.java +0 −2 Original line number Diff line number Diff line Loading @@ -108,8 +108,6 @@ public class SpringRelativeLayout extends RelativeLayout { switch (direction) { case DIRECTION_TOP: return new EdgeEffectProxy(getContext(), mEdgeGlowTop); case DIRECTION_BOTTOM: return new EdgeEffectProxy(getContext(), mEdgeGlowBottom); } return super.createEdgeEffect(view, direction); } Loading
src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java +1 −1 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ public class PersonalWorkSlidingTabStrip extends LinearLayout implements PageInd @Override public void setActiveMarker(int activePage) { updateTabTextColor(activePage); updateIndicatorPosition(activePage); updateIndicatorPosition(mIsRtl ? 1 - activePage : activePage); if (mOnActivePageChangedListener != null && mLastActivePage != activePage) { mOnActivePageChangedListener.onActivePageChanged(activePage); } Loading