Loading quickstep/src/com/android/launcher3/appprediction/AppsDividerView.java +0 −8 Original line number Original line Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static com.android.launcher3.util.OnboardingPrefs.ALL_APPS_VISITED_COUNT; import android.annotation.TargetApi; import android.annotation.TargetApi; import android.content.Context; import android.content.Context; import android.graphics.Canvas; import android.graphics.Canvas; import android.graphics.Rect; import android.graphics.Typeface; import android.graphics.Typeface; import android.os.Build; import android.os.Build; import android.text.Layout; import android.text.Layout; Loading @@ -33,7 +32,6 @@ import android.view.View; import androidx.annotation.ColorInt; import androidx.annotation.ColorInt; import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat; import com.android.launcher3.DeviceProfile; import com.android.launcher3.R; import com.android.launcher3.R; import com.android.launcher3.allapps.FloatingHeaderRow; import com.android.launcher3.allapps.FloatingHeaderRow; import com.android.launcher3.allapps.FloatingHeaderView; import com.android.launcher3.allapps.FloatingHeaderView; Loading Loading @@ -238,12 +236,6 @@ public class AppsDividerView extends View implements FloatingHeaderRow { getPaddingBottom() + getPaddingTop()); getPaddingBottom() + getPaddingTop()); } } @Override public void setInsets(Rect insets, DeviceProfile grid) { int leftRightPadding = grid.allAppsLeftRightPadding; setPadding(leftRightPadding, getPaddingTop(), leftRightPadding, getPaddingBottom()); } @Override @Override public void setVerticalScroll(int scroll, boolean isScrolledOut) { public void setVerticalScroll(int scroll, boolean isScrolledOut) { setTranslationY(scroll); setTranslationY(scroll); Loading quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java +0 −7 Original line number Original line Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.launcher3.appprediction; import android.annotation.TargetApi; import android.annotation.TargetApi; import android.content.Context; import android.content.Context; import android.graphics.Canvas; import android.graphics.Canvas; import android.graphics.Rect; import android.os.Build; import android.os.Build; import android.util.AttributeSet; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.LayoutInflater; Loading Loading @@ -251,12 +250,6 @@ public class PredictionRowView<T extends Context & ActivityContext & DeviceProfi } } } } @Override public void setInsets(Rect insets, DeviceProfile grid) { int leftRightPadding = grid.allAppsLeftRightPadding; setPadding(leftRightPadding, getPaddingTop(), leftRightPadding, getPaddingBottom()); } @Override @Override public Class<PredictionRowView> getTypeClass() { public Class<PredictionRowView> getTypeClass() { return PredictionRowView.class; return PredictionRowView.class; Loading src/com/android/launcher3/allapps/FloatingHeaderRow.java +0 −5 Original line number Original line Diff line number Diff line Loading @@ -15,11 +15,8 @@ */ */ package com.android.launcher3.allapps; package com.android.launcher3.allapps; import android.graphics.Rect; import android.view.View; import android.view.View; import com.android.launcher3.DeviceProfile; /** /** * A abstract representation of a row in all-apps view * A abstract representation of a row in all-apps view */ */ Loading @@ -29,8 +26,6 @@ public interface FloatingHeaderRow { void setup(FloatingHeaderView parent, FloatingHeaderRow[] allRows, boolean tabsHidden); void setup(FloatingHeaderView parent, FloatingHeaderRow[] allRows, boolean tabsHidden); void setInsets(Rect insets, DeviceProfile grid); int getExpectedHeight(); int getExpectedHeight(); /** /** Loading src/com/android/launcher3/allapps/FloatingHeaderView.java +3 −30 Original line number Original line Diff line number Diff line Loading @@ -30,7 +30,6 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.Nullable; import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView; import com.android.launcher3.DeviceProfile; import com.android.launcher3.Insettable; import com.android.launcher3.Insettable; import com.android.launcher3.R; import com.android.launcher3.R; import com.android.launcher3.allapps.BaseAllAppsContainerView.AdapterHolder; import com.android.launcher3.allapps.BaseAllAppsContainerView.AdapterHolder; Loading Loading @@ -158,22 +157,6 @@ public class FloatingHeaderView extends LinearLayout implements PluginManagerWrapper.INSTANCE.get(getContext()).removePluginListener(this); PluginManagerWrapper.INSTANCE.get(getContext()).removePluginListener(this); } } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { mTabLayout.getLayoutParams().width = getTabWidth(); super.onMeasure(widthMeasureSpec, heightMeasureSpec); } /** * Returns distance between left and right app icons */ public int getTabWidth() { DeviceProfile grid = ActivityContext.lookupContext(getContext()).getDeviceProfile(); int totalWidth = getMeasuredWidth() - getPaddingLeft() - getPaddingRight(); int iconPadding = totalWidth / grid.numShownAllAppsColumns - grid.allAppsIconSizePx; return totalWidth - iconPadding - grid.allAppsIconDrawablePaddingPx; } private void recreateAllRowsArray() { private void recreateAllRowsArray() { int pluginCount = mPluginRows.size(); int pluginCount = mPluginRows.size(); if (pluginCount == 0) { if (pluginCount == 0) { Loading Loading @@ -423,15 +406,6 @@ public class FloatingHeaderView extends LinearLayout implements p.y = getTop() - mCurrentRV.getTop() - ((ViewGroup) mCurrentRV.getParent()).getTop(); p.y = getTop() - mCurrentRV.getTop() - ((ViewGroup) mCurrentRV.getParent()).getTop(); } } public boolean hasVisibleContent() { for (FloatingHeaderRow row : mAllRows) { if (row.hasVisibleContent()) { return true; } } return false; } public boolean isHeaderProtectionSupported() { public boolean isHeaderProtectionSupported() { return mHeaderProtectionSupported; return mHeaderProtectionSupported; } } Loading @@ -443,10 +417,9 @@ public class FloatingHeaderView extends LinearLayout implements @Override @Override public void setInsets(Rect insets) { public void setInsets(Rect insets) { DeviceProfile grid = ActivityContext.lookupContext(getContext()).getDeviceProfile(); int leftRightPadding = ActivityContext.lookupContext(getContext()) for (FloatingHeaderRow row : mAllRows) { .getDeviceProfile().allAppsLeftRightPadding; row.setInsets(insets, grid); setPadding(leftRightPadding, getPaddingTop(), leftRightPadding, getPaddingBottom()); } } } public <T extends FloatingHeaderRow> T findFixedRowByType(Class<T> type) { public <T extends FloatingHeaderRow> T findFixedRowByType(Class<T> type) { Loading src/com/android/launcher3/allapps/PluginHeaderRow.java +0 −5 Original line number Original line Diff line number Diff line Loading @@ -18,10 +18,8 @@ package com.android.launcher3.allapps; import static android.view.View.INVISIBLE; import static android.view.View.INVISIBLE; import static android.view.View.VISIBLE; import static android.view.View.VISIBLE; import android.graphics.Rect; import android.view.View; import android.view.View; import com.android.launcher3.DeviceProfile; import com.android.systemui.plugins.AllAppsRow; import com.android.systemui.plugins.AllAppsRow; /** /** Loading @@ -42,9 +40,6 @@ public class PluginHeaderRow implements FloatingHeaderRow { public void setup(FloatingHeaderView parent, FloatingHeaderRow[] allRows, public void setup(FloatingHeaderView parent, FloatingHeaderRow[] allRows, boolean tabsHidden) { } boolean tabsHidden) { } @Override public void setInsets(Rect insets, DeviceProfile grid) { } @Override @Override public int getExpectedHeight() { public int getExpectedHeight() { return mPlugin.getExpectedHeight(); return mPlugin.getExpectedHeight(); Loading Loading
quickstep/src/com/android/launcher3/appprediction/AppsDividerView.java +0 −8 Original line number Original line Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static com.android.launcher3.util.OnboardingPrefs.ALL_APPS_VISITED_COUNT; import android.annotation.TargetApi; import android.annotation.TargetApi; import android.content.Context; import android.content.Context; import android.graphics.Canvas; import android.graphics.Canvas; import android.graphics.Rect; import android.graphics.Typeface; import android.graphics.Typeface; import android.os.Build; import android.os.Build; import android.text.Layout; import android.text.Layout; Loading @@ -33,7 +32,6 @@ import android.view.View; import androidx.annotation.ColorInt; import androidx.annotation.ColorInt; import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat; import com.android.launcher3.DeviceProfile; import com.android.launcher3.R; import com.android.launcher3.R; import com.android.launcher3.allapps.FloatingHeaderRow; import com.android.launcher3.allapps.FloatingHeaderRow; import com.android.launcher3.allapps.FloatingHeaderView; import com.android.launcher3.allapps.FloatingHeaderView; Loading Loading @@ -238,12 +236,6 @@ public class AppsDividerView extends View implements FloatingHeaderRow { getPaddingBottom() + getPaddingTop()); getPaddingBottom() + getPaddingTop()); } } @Override public void setInsets(Rect insets, DeviceProfile grid) { int leftRightPadding = grid.allAppsLeftRightPadding; setPadding(leftRightPadding, getPaddingTop(), leftRightPadding, getPaddingBottom()); } @Override @Override public void setVerticalScroll(int scroll, boolean isScrolledOut) { public void setVerticalScroll(int scroll, boolean isScrolledOut) { setTranslationY(scroll); setTranslationY(scroll); Loading
quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java +0 −7 Original line number Original line Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.launcher3.appprediction; import android.annotation.TargetApi; import android.annotation.TargetApi; import android.content.Context; import android.content.Context; import android.graphics.Canvas; import android.graphics.Canvas; import android.graphics.Rect; import android.os.Build; import android.os.Build; import android.util.AttributeSet; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.LayoutInflater; Loading Loading @@ -251,12 +250,6 @@ public class PredictionRowView<T extends Context & ActivityContext & DeviceProfi } } } } @Override public void setInsets(Rect insets, DeviceProfile grid) { int leftRightPadding = grid.allAppsLeftRightPadding; setPadding(leftRightPadding, getPaddingTop(), leftRightPadding, getPaddingBottom()); } @Override @Override public Class<PredictionRowView> getTypeClass() { public Class<PredictionRowView> getTypeClass() { return PredictionRowView.class; return PredictionRowView.class; Loading
src/com/android/launcher3/allapps/FloatingHeaderRow.java +0 −5 Original line number Original line Diff line number Diff line Loading @@ -15,11 +15,8 @@ */ */ package com.android.launcher3.allapps; package com.android.launcher3.allapps; import android.graphics.Rect; import android.view.View; import android.view.View; import com.android.launcher3.DeviceProfile; /** /** * A abstract representation of a row in all-apps view * A abstract representation of a row in all-apps view */ */ Loading @@ -29,8 +26,6 @@ public interface FloatingHeaderRow { void setup(FloatingHeaderView parent, FloatingHeaderRow[] allRows, boolean tabsHidden); void setup(FloatingHeaderView parent, FloatingHeaderRow[] allRows, boolean tabsHidden); void setInsets(Rect insets, DeviceProfile grid); int getExpectedHeight(); int getExpectedHeight(); /** /** Loading
src/com/android/launcher3/allapps/FloatingHeaderView.java +3 −30 Original line number Original line Diff line number Diff line Loading @@ -30,7 +30,6 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.Nullable; import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView; import com.android.launcher3.DeviceProfile; import com.android.launcher3.Insettable; import com.android.launcher3.Insettable; import com.android.launcher3.R; import com.android.launcher3.R; import com.android.launcher3.allapps.BaseAllAppsContainerView.AdapterHolder; import com.android.launcher3.allapps.BaseAllAppsContainerView.AdapterHolder; Loading Loading @@ -158,22 +157,6 @@ public class FloatingHeaderView extends LinearLayout implements PluginManagerWrapper.INSTANCE.get(getContext()).removePluginListener(this); PluginManagerWrapper.INSTANCE.get(getContext()).removePluginListener(this); } } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { mTabLayout.getLayoutParams().width = getTabWidth(); super.onMeasure(widthMeasureSpec, heightMeasureSpec); } /** * Returns distance between left and right app icons */ public int getTabWidth() { DeviceProfile grid = ActivityContext.lookupContext(getContext()).getDeviceProfile(); int totalWidth = getMeasuredWidth() - getPaddingLeft() - getPaddingRight(); int iconPadding = totalWidth / grid.numShownAllAppsColumns - grid.allAppsIconSizePx; return totalWidth - iconPadding - grid.allAppsIconDrawablePaddingPx; } private void recreateAllRowsArray() { private void recreateAllRowsArray() { int pluginCount = mPluginRows.size(); int pluginCount = mPluginRows.size(); if (pluginCount == 0) { if (pluginCount == 0) { Loading Loading @@ -423,15 +406,6 @@ public class FloatingHeaderView extends LinearLayout implements p.y = getTop() - mCurrentRV.getTop() - ((ViewGroup) mCurrentRV.getParent()).getTop(); p.y = getTop() - mCurrentRV.getTop() - ((ViewGroup) mCurrentRV.getParent()).getTop(); } } public boolean hasVisibleContent() { for (FloatingHeaderRow row : mAllRows) { if (row.hasVisibleContent()) { return true; } } return false; } public boolean isHeaderProtectionSupported() { public boolean isHeaderProtectionSupported() { return mHeaderProtectionSupported; return mHeaderProtectionSupported; } } Loading @@ -443,10 +417,9 @@ public class FloatingHeaderView extends LinearLayout implements @Override @Override public void setInsets(Rect insets) { public void setInsets(Rect insets) { DeviceProfile grid = ActivityContext.lookupContext(getContext()).getDeviceProfile(); int leftRightPadding = ActivityContext.lookupContext(getContext()) for (FloatingHeaderRow row : mAllRows) { .getDeviceProfile().allAppsLeftRightPadding; row.setInsets(insets, grid); setPadding(leftRightPadding, getPaddingTop(), leftRightPadding, getPaddingBottom()); } } } public <T extends FloatingHeaderRow> T findFixedRowByType(Class<T> type) { public <T extends FloatingHeaderRow> T findFixedRowByType(Class<T> type) { Loading
src/com/android/launcher3/allapps/PluginHeaderRow.java +0 −5 Original line number Original line Diff line number Diff line Loading @@ -18,10 +18,8 @@ package com.android.launcher3.allapps; import static android.view.View.INVISIBLE; import static android.view.View.INVISIBLE; import static android.view.View.VISIBLE; import static android.view.View.VISIBLE; import android.graphics.Rect; import android.view.View; import android.view.View; import com.android.launcher3.DeviceProfile; import com.android.systemui.plugins.AllAppsRow; import com.android.systemui.plugins.AllAppsRow; /** /** Loading @@ -42,9 +40,6 @@ public class PluginHeaderRow implements FloatingHeaderRow { public void setup(FloatingHeaderView parent, FloatingHeaderRow[] allRows, public void setup(FloatingHeaderView parent, FloatingHeaderRow[] allRows, boolean tabsHidden) { } boolean tabsHidden) { } @Override public void setInsets(Rect insets, DeviceProfile grid) { } @Override @Override public int getExpectedHeight() { public int getExpectedHeight() { return mPlugin.getExpectedHeight(); return mPlugin.getExpectedHeight(); Loading