Merge "[Chooser/ResolverActivity] Add option to show preview area even if there are no apps in the tab" into tm-qpr-dev am: 54383d1495
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20882607 Change-Id: I8e6bec9159ae90727372bbf839a4c8f3227470cf Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -2953,11 +2953,23 @@ public class ChooserActivity extends ResolverActivity implements
|
|||||||
|
|
||||||
private boolean shouldShowStickyContentPreviewNoOrientationCheck() {
|
private boolean shouldShowStickyContentPreviewNoOrientationCheck() {
|
||||||
return shouldShowTabs()
|
return shouldShowTabs()
|
||||||
&& mMultiProfilePagerAdapter.getListAdapterForUserHandle(
|
&& (mMultiProfilePagerAdapter.getListAdapterForUserHandle(
|
||||||
UserHandle.of(UserHandle.myUserId())).getCount() > 0
|
UserHandle.of(UserHandle.myUserId())).getCount() > 0
|
||||||
|
|| shouldShowContentPreviewWhenEmpty())
|
||||||
&& shouldShowContentPreview();
|
&& shouldShowContentPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method could be used to override the default behavior when we hide the preview area
|
||||||
|
* when the current tab doesn't have any items.
|
||||||
|
*
|
||||||
|
* @return true if we want to show the content preview area even if the tab for the current
|
||||||
|
* user is empty
|
||||||
|
*/
|
||||||
|
protected boolean shouldShowContentPreviewWhenEmpty() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true if we want to show the content preview area
|
* @return true if we want to show the content preview area
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ public class ResolverActivity extends Activity implements
|
|||||||
* <p>Can only be used if there is a work profile.
|
* <p>Can only be used if there is a work profile.
|
||||||
* <p>Possible values can be either {@link #PROFILE_PERSONAL} or {@link #PROFILE_WORK}.
|
* <p>Possible values can be either {@link #PROFILE_PERSONAL} or {@link #PROFILE_WORK}.
|
||||||
*/
|
*/
|
||||||
static final String EXTRA_SELECTED_PROFILE =
|
protected static final String EXTRA_SELECTED_PROFILE =
|
||||||
"com.android.internal.app.ResolverActivity.EXTRA_SELECTED_PROFILE";
|
"com.android.internal.app.ResolverActivity.EXTRA_SELECTED_PROFILE";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -224,8 +224,8 @@ public class ResolverActivity extends Activity implements
|
|||||||
static final String EXTRA_CALLING_USER =
|
static final String EXTRA_CALLING_USER =
|
||||||
"com.android.internal.app.ResolverActivity.EXTRA_CALLING_USER";
|
"com.android.internal.app.ResolverActivity.EXTRA_CALLING_USER";
|
||||||
|
|
||||||
static final int PROFILE_PERSONAL = AbstractMultiProfilePagerAdapter.PROFILE_PERSONAL;
|
protected static final int PROFILE_PERSONAL = AbstractMultiProfilePagerAdapter.PROFILE_PERSONAL;
|
||||||
static final int PROFILE_WORK = AbstractMultiProfilePagerAdapter.PROFILE_WORK;
|
protected static final int PROFILE_WORK = AbstractMultiProfilePagerAdapter.PROFILE_WORK;
|
||||||
|
|
||||||
private BroadcastReceiver mWorkProfileStateReceiver;
|
private BroadcastReceiver mWorkProfileStateReceiver;
|
||||||
private UserHandle mHeaderCreatorUser;
|
private UserHandle mHeaderCreatorUser;
|
||||||
|
|||||||
Reference in New Issue
Block a user