Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42ab116a authored by arangelov's avatar arangelov
Browse files

Call rebuildList() from sharesheet's handlePackagesChanged().

Before, rebuildList() was not called for ChooserActivity.
Now we call it via ChooserActivity.onHandlePackagesChanged() which
calls ResolverActivity.onHandlePackagesChanged().

Fixes: 145998549
Test: manually reproduced the steps in the bug
Test: atest com.android.internal.app.ResolverActivityTest
Test: atest com.android.internal.app.ChooserActivityTest
Change-Id: I66ac1bf694a3241952e0e160e688cd4d9b1b477e
parent ab837049
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1392,7 +1392,9 @@ public class ResolverActivity extends Activity implements

    @Override // ResolverListCommunicator
    public void onHandlePackagesChanged() {
        if (mMultiProfilePagerAdapter.getActiveListAdapter().getCount() == 0) {
        ResolverListAdapter activeListAdapter = mMultiProfilePagerAdapter.getActiveListAdapter();
        activeListAdapter.rebuildList();
        if (activeListAdapter.getCount() == 0) {
            // We no longer have any items...  just finish the activity.
            finish();
        }
+0 −1
Original line number Diff line number Diff line
@@ -113,7 +113,6 @@ public class ResolverListAdapter extends BaseAdapter {
    }

    public void handlePackagesChanged() {
        rebuildList();
        mResolverListCommunicator.onHandlePackagesChanged();
    }