Fix work mode switch inflation (#3878)

* Revert "Fixed App crashes when leaving search in A9 (#3876) (#3877)"

This reverts commit 54ee1a0e92.

* Fix work mode switch inflation on Pie

* Also change the color in dark mode
This commit is contained in:
Suphon T
2023-12-19 06:16:53 +07:00
committed by GitHub
parent 24dab9b005
commit 577084d62b
3 changed files with 5 additions and 6 deletions

View File

@@ -27,5 +27,5 @@
<!-- Turn on work apps button -->
<color name="work_turn_on_stroke">?attr/colorAccentPrimary</color>
<color name="work_fab_bg_color">?attr/materialColorPrimaryFixedDim</color>
<color name="work_fab_icon_color">?attr/materialColorOnPrimaryFixed</color>
</resources>
<color name="work_fab_icon_color">@color/material_color_on_primary_fixed</color>
</resources>

View File

@@ -95,5 +95,5 @@
<!-- Turn on work apps button -->
<color name="work_turn_on_stroke">?attr/colorAccentPrimary</color>
<color name="work_fab_bg_color">?attr/materialColorPrimaryFixedDim</color>
<color name="work_fab_icon_color">?attr/materialColorOnPrimaryFixed</color>
</resources>
<color name="work_fab_icon_color">@color/material_color_on_primary_fixed</color>
</resources>

View File

@@ -166,8 +166,7 @@ public class WorkProfileManager implements PersonalWorkSlidingTabStrip.OnActiveP
*/
public boolean attachWorkModeSwitch() {
if (!mAllApps.getAppsStore().hasModelFlag(
FLAG_HAS_SHORTCUT_PERMISSION | FLAG_QUIET_MODE_CHANGE_PERMISSION)
|| !Utilities.ATLEAST_Q) {
FLAG_HAS_SHORTCUT_PERMISSION | FLAG_QUIET_MODE_CHANGE_PERMISSION)) {
Log.e(TAG, "unable to attach work mode switch; Missing required permissions");
return false;
}