Merge "Also check inactive profile targets in onHandlePackagesChanged" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3258a3e170
@@ -1938,7 +1938,7 @@ public class ResolverActivity extends Activity implements
|
|||||||
ResolverListAdapter activeListAdapter =
|
ResolverListAdapter activeListAdapter =
|
||||||
mMultiProfilePagerAdapter.getActiveListAdapter();
|
mMultiProfilePagerAdapter.getActiveListAdapter();
|
||||||
activeListAdapter.notifyDataSetChanged();
|
activeListAdapter.notifyDataSetChanged();
|
||||||
if (activeListAdapter.getCount() == 0) {
|
if (activeListAdapter.getCount() == 0 && !inactiveListAdapterHasItems()) {
|
||||||
// We no longer have any items... just finish the activity.
|
// We no longer have any items... just finish the activity.
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
@@ -1948,6 +1948,13 @@ public class ResolverActivity extends Activity implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean inactiveListAdapterHasItems() {
|
||||||
|
if (!shouldShowTabs()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return mMultiProfilePagerAdapter.getInactiveListAdapter().getCount() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
private BroadcastReceiver createWorkProfileStateReceiver() {
|
private BroadcastReceiver createWorkProfileStateReceiver() {
|
||||||
return new BroadcastReceiver() {
|
return new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user