Loading core/java/com/android/internal/app/ChooserActivity.java +2 −2 Original line number Diff line number Diff line Loading @@ -1226,9 +1226,9 @@ public class ChooserActivity extends ResolverActivity implements } @Override protected boolean rebuildList() { protected boolean postRebuildList(boolean rebuildCompleted) { mChooserListAdapter = (ChooserListAdapter) mAdapter; return rebuildListInternal(); return postRebuildListInternal(rebuildCompleted); } @Override Loading core/java/com/android/internal/app/ResolverActivity.java +16 −10 Original line number Diff line number Diff line Loading @@ -328,9 +328,8 @@ public class ResolverActivity extends Activity implements boolean filterLastUsed = mSupportsAlwaysUseOption && !isVoiceInteraction(); mAdapter = createAdapter(this, mIntents, initialIntents, rList, filterLastUsed, mUseLayoutForBrowsables); configureContentView(); if (rebuildList()) { if (configureContentView()) { return; } Loading Loading @@ -1063,11 +1062,13 @@ public class ResolverActivity extends Activity implements /** * Sets up the content view. * @return <code>true</code> if the activity is finishing and creation should halt. */ private void configureContentView() { private boolean configureContentView() { if (mAdapter == null) { throw new IllegalStateException("mAdapter cannot be null."); } boolean rebuildCompleted = mAdapter.rebuildList(); if (useLayoutWithDefault()) { mLayoutId = R.layout.resolver_list_with_default; } else { Loading @@ -1075,21 +1076,26 @@ public class ResolverActivity extends Activity implements } setContentView(mLayoutId); mAdapterView = findViewById(R.id.resolver_list); return postRebuildList(rebuildCompleted); } /** * Returns true if the activity is finishing and creation should halt. * </p>Subclasses must call rebuildListInternal at the end of rebuildList. * Finishing procedures to be performed after the list has been rebuilt. * </p>Subclasses must call postRebuildListInternal at the end of postRebuildList. * @param rebuildCompleted * @return <code>true</code> if the activity is finishing and creation should halt. */ protected boolean rebuildList() { return rebuildListInternal(); protected boolean postRebuildList(boolean rebuildCompleted) { return postRebuildListInternal(rebuildCompleted); } /** * Returns true if the activity is finishing and creation should halt. * Finishing procedures to be performed after the list has been rebuilt. * @param rebuildCompleted * @return <code>true</code> if the activity is finishing and creation should halt. */ final boolean rebuildListInternal() { boolean rebuildCompleted = mAdapter.rebuildList(); final boolean postRebuildListInternal(boolean rebuildCompleted) { int count = mAdapter.getUnfilteredCount(); // We only rebuild asynchronously when we have multiple elements to sort. In the case where Loading Loading
core/java/com/android/internal/app/ChooserActivity.java +2 −2 Original line number Diff line number Diff line Loading @@ -1226,9 +1226,9 @@ public class ChooserActivity extends ResolverActivity implements } @Override protected boolean rebuildList() { protected boolean postRebuildList(boolean rebuildCompleted) { mChooserListAdapter = (ChooserListAdapter) mAdapter; return rebuildListInternal(); return postRebuildListInternal(rebuildCompleted); } @Override Loading
core/java/com/android/internal/app/ResolverActivity.java +16 −10 Original line number Diff line number Diff line Loading @@ -328,9 +328,8 @@ public class ResolverActivity extends Activity implements boolean filterLastUsed = mSupportsAlwaysUseOption && !isVoiceInteraction(); mAdapter = createAdapter(this, mIntents, initialIntents, rList, filterLastUsed, mUseLayoutForBrowsables); configureContentView(); if (rebuildList()) { if (configureContentView()) { return; } Loading Loading @@ -1063,11 +1062,13 @@ public class ResolverActivity extends Activity implements /** * Sets up the content view. * @return <code>true</code> if the activity is finishing and creation should halt. */ private void configureContentView() { private boolean configureContentView() { if (mAdapter == null) { throw new IllegalStateException("mAdapter cannot be null."); } boolean rebuildCompleted = mAdapter.rebuildList(); if (useLayoutWithDefault()) { mLayoutId = R.layout.resolver_list_with_default; } else { Loading @@ -1075,21 +1076,26 @@ public class ResolverActivity extends Activity implements } setContentView(mLayoutId); mAdapterView = findViewById(R.id.resolver_list); return postRebuildList(rebuildCompleted); } /** * Returns true if the activity is finishing and creation should halt. * </p>Subclasses must call rebuildListInternal at the end of rebuildList. * Finishing procedures to be performed after the list has been rebuilt. * </p>Subclasses must call postRebuildListInternal at the end of postRebuildList. * @param rebuildCompleted * @return <code>true</code> if the activity is finishing and creation should halt. */ protected boolean rebuildList() { return rebuildListInternal(); protected boolean postRebuildList(boolean rebuildCompleted) { return postRebuildListInternal(rebuildCompleted); } /** * Returns true if the activity is finishing and creation should halt. * Finishing procedures to be performed after the list has been rebuilt. * @param rebuildCompleted * @return <code>true</code> if the activity is finishing and creation should halt. */ final boolean rebuildListInternal() { boolean rebuildCompleted = mAdapter.rebuildList(); final boolean postRebuildListInternal(boolean rebuildCompleted) { int count = mAdapter.getUnfilteredCount(); // We only rebuild asynchronously when we have multiple elements to sort. In the case where Loading