summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Wale Ogunwale <ogunwale@google.com> 2017-04-27 16:59:25 +0000
committer android-build-merger <android-build-merger@google.com> 2017-04-27 16:59:25 +0000
commit566db9e729f9cd6a8ad439d628aa5aebf4cec1cc (patch)
tree6434b11019efab49e97c1bf46071308af3f36795
parentd0af611b17d0155cc86673a0e2a2a95004a5f488 (diff)
parentfe938425438ae2148ae468aee198982dbc9c3184 (diff)
Merge "Use ActivityRecord.realActivity when comparing waiting visible" into oc-dev am: 039dcadc88
am: fe93842543 Change-Id: I8c18041e293f260695bdca4e62c8587df9c50491
-rw-r--r--services/core/java/com/android/server/am/ActivityStackSupervisor.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 83712a5ea5ad..654bfcf531a2 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -110,7 +110,6 @@ import android.app.ActivityManager.StackInfo;
import android.app.ActivityOptions;
import android.app.AppOpsManager;
import android.app.IActivityContainerCallback;
-import android.app.ITaskStackListener;
import android.app.ProfilerInfo;
import android.app.ResultInfo;
import android.app.StatusBarManager;
@@ -157,7 +156,6 @@ import android.provider.MediaStore;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.service.voice.IVoiceInteractionSession;
-import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.EventLog;
@@ -1129,7 +1127,7 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
mActivitiesWaitingForVisibleActivity.remove(r);
for (int i = mWaitingForActivityVisible.size() - 1; i >= 0; --i) {
- if (mWaitingForActivityVisible.get(i).matches(r)) {
+ if (mWaitingForActivityVisible.get(i).matches(r.realActivity)) {
mWaitingForActivityVisible.remove(i);
}
}
@@ -1143,7 +1141,7 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
boolean changed = false;
for (int i = mWaitingForActivityVisible.size() - 1; i >= 0; --i) {
final WaitInfo w = mWaitingForActivityVisible.get(i);
- if (w.matches(r)) {
+ if (w.matches(r.realActivity)) {
final WaitResult result = w.getResult();
changed = true;
result.timeout = false;
@@ -5128,10 +5126,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
this.mResult = result;
}
- public boolean matches(ActivityRecord record) {
- return mTargetComponent == null ||
- (TextUtils.equals(mTargetComponent.getPackageName(), record.info.packageName)
- && TextUtils.equals(mTargetComponent.getClassName(), record.info.name));
+ public boolean matches(ComponentName targetComponent) {
+ return mTargetComponent == null || mTargetComponent.equals(targetComponent);
}
public WaitResult getResult() {