summaryrefslogtreecommitdiff
path: root/java/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com')
-rw-r--r--java/src/com/android/intentresolver/ResolverListAdapter.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/java/src/com/android/intentresolver/ResolverListAdapter.java b/java/src/com/android/intentresolver/ResolverListAdapter.java
index fc5514b6..f29553eb 100644
--- a/java/src/com/android/intentresolver/ResolverListAdapter.java
+++ b/java/src/com/android/intentresolver/ResolverListAdapter.java
@@ -404,14 +404,18 @@ public class ResolverListAdapter extends BaseAdapter {
);
} else {
mOtherProfile = null;
- try {
- mLastChosen = mResolverListController.getLastChosen();
- // TODO: does this also somehow need to update mLastChosenPosition? If so, maybe
- // the current method should also take responsibility for re-initializing
- // mLastChosenPosition, where it's currently done at the start of rebuildList()?
- // (Why is this related to the presence of mOtherProfile in fhe first place?)
- } catch (RemoteException re) {
- Log.d(TAG, "Error calling getLastChosenActivity\n" + re);
+ // If `mFilterLastUsed` is (`final`) false, we'll never read `mLastChosen`, so don't
+ // bother making the system query.
+ if (mFilterLastUsed) {
+ try {
+ mLastChosen = mResolverListController.getLastChosen();
+ // TODO: does this also somehow need to update mLastChosenPosition? If so, maybe
+ // the current method should also take responsibility for re-initializing
+ // mLastChosenPosition, where it's currently done at the start of rebuildList()?
+ // (Why is this related to the presence of mOtherProfile in fhe first place?)
+ } catch (RemoteException re) {
+ Log.d(TAG, "Error calling getLastChosenActivity\n" + re);
+ }
}
}
}