mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Clean up work profile
This includes - Dismiss work edu on launcher state change - Remove work tab flash on first setup - Make edu bottom sheet adopt theme color - Fix Work toggle bottom inset Bug: 149200572 Bug: 149197172 Bug: 149199058 Bug: 149215103 Bug: 149198955 Bug: 145595763 Bug:149481723 Test: Manual Change-Id: I39a30782b80fd3a66bede55754fa30a940d2caee
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
package com.android.launcher3.allapps;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.util.AttributeSet;
|
||||
@@ -39,11 +38,8 @@ public class PersonalWorkSlidingTabStrip extends LinearLayout implements PageInd
|
||||
private static final int POSITION_PERSONAL = 0;
|
||||
private static final int POSITION_WORK = 1;
|
||||
|
||||
public static final String KEY_SHOWED_PEEK_WORK_TAB = "showed_peek_work_tab";
|
||||
|
||||
private final Paint mSelectedIndicatorPaint;
|
||||
private final Paint mDividerPaint;
|
||||
private final SharedPreferences mSharedPreferences;
|
||||
|
||||
private int mSelectedIndicatorHeight;
|
||||
private int mIndicatorLeft = -1;
|
||||
@@ -72,7 +68,6 @@ public class PersonalWorkSlidingTabStrip extends LinearLayout implements PageInd
|
||||
mDividerPaint.setStrokeWidth(
|
||||
getResources().getDimensionPixelSize(R.dimen.all_apps_divider_height));
|
||||
|
||||
mSharedPreferences = Utilities.getPrefs(context);
|
||||
mIsRtl = Utilities.isRtl(getResources());
|
||||
}
|
||||
|
||||
@@ -128,25 +123,6 @@ public class PersonalWorkSlidingTabStrip extends LinearLayout implements PageInd
|
||||
mIndicatorRight, getHeight(), mSelectedIndicatorPaint);
|
||||
}
|
||||
|
||||
public void highlightWorkTabIfNecessary() {
|
||||
if (mSharedPreferences.getBoolean(KEY_SHOWED_PEEK_WORK_TAB, false)) {
|
||||
return;
|
||||
}
|
||||
if (mLastActivePage != POSITION_PERSONAL) {
|
||||
return;
|
||||
}
|
||||
highlightWorkTab();
|
||||
mSharedPreferences.edit().putBoolean(KEY_SHOWED_PEEK_WORK_TAB, true).apply();
|
||||
}
|
||||
|
||||
private void highlightWorkTab() {
|
||||
View v = getChildAt(POSITION_WORK);
|
||||
v.post(() -> {
|
||||
v.setPressed(true);
|
||||
v.setPressed(false);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScroll(int currentScroll, int totalScroll) {
|
||||
float scrollOffset = ((float) currentScroll) / totalScroll;
|
||||
|
||||
Reference in New Issue
Block a user