From b8a2df10c938f1120f5c4a3c0d06aae4ed3f2281 Mon Sep 17 00:00:00 2001 From: Kenny Guy Date: Fri, 12 Dec 2014 16:56:08 +0000 Subject: [PATCH] Don't show last used and profile button at same time. UI for ResolverActivity doesn't support last used activity and work/personal profile button at the same time. So if work/personal button is present disable last used. Bug: 18730438 Change-Id: I7ae7319bbdeb9bcaab9d6d03f97dea17d07c6d7f --- core/java/com/android/internal/app/ResolverActivity.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java index c9a271cde37a4..661acbeda4bfe 100644 --- a/core/java/com/android/internal/app/ResolverActivity.java +++ b/core/java/com/android/internal/app/ResolverActivity.java @@ -956,6 +956,13 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic // Process last group processGroup(currentResolveList, start, (N-1), r0, r0Label); } + + // Layout doesn't handle both profile button and last chosen + // so disable last chosen if profile button is present. + if (mOtherProfile != null && mLastChosenPosition >= 0) { + mLastChosenPosition = -1; + mFilterLastUsed = false; + } } private void processGroup(List rList, int start, int end, ResolveInfo ro,