Merge branch 'heads/android-14.0.0_r18' into 14-dev

This commit is contained in:
MrSluffy committed 2023-12-16 17:18:13 +08:00
1 parent 32700b0100
commit cc8f9828ab
756 files changed
+23785 -12235

No files matched your search

@@ -40,7 +40,6 @@ import com.android.launcher3.Insettable;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.KeyboardInsetAnimationCallback;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.logging.StatsLogManager;
import com.android.launcher3.model.StringCache;
import com.android.launcher3.views.ActivityContext;
@@ -100,12 +99,11 @@ public class WorkModeSwitch extends LinearLayout implements Insettable,
setWindowInsetsAnimationCallback(keyboardInsetAnimationCallback);
}
if (!Utilities.ATLEAST_U) {
setBackground(DrawableTokens.WorkAppsToggleBackground.resolve(getContext()));
}
setBackground(DrawableTokens.WorkAppsToggleBackground.resolve(getContext()));
ColorStateList textColor = ColorStateListTokens.AllAppsTabText.resolve(getContext());
mTextView.setTextColor(textColor);
setCompoundDrawableTintList(mTextView,textColor);
setCompoundDrawableTintList(mTextView, textColor);
DeviceProfile grid = BaseDraggingActivity.fromContext(getContext()).getDeviceProfile();
setInsets(grid.getInsets());
setInsets(mActivityContext.getDeviceProfile().getInsets());
@@ -122,7 +120,7 @@ public class WorkModeSwitch extends LinearLayout implements Insettable,
if (lp != null) {
int bottomMargin = getResources().getDimensionPixelSize(R.dimen.work_fab_margin_bottom);
DeviceProfile dp = ActivityContext.lookupContext(getContext()).getDeviceProfile();
if (FeatureFlags.ENABLE_FLOATING_SEARCH_BAR.get()) {
if (mActivityContext.getAppsView().isSearchBarFloating()) {
bottomMargin += dp.hotseatQsbHeight;
}
@@ -171,7 +169,9 @@ public class WorkModeSwitch extends LinearLayout implements Insettable,
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
WindowInsetsCompat windowInsetsCompat = WindowInsetsCompat.toWindowInsetsCompat(insets, this);
if (windowInsetsCompat.isVisible(WindowInsetsCompat.Type.ime())) {
setInsets(mImeInsets, windowInsetsCompat.getInsets(WindowInsetsCompat.Type.ime()).toPlatformInsets ( ));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
setInsets(mImeInsets, windowInsetsCompat.getInsets(WindowInsetsCompat.Type.ime()).toPlatformInsets());
}
} else {
mImeInsets.setEmpty();
}
@@ -228,4 +228,11 @@ public class WorkModeSwitch extends LinearLayout implements Insettable,
public int getScrollThreshold() {
return mScrollThreshold;
}
public void updateStringFromCache() {
StringCache cache = mActivityContext.getStringCache();
if (cache != null) {
mTextView.setText(cache.workProfilePauseButton);
}
}
}