Snap for 7325276 from 44e6fb6ed4 to sc-v2-release

Change-Id: I72aa68d0e1f8b1b5a6c59fccc64a49c511bbea2d
This commit is contained in:
android-build-team Robot
2021-04-30 01:08:37 +00:00
16 changed files with 154 additions and 104 deletions
+32 -64
View File
@@ -45,72 +45,40 @@
<string name="hotsaet_tip_prediction_enabled" msgid="2233554377501347650">"सिफारिस गरिएका एपहरू देखाउने सुविधा सक्षम पारिएका छन्"</string>
<string name="hotsaet_tip_prediction_disabled" msgid="1506426298884658491">"सिफारिस गरिएका एपहरू देखाउने सुविधा असक्षम पारिएको छ"</string>
<string name="hotseat_prediction_content_description" msgid="4582028296938078419">"पूर्वानुमान गरिएको एप: <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<!-- no translation found for back_gesture_feedback_swipe_too_far_from_left_edge (340972404868601012) -->
<skip />
<!-- no translation found for back_gesture_feedback_cancelled_left_edge (6671316150388702530) -->
<skip />
<!-- no translation found for back_gesture_feedback_complete_left_edge (3220478647881674266) -->
<skip />
<!-- no translation found for back_gesture_feedback_swipe_too_far_from_right_edge (4306700023773832353) -->
<skip />
<!-- no translation found for back_gesture_feedback_cancelled_right_edge (4951916546256902552) -->
<skip />
<!-- no translation found for back_gesture_feedback_complete (7261221999760772210) -->
<skip />
<!-- no translation found for back_gesture_feedback_swipe_in_nav_bar (1148198467090405643) -->
<skip />
<!-- no translation found for back_gesture_tutorial_confirm_subtitle (5181305411668713250) -->
<skip />
<!-- no translation found for back_gesture_intro_title (19551256430224428) -->
<skip />
<!-- no translation found for back_gesture_intro_subtitle (7912576483031802797) -->
<skip />
<!-- no translation found for home_gesture_feedback_swipe_too_far_from_edge (1446774096007065298) -->
<skip />
<!-- no translation found for home_gesture_feedback_overview_detected (1557523944897393013) -->
<skip />
<!-- no translation found for home_gesture_feedback_wrong_swipe_direction (6993979358080825438) -->
<skip />
<!-- no translation found for home_gesture_feedback_complete (2324789183070815517) -->
<skip />
<!-- no translation found for home_gesture_intro_title (836590312858441830) -->
<skip />
<!-- no translation found for home_gesture_intro_subtitle (2632238748497975326) -->
<skip />
<!-- no translation found for overview_gesture_feedback_swipe_too_far_from_edge (3032757898111577225) -->
<skip />
<!-- no translation found for overview_gesture_feedback_home_detected (1411130969354020489) -->
<skip />
<!-- no translation found for overview_gesture_feedback_wrong_swipe_direction (6725820500906747925) -->
<skip />
<!-- no translation found for overview_gesture_feedback_complete (5477014491632199169) -->
<skip />
<!-- no translation found for overview_gesture_intro_title (2902054412868489378) -->
<skip />
<!-- no translation found for overview_gesture_intro_subtitle (1579517193845186042) -->
<skip />
<!-- no translation found for gesture_tutorial_confirm_title (6201516182040074092) -->
<skip />
<!-- no translation found for gesture_tutorial_action_button_label_next (2556263116424738762) -->
<skip />
<!-- no translation found for gesture_tutorial_action_button_label_done (671834508127014231) -->
<skip />
<!-- no translation found for gesture_tutorial_action_button_label_settings (2923621047916486604) -->
<skip />
<!-- no translation found for gesture_tutorial_try_again (65962545858556697) -->
<skip />
<!-- no translation found for gesture_tutorial_nice (2936275692616928280) -->
<skip />
<!-- no translation found for gesture_tutorial_step (1279786122817620968) -->
<skip />
<string name="back_gesture_feedback_swipe_too_far_from_left_edge" msgid="340972404868601012">"स्क्रिनको सबैभन्दा बायाँ किनाराबाट स्वाइप गर्नुहोस्।"</string>
<string name="back_gesture_feedback_cancelled_left_edge" msgid="6671316150388702530">"स्क्रिनको बायाँ किनाराबाट मध्य भागसम्म स्वाइप गर्नुहोस् अनि औँला उठाउनुहोस्।"</string>
<string name="back_gesture_feedback_complete_left_edge" msgid="3220478647881674266">"यत्ति हो! अब दायाँ किनाराबाट स्वाइप गरी हेर्नुहोस्।"</string>
<string name="back_gesture_feedback_swipe_too_far_from_right_edge" msgid="4306700023773832353">"स्क्रिनको सबैभन्दा दायाँ किनाराबाट स्वाइप गर्नुहोस्।"</string>
<string name="back_gesture_feedback_cancelled_right_edge" msgid="4951916546256902552">"स्क्रिनको दायाँ किनाराबाट मध्य भागसम्म स्वाइप गर्नुहोस् अनि औँला उठाउनुहोस्।"</string>
<string name="back_gesture_feedback_complete" msgid="7261221999760772210">"तपाईंले \'पछाडि जानुहोस्\' नामक इसारा प्रयोग गर्ने तरिका सिक्नुभयो। अब होम स्क्रिनमा जाने तरिका सिक्नुहोस्।"</string>
<string name="back_gesture_feedback_swipe_in_nav_bar" msgid="1148198467090405643">"स्क्रिनको फेदको धेरै नजिकसम्म स्वाइप नगर्नुहोस्।"</string>
<string name="back_gesture_tutorial_confirm_subtitle" msgid="5181305411668713250">"\'पछाडि\' नामक इसाराको संवेदनशीलता बदल्न सेटिङमा जानुहोस्"</string>
<string name="back_gesture_intro_title" msgid="19551256430224428">"पछाडि जान स्वाइप गर्नुहोस्"</string>
<string name="back_gesture_intro_subtitle" msgid="7912576483031802797">"यसअघिको स्क्रिनमा फर्कन स्क्रिनको बायाँ वा दायाँ किनाराबाट मध्य भागसम्म स्वाइप गर्नुहोस्।"</string>
<string name="home_gesture_feedback_swipe_too_far_from_edge" msgid="1446774096007065298">"स्क्रिनको फेदबाट माथितिर स्वाइप गर्नुहोस्।"</string>
<string name="home_gesture_feedback_overview_detected" msgid="1557523944897393013">"औँला उठाउनुअघि नरोकिनुहोस्।"</string>
<string name="home_gesture_feedback_wrong_swipe_direction" msgid="6993979358080825438">"सीधै माथितिर स्वाइप गर्नुहोस्।"</string>
<string name="home_gesture_feedback_complete" msgid="2324789183070815517">"तपाईंले \'होम स्क्रिनमा जानुहोस्\' नामक इसारा प्रयोग गर्ने तरिका सिक्नुभयो। अब एउटा एपबाट अर्को एपमा जाने तरिका सिक्नुहोस्।"</string>
<string name="home_gesture_intro_title" msgid="836590312858441830">"होम स्क्रिनमा जान स्वाइप गर्नुहोस्"</string>
<string name="home_gesture_intro_subtitle" msgid="2632238748497975326">"स्क्रिनको फेदबाट माथितिर स्वाइप गर्नुहोस्। यो इसारा प्रयोग गर्दा सधैँ होम स्क्रिन खुल्छ।"</string>
<string name="overview_gesture_feedback_swipe_too_far_from_edge" msgid="3032757898111577225">"स्क्रिनको फेदबाट माथितिर स्वाइप गर्नुहोस्।"</string>
<string name="overview_gesture_feedback_home_detected" msgid="1411130969354020489">"स्क्रिनबाट औँला उठाउनुअघि एपको विन्डोमा केही बेर छोइराख्नुहोस्।"</string>
<string name="overview_gesture_feedback_wrong_swipe_direction" msgid="6725820500906747925">"सीधै माथितिर स्वाइप गर्नुहोस् अनि रोकिनुहोस्।"</string>
<string name="overview_gesture_feedback_complete" msgid="5477014491632199169">"तपाईंले \'एउटा एपबाट अर्को एपमा जानुहोस्\' नामक इसारा प्रयोग गर्ने तरिका सिक्नुभयो। तपाईं अब आफ्नो फोन चलाउन सक्नुहुन्छ!"</string>
<string name="overview_gesture_intro_title" msgid="2902054412868489378">"एउटा एपबाट अर्को एपमा जान स्वाइप गर्नुहोस्"</string>
<string name="overview_gesture_intro_subtitle" msgid="1579517193845186042">"स्क्रिनको फेदबाट माथितिर स्वाइप गर्नुहोस्, छोइराख्नुहोस् अनि औँला उठाउनुहोस्।"</string>
<string name="gesture_tutorial_confirm_title" msgid="6201516182040074092">"सबै तयार छ"</string>
<string name="gesture_tutorial_action_button_label_next" msgid="2556263116424738762">"अर्को"</string>
<string name="gesture_tutorial_action_button_label_done" msgid="671834508127014231">"सम्पन्न भयो"</string>
<string name="gesture_tutorial_action_button_label_settings" msgid="2923621047916486604">"सेटिङ"</string>
<string name="gesture_tutorial_try_again" msgid="65962545858556697">"फेरि प्रयास गर्नुहोस्"</string>
<string name="gesture_tutorial_nice" msgid="2936275692616928280">"राम्रो!"</string>
<string name="gesture_tutorial_step" msgid="1279786122817620968">"ट्युटोरियल <xliff:g id="CURRENT">%1$d</xliff:g>/<xliff:g id="TOTAL">%2$d</xliff:g>"</string>
<string name="action_share" msgid="2648470652637092375">"सेयर गर्नुहोस्"</string>
<string name="action_screenshot" msgid="8171125848358142917">"स्क्रिनसट"</string>
<string name="blocked_by_policy" msgid="2071401072261365546">"यो एप वा तपाईंको सङ्गठनले यो कारबाही गर्ने अनुमति दिँदैन"</string>
<!-- no translation found for skip_tutorial_dialog_title (2725643161260038458) -->
<skip />
<string name="skip_tutorial_dialog_title" msgid="2725643161260038458">"नेभिगेसन ट्युटोरियल स्किप गर्ने हो?"</string>
<string name="skip_tutorial_dialog_subtitle" msgid="544063326241955662">"तपाईं पछि <xliff:g id="NAME">%1$s</xliff:g> एपमा गई यो ट्युटोरियल भेट्टाउन सक्नुहुन्छ"</string>
<!-- no translation found for gesture_tutorial_action_button_label_cancel (3809842569351264108) -->
<skip />
<!-- no translation found for gesture_tutorial_action_button_label_skip (394452764989751960) -->
<skip />
<string name="gesture_tutorial_action_button_label_cancel" msgid="3809842569351264108">"रद्द गर्नुहोस्"</string>
<string name="gesture_tutorial_action_button_label_skip" msgid="394452764989751960">"स्किप गर्नु…"</string>
</resources>
@@ -443,6 +443,19 @@ public abstract class BaseQuickstepLauncher extends Launcher
if (info == null) {
return;
}
switch (info.container) {
case LauncherSettings.Favorites.CONTAINER_DESKTOP:
case LauncherSettings.Favorites.CONTAINER_HOTSEAT:
// Fall through and continue it's on the workspace (we don't support swiping back
// to other containers like all apps or the hotseat predictions (which can change)
break;
default:
if (info.container >= 0) {
// Also allow swiping to folders
break;
}
return;
}
switch (info.itemType) {
case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
@@ -1095,8 +1095,10 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
final RemoteAnimationTargetCompat runningTaskTarget = mRecentsAnimationTargets != null
? mRecentsAnimationTargets.findTask(mGestureState.getRunningTaskId())
: null;
HomeAnimationFactory homeAnimFactory = createHomeAnimationFactory(
runningTaskTarget.taskInfo.launchCookies, duration);
final ArrayList<IBinder> cookies = runningTaskTarget != null
? runningTaskTarget.taskInfo.launchCookies
: new ArrayList<>();
HomeAnimationFactory homeAnimFactory = createHomeAnimationFactory(cookies, duration);
mIsSwipingPipToHome = homeAnimFactory.supportSwipePipToHome()
&& runningTaskTarget != null
&& runningTaskTarget.taskInfo.pictureInPictureParams != null
@@ -244,8 +244,9 @@ public class LauncherSwipeHandlerV2 extends
return null;
}
// Find the associated item info for the launch cookie (if available)
int launchCookieItemId = -1;
// Find the associated item info for the launch cookie (if available), note that predicted
// apps actually have an id of -1, so use another default id here
int launchCookieItemId = -2;
for (IBinder cookie : launchCookies) {
Integer itemId = ObjectWrapper.unwrap(cookie);
if (itemId != null) {
@@ -84,6 +84,7 @@ public class StatsLogCompatManager extends StatsLogManager {
private static final int FOLDER_HIERARCHY_OFFSET = 100;
private static final int SEARCH_RESULT_HIERARCHY_OFFSET = 200;
private static final int EXTENDED_CONTAINERS_HIERARCHY_OFFSET = 300;
private static final int ATTRIBUTE_MULTIPLIER = 100;
public static final CopyOnWriteArrayList<StatsLogConsumer> LOGS_CONSUMER =
new CopyOnWriteArrayList<>();
@@ -112,7 +113,8 @@ public class StatsLogCompatManager extends StatsLogManager {
}
SysUiStatsLog.write(SysUiStatsLog.LAUNCHER_SNAPSHOT,
LAUNCHER_WORKSPACE_SNAPSHOT.getId() /* event_id */,
info.getItemCase().getNumber() /* target_id */,
info.getAttribute().getNumber() * ATTRIBUTE_MULTIPLIER
+ info.getItemCase().getNumber() /* target_id */,
instanceId.getId() /* instance_id */,
0 /* uid */,
getPackageName(info) /* package_name */,
@@ -329,7 +331,8 @@ public class StatsLogCompatManager extends StatsLogManager {
null /* launcher extensions, deprecated */,
false /* quickstep_enabled, deprecated */,
event.getId() /* event_id */,
atomInfo.getItemCase().getNumber() /* target_id */,
atomInfo.getAttribute().getNumber() * ATTRIBUTE_MULTIPLIER
+ atomInfo.getItemCase().getNumber() /* target_id */,
instanceId.getId() /* instance_id TODO */,
0 /* uid TODO */,
getPackageName(atomInfo) /* package_name */,
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="48"
android:viewportHeight="48">
<path
android:pathData="M24,24m-24,0a24,24 0,1 1,48 0a24,24 0,1 1,-48 0"
android:fillColor="#81C995"/>
<path
android:pathData="M27,34C23.134,34 20,30.866 20,27C20,23.134 23.134,20 27,20C30.866,20 34,23.134 34,27C34,28.4872 33.5362,29.8662 32.7453,31"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#3C4043"/>
<path
android:pathData="M35,33l-8,0l-0,2l8,0z"
android:fillColor="#3C4043"/>
<path
android:pathData="M21,21m-6,0a6,6 0,1 1,12 0a6,6 0,1 1,-12 0"
android:fillColor="#81C995"/>
<path
android:pathData="M16,25h5v2h-5z"
android:fillColor="#81C995"/>
<path
android:pathData="M21,28C24.866,28 28,24.866 28,21C28,17.134 24.866,14 21,14C17.134,14 14,17.134 14,21C14,22.4872 14.4638,23.8662 15.2547,25"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#ffffff"/>
<path
android:pathData="M13,27h8v2h-8z"
android:fillColor="#ffffff"/>
</vector>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 The Android Open Source Project
Copyright (C) 2021 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,12 +15,12 @@
limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="?android:attr/colorPrimary" />
android:shape="rectangle">
<solid android:color="@color/widgets_picker_surface" />
<corners
android:topLeftRadius="@dimen/bg_round_rect_radius"
android:topRightRadius="@dimen/bg_round_rect_radius"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"
/>
</shape>
</shape>
+1 -1
View File
@@ -20,7 +20,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="16dp"
android:background="@drawable/top_round_rect_primary"
android:background="@drawable/widgets_bottom_sheet_background"
android:elevation="@dimen/deep_shortcuts_elevation"
android:layout_gravity="bottom"
android:theme="?attr/widgetsTheme">
+2 -1
View File
@@ -80,7 +80,8 @@
<attr name="ambientShadowBlur" format="dimension" />
<attr name="keyShadowColor" format="color" />
<attr name="keyShadowBlur" format="dimension" />
<attr name="keyShadowOffset" format="dimension" />
<attr name="keyShadowOffsetX" format="dimension" />
<attr name="keyShadowOffsetY" format="dimension" />
</declare-styleable>
<!-- PagedView specific attributes. These attributes are used to customize
+5 -4
View File
@@ -42,8 +42,8 @@
<item name="isWorkspaceDarkText">false</item>
<item name="workspaceTextColor">@color/workspace_text_color_light</item>
<item name="workspaceShadowColor">#B0000000</item>
<item name="workspaceAmbientShadowColor">#33000000</item>
<item name="workspaceKeyShadowColor">#44000000</item>
<item name="workspaceAmbientShadowColor">#00000000</item>
<item name="workspaceKeyShadowColor">#89000000</item>
<item name="workspaceStatusBarScrim">@drawable/workspace_bg</item>
<item name="widgetsTheme">@style/WidgetContainerTheme</item>
<item name="folderDotColor">?android:attr/colorPrimary</item>
@@ -243,8 +243,9 @@
<item name="ambientShadowColor">?attr/workspaceAmbientShadowColor</item>
<item name="ambientShadowBlur">2.5dp</item>
<item name="keyShadowColor">?attr/workspaceKeyShadowColor</item>
<item name="keyShadowBlur">1dp</item>
<item name="keyShadowOffset">.5dp</item>
<item name="keyShadowBlur">.5dp</item>
<item name="keyShadowOffsetX">.5dp</item>
<item name="keyShadowOffsetY">.5dp</item>
</style>
<!-- Theme for the popup container -->
+3 -1
View File
@@ -388,7 +388,8 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
}
protected void pageEndTransition() {
if (mIsPageInTransition) {
if (mIsPageInTransition && !mIsBeingDragged && mScroller.isFinished()
&& mEdgeGlowLeft.isFinished() && mEdgeGlowRight.isFinished()) {
mIsPageInTransition = false;
onPageEndTransition();
}
@@ -1740,6 +1741,7 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
public void draw(Canvas canvas) {
super.draw(canvas);
drawEdgeEffect(canvas);
pageEndTransition();
}
protected void drawEdgeEffect(Canvas canvas) {
@@ -151,7 +151,7 @@ public final class FeatureFlags {
"ENABLE_OVERVIEW_SHARE", false, "Show Share button in Overview Actions");
public static final BooleanFlag ENABLE_OVERVIEW_SHARING_TO_PEOPLE = getDebugFlag(
"ENABLE_OVERVIEW_SHARING_TO_PEOPLE", false,
"ENABLE_OVERVIEW_SHARING_TO_PEOPLE", true,
"Show indicators for content on Overview to share with top people. ");
public static final BooleanFlag ENABLE_OVERVIEW_CONTENT_PUSH = getDebugFlag(
@@ -60,7 +60,7 @@ public class DoubleShadowBubbleTextView extends BubbleTextView {
// We enhance the shadow by drawing the shadow twice
getPaint().setShadowLayer(mShadowInfo.ambientShadowBlur, 0, 0,
setColorAlphaBound(mShadowInfo.ambientShadowColor, alpha));
getTextShadowColor(mShadowInfo.ambientShadowColor, alpha));
drawWithoutDot(canvas);
canvas.save();
@@ -68,8 +68,11 @@ public class DoubleShadowBubbleTextView extends BubbleTextView {
getScrollX() + getWidth(),
getScrollY() + getHeight());
getPaint().setShadowLayer(mShadowInfo.keyShadowBlur, 0.0f, mShadowInfo.keyShadowOffset,
setColorAlphaBound(mShadowInfo.keyShadowColor, alpha));
getPaint().setShadowLayer(
mShadowInfo.keyShadowBlur,
mShadowInfo.keyShadowOffsetX,
mShadowInfo.keyShadowOffsetY,
getTextShadowColor(mShadowInfo.keyShadowColor, alpha));
drawWithoutDot(canvas);
canvas.restore();
@@ -81,7 +84,8 @@ public class DoubleShadowBubbleTextView extends BubbleTextView {
public final int ambientShadowColor;
public final float keyShadowBlur;
public final float keyShadowOffset;
public final float keyShadowOffsetX;
public final float keyShadowOffsetY;
public final int keyShadowColor;
public ShadowInfo(Context c, AttributeSet attrs, int defStyle) {
@@ -89,11 +93,13 @@ public class DoubleShadowBubbleTextView extends BubbleTextView {
TypedArray a = c.obtainStyledAttributes(
attrs, R.styleable.ShadowInfo, defStyle, 0);
ambientShadowBlur = a.getDimension(R.styleable.ShadowInfo_ambientShadowBlur, 0);
ambientShadowBlur = a.getDimensionPixelSize(
R.styleable.ShadowInfo_ambientShadowBlur, 0);
ambientShadowColor = a.getColor(R.styleable.ShadowInfo_ambientShadowColor, 0);
keyShadowBlur = a.getDimension(R.styleable.ShadowInfo_keyShadowBlur, 0);
keyShadowOffset = a.getDimension(R.styleable.ShadowInfo_keyShadowOffset, 0);
keyShadowBlur = a.getDimensionPixelSize(R.styleable.ShadowInfo_keyShadowBlur, 0);
keyShadowOffsetX = a.getDimensionPixelSize(R.styleable.ShadowInfo_keyShadowOffsetX, 0);
keyShadowOffsetY = a.getDimensionPixelSize(R.styleable.ShadowInfo_keyShadowOffsetY, 0);
keyShadowColor = a.getColor(R.styleable.ShadowInfo_keyShadowColor, 0);
a.recycle();
}
@@ -105,17 +111,26 @@ public class DoubleShadowBubbleTextView extends BubbleTextView {
if (textAlpha == 0 || (keyShadowAlpha == 0 && ambientShadowAlpha == 0)) {
textView.getPaint().clearShadowLayer();
return true;
} else if (ambientShadowAlpha > 0) {
} else if (ambientShadowAlpha > 0 && keyShadowAlpha == 0) {
textView.getPaint().setShadowLayer(ambientShadowBlur, 0, 0,
setColorAlphaBound(ambientShadowColor, textAlpha));
getTextShadowColor(ambientShadowColor, textAlpha));
return true;
} else if (keyShadowAlpha > 0) {
textView.getPaint().setShadowLayer(keyShadowBlur, 0.0f, keyShadowOffset,
setColorAlphaBound(keyShadowColor, textAlpha));
} else if (keyShadowAlpha > 0 && ambientShadowAlpha == 0) {
textView.getPaint().setShadowLayer(
keyShadowBlur,
keyShadowOffsetX,
keyShadowOffsetY,
getTextShadowColor(keyShadowColor, textAlpha));
return true;
} else {
return false;
}
}
}
// Multiplies the alpha of shadowColor by textAlpha.
private static int getTextShadowColor(int shadowColor, int textAlpha) {
return setColorAlphaBound(shadowColor,
Math.round(Color.alpha(shadowColor) * textAlpha / 255f));
}
}
@@ -28,7 +28,6 @@ import android.graphics.Rect;
import android.os.Process;
import android.os.UserHandle;
import android.util.AttributeSet;
import android.util.Log;
import android.util.Pair;
import android.util.SparseArray;
import android.view.LayoutInflater;
@@ -473,10 +472,6 @@ public class WidgetsFullSheet extends BaseWidgetSheet
WidgetsRecommendationTableLayout table =
mSearchAndRecommendationViewHolder.mRecommendedWidgetsTable;
if (recommendedWidgets.size() > 0) {
// TODO(b/185508758): Revert the following log after debugging.
if (getHeaderViewHeight() == 0) {
Log.d(TAG, "Header view height is 0 when inflating recommended widgets");
}
float maxTableHeight =
(mLauncher.getDeviceProfile().availableHeightPx - mTabsHeight
- getHeaderViewHeight()) * RECOMMENDATION_TABLE_HEIGHT_RATIO;
@@ -35,7 +35,6 @@ import androidx.recyclerview.widget.RecyclerView;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.R;
import com.android.launcher3.icons.FastBitmapDrawable;
import com.android.launcher3.icons.IconCache.ItemInfoUpdateReceiver;
import com.android.launcher3.icons.PlaceHolderIconDrawable;
import com.android.launcher3.icons.cache.HandlerRunnable;
@@ -174,7 +173,14 @@ public final class WidgetsListHeader extends LinearLayout implements ItemInfoUpd
}
private void setIcon(PackageItemInfo info) {
FastBitmapDrawable icon = info.newIcon(getContext());
Drawable icon;
switch (info.category) {
case PackageItemInfo.CONVERSATIONS:
icon = getContext().getDrawable(R.drawable.ic_conversations_widget_category);
break;
default:
icon = info.newIcon(getContext());
}
applyDrawables(icon);
mIconDrawable = icon;
if (mIconDrawable != null) {
@@ -93,9 +93,6 @@ public final class WidgetsRecommendationTableLayout extends TableLayout {
mRecommendationTableMaxHeight = recommendationTableMaxHeight;
RecommendationTableData data = fitRecommendedWidgetsToTableSpace(/* previewScale= */ 1f,
recommendedWidgets);
// TODO(b/185508758): Revert the following logs after debugging.
Log.d(TAG, "Recommended widgets section max height: " + recommendationTableMaxHeight);
Log.d(TAG, "Recommended widget down scale: " + data.mPreviewScale);
bindData(data);
}