From 258f5d8f2646d510ea2286f75182d1ef8f910729 Mon Sep 17 00:00:00 2001 From: Sergey Serokurov Date: Wed, 24 Nov 2021 16:17:31 -0800 Subject: [PATCH 1/2] Fix truncated string in bubbles setting screen Bug: 187217715 Test: Manual, screenshot after the fix at https://screenshot.googleplex.com/4DjWc6AZTE6e75N Change-Id: Ib683a9500cefed0d79192866e691257380a72a92 --- res/layout/bubble_preference.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/res/layout/bubble_preference.xml b/res/layout/bubble_preference.xml index 08f25b4538b..eb9a8f14d75 100644 --- a/res/layout/bubble_preference.xml +++ b/res/layout/bubble_preference.xml @@ -55,7 +55,7 @@ android:layout_height="wrap_content" android:layout_centerVertical="true" android:ellipsize="end" - android:maxLines="2" + android:maxLines="3" android:clickable="false" android:focusable="false" android:layout_toEndOf="@id/bubble_all_icon" @@ -87,7 +87,7 @@ android:layout_height="wrap_content" android:layout_centerVertical="true" android:ellipsize="end" - android:maxLines="2" + android:maxLines="3" android:clickable="false" android:focusable="false" android:layout_toEndOf="@id/bubble_selected_icon" @@ -119,7 +119,7 @@ android:layout_height="wrap_content" android:layout_centerVertical="true" android:ellipsize="end" - android:maxLines="2" + android:maxLines="3" android:clickable="false" android:focusable="false" android:layout_toEndOf="@id/bubble_none_icon" From 17423d16823289b2c3919fb9402dcafa02d53930 Mon Sep 17 00:00:00 2001 From: Tsung-Mao Fang Date: Tue, 23 Nov 2021 16:32:00 +0800 Subject: [PATCH 2/2] Fix abnormal behavior on avatar account page Prior to this cl, if user opens settings app in single-pane first and navigates to the avatar account page, then rotate the device, user observed the account page was still shown with full screen. Because we didn't register correct split rule, it causes the abormal behavior on two-pane mode. In order to register correct rule, we also need to assign correct component name while opening the account page. Bug: 207609699 Test: Rebuilt apk and verify the behavior Change-Id: I31def684c033c1d0c20870284826c6713a31b43d --- .../android/settings/accounts/AvatarViewMixin.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/com/android/settings/accounts/AvatarViewMixin.java b/src/com/android/settings/accounts/AvatarViewMixin.java index 7a2565c45b2..6b04e9745ab 100644 --- a/src/com/android/settings/accounts/AvatarViewMixin.java +++ b/src/com/android/settings/accounts/AvatarViewMixin.java @@ -37,6 +37,7 @@ import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.OnLifecycleEvent; import com.android.settings.R; +import com.android.settings.activityembedding.ActivityEmbeddingRulesController; import com.android.settings.homepage.SettingsHomepageActivity; import com.android.settings.overlay.FeatureFactory; import com.android.settingslib.utils.ThreadUtils; @@ -105,6 +106,17 @@ public class AvatarViewMixin implements LifecycleObserver { return; } + // Set a component name since activity embedding requires a component name for + // registering a rule. + intent.setComponent(matchedIntents.get(0).getComponentInfo().getComponentName()); + ActivityEmbeddingRulesController.registerTwoPanePairRuleForSettingsHome( + mContext, + intent.getComponent(), + intent.getAction(), + false /* finishPrimaryWithSecondary */, + true /* finishSecondaryWithPrimary */, + false /* clearTop */); + FeatureFactory.getFactory(mContext).getMetricsFeatureProvider() .logSettingsTileClick(KEY_AVATAR_ICON, SettingsEnums.SETTINGS_HOMEPAGE);