Merge "Light greylist additions." into pi-dev
diff --git a/config/hiddenapi-light-greylist.txt b/config/hiddenapi-light-greylist.txt
index b6838ae..e2121dd 100644
--- a/config/hiddenapi-light-greylist.txt
+++ b/config/hiddenapi-light-greylist.txt
@@ -176,6 +176,7 @@
Landroid/app/backup/BackupHelperDispatcher$Header;->keyPrefix:Ljava/lang/String;
Landroid/app/backup/FullBackup;->backupToTar(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/backup/FullBackupDataOutput;)I
Landroid/app/backup/FullBackupDataOutput;->addSize(J)V
+Landroid/app/backup/FullBackupDataOutput;-><init>(Landroid/os/ParcelFileDescriptor;)V
Landroid/app/backup/FullBackupDataOutput;->mData:Landroid/app/backup/BackupDataOutput;
Landroid/app/ContentProviderHolder;->info:Landroid/content/pm/ProviderInfo;
Landroid/app/ContentProviderHolder;-><init>(Landroid/content/pm/ProviderInfo;)V
diff --git a/core/java/android/app/ActivityManagerInternal.java b/core/java/android/app/ActivityManagerInternal.java
index cab6744..2752fa9 100644
--- a/core/java/android/app/ActivityManagerInternal.java
+++ b/core/java/android/app/ActivityManagerInternal.java
@@ -69,6 +69,13 @@
AppProtoEnums.APP_TRANSITION_SNAPSHOT; // 4
/**
+ * Type for {@link #notifyAppTransitionStarting}: The transition was started because it was a
+ * recents animation and we only needed to wait on the wallpaper.
+ */
+ public static final int APP_TRANSITION_RECENTS_ANIM =
+ AppProtoEnums.APP_TRANSITION_RECENTS_ANIM; // 5
+
+ /**
* The bundle key to extract the assist data.
*/
public static final String ASSIST_KEY_DATA = "data";
diff --git a/core/java/android/app/StatsManager.java b/core/java/android/app/StatsManager.java
index b12e3bc..7325daa7 100644
--- a/core/java/android/app/StatsManager.java
+++ b/core/java/android/app/StatsManager.java
@@ -103,12 +103,12 @@
try {
IStatsManager service = getIStatsManagerLocked();
if (service == null) {
- if (DEBUG) Slog.d(TAG, "Failed to find statsd when adding configuration");
+ Slog.e(TAG, "Failed to find statsd when adding configuration");
return false;
}
return service.addConfiguration(configKey, config);
} catch (RemoteException e) {
- if (DEBUG) Slog.d(TAG, "Failed to connect to statsd when adding configuration");
+ Slog.e(TAG, "Failed to connect to statsd when adding configuration");
return false;
}
}
@@ -126,12 +126,12 @@
try {
IStatsManager service = getIStatsManagerLocked();
if (service == null) {
- if (DEBUG) Slog.d(TAG, "Failed to find statsd when removing configuration");
+ Slog.e(TAG, "Failed to find statsd when removing configuration");
return false;
}
return service.removeConfiguration(configKey);
} catch (RemoteException e) {
- if (DEBUG) Slog.d(TAG, "Failed to connect to statsd when removing configuration");
+ Slog.e(TAG, "Failed to connect to statsd when removing configuration");
return false;
}
}
@@ -173,7 +173,7 @@
try {
IStatsManager service = getIStatsManagerLocked();
if (service == null) {
- Slog.w(TAG, "Failed to find statsd when adding broadcast subscriber");
+ Slog.e(TAG, "Failed to find statsd when adding broadcast subscriber");
return false;
}
if (pendingIntent != null) {
@@ -184,7 +184,7 @@
return service.unsetBroadcastSubscriber(configKey, subscriberId);
}
} catch (RemoteException e) {
- Slog.w(TAG, "Failed to connect to statsd when adding broadcast subscriber", e);
+ Slog.e(TAG, "Failed to connect to statsd when adding broadcast subscriber", e);
return false;
}
}
@@ -210,7 +210,7 @@
try {
IStatsManager service = getIStatsManagerLocked();
if (service == null) {
- Slog.d(TAG, "Failed to find statsd when registering data listener.");
+ Slog.e(TAG, "Failed to find statsd when registering data listener.");
return false;
}
if (pendingIntent == null) {
@@ -222,7 +222,7 @@
}
} catch (RemoteException e) {
- Slog.d(TAG, "Failed to connect to statsd when registering data listener.");
+ Slog.e(TAG, "Failed to connect to statsd when registering data listener.");
return false;
}
}
@@ -241,12 +241,12 @@
try {
IStatsManager service = getIStatsManagerLocked();
if (service == null) {
- if (DEBUG) Slog.d(TAG, "Failed to find statsd when getting data");
+ Slog.e(TAG, "Failed to find statsd when getting data");
return null;
}
return service.getData(configKey);
} catch (RemoteException e) {
- if (DEBUG) Slog.d(TAG, "Failed to connecto statsd when getting data");
+ Slog.e(TAG, "Failed to connect to statsd when getting data");
return null;
}
}
@@ -265,12 +265,12 @@
try {
IStatsManager service = getIStatsManagerLocked();
if (service == null) {
- if (DEBUG) Slog.d(TAG, "Failed to find statsd when getting metadata");
+ Slog.e(TAG, "Failed to find statsd when getting metadata");
return null;
}
return service.getMetadata();
} catch (RemoteException e) {
- if (DEBUG) Slog.d(TAG, "Failed to connecto statsd when getting metadata");
+ Slog.e(TAG, "Failed to connect to statsd when getting metadata");
return null;
}
}
diff --git a/core/java/android/content/SyncResult.java b/core/java/android/content/SyncResult.java
index 4f86af9..f67d7f5 100644
--- a/core/java/android/content/SyncResult.java
+++ b/core/java/android/content/SyncResult.java
@@ -79,7 +79,17 @@
/**
* Used to indicate to the SyncManager that future sync requests that match the request's
- * Account and authority should be delayed at least this many seconds.
+ * Account and authority should be delayed until a time in seconds since Java epoch.
+ *
+ * <p>For example, if you want to delay the next sync for at least 5 minutes, then:
+ * <pre>
+ * result.delayUntil = (System.currentTimeMillis() / 1000) + 5 * 60;
+ * </pre>
+ *
+ * <p>By default, when a sync fails, the system retries later with an exponential back-off
+ * with the system default initial delay time, which always wins over {@link #delayUntil} --
+ * i.e. if the system back-off time is larger than {@link #delayUntil}, {@link #delayUntil}
+ * will essentially be ignored.
*/
public long delayUntil;
diff --git a/core/proto/android/app/enums.proto b/core/proto/android/app/enums.proto
index 5eb05be..1754e42 100644
--- a/core/proto/android/app/enums.proto
+++ b/core/proto/android/app/enums.proto
@@ -32,6 +32,9 @@
APP_TRANSITION_TIMEOUT = 3;
// The transition was started because of a we drew a task snapshot.
APP_TRANSITION_SNAPSHOT = 4;
+ // The transition was started because it was a recents animation and we only needed to wait on
+ // the wallpaper.
+ APP_TRANSITION_RECENTS_ANIM = 5;
}
// ActivityManager.java PROCESS_STATEs
diff --git a/packages/CaptivePortalLogin/AndroidManifest.xml b/packages/CaptivePortalLogin/AndroidManifest.xml
index f21fd88..69fbb99 100644
--- a/packages/CaptivePortalLogin/AndroidManifest.xml
+++ b/packages/CaptivePortalLogin/AndroidManifest.xml
@@ -23,7 +23,8 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" />
- <application android:label="@string/app_name" >
+ <application android:label="@string/app_name"
+ android:usesCleartextTraffic="true">
<activity
android:name="com.android.captiveportallogin.CaptivePortalLoginActivity"
android:label="@string/action_bar_label"
diff --git a/packages/CarrierDefaultApp/AndroidManifest.xml b/packages/CarrierDefaultApp/AndroidManifest.xml
index 1cd7b61..824d9f4 100644
--- a/packages/CarrierDefaultApp/AndroidManifest.xml
+++ b/packages/CarrierDefaultApp/AndroidManifest.xml
@@ -29,7 +29,8 @@
<application
android:label="@string/app_name"
- android:directBootAware="true">
+ android:directBootAware="true"
+ android:usesCleartextTraffic="true">
<receiver android:name="com.android.carrierdefaultapp.CarrierDefaultBroadcastReceiver">
<intent-filter>
<action android:name="com.android.internal.telephony.CARRIER_SIGNAL_REDIRECTED" />
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index e77db82..fe785c2 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -887,13 +887,13 @@
<string name="power_remaining_duration_only_short"><xliff:g id="time">%1$s</xliff:g> left</string>
<!-- [CHAR_LIMIT=100] Label for enhanced estimated time that phone will run out of battery -->
- <string name="power_discharge_by_enhanced">Will last until about <xliff:g id="time">%1$s</xliff:g> based on your usage (<xliff:g id="level">%2$s</xliff:g>)</string>
+ <string name="power_discharge_by_enhanced">Should last until about <xliff:g id="time">%1$s</xliff:g> based on your usage (<xliff:g id="level">%2$s</xliff:g>)</string>
<!-- [CHAR_LIMIT=100] Label for enhanced estimated time that phone will run out of battery with no percentage -->
- <string name="power_discharge_by_only_enhanced">Will last until about <xliff:g id="time">%1$s</xliff:g> based on your usage</string>
+ <string name="power_discharge_by_only_enhanced">Should last until about <xliff:g id="time">%1$s</xliff:g> based on your usage</string>
<!-- [CHAR_LIMIT=100] Label for estimated time that phone will run out of battery -->
- <string name="power_discharge_by">Will last until about <xliff:g id="time">%1$s</xliff:g> (<xliff:g id="level">%2$s</xliff:g>)</string>
+ <string name="power_discharge_by">Should last until about <xliff:g id="time">%1$s</xliff:g> (<xliff:g id="level">%2$s</xliff:g>)</string>
<!-- [CHAR_LIMIT=100] Label for estimated time that phone will run out of battery -->
- <string name="power_discharge_by_only">Will last until about <xliff:g id="time">%1$s</xliff:g></string>
+ <string name="power_discharge_by_only">Should last until about <xliff:g id="time">%1$s</xliff:g></string>
<!-- [CHAR_LIMIT=60] label for estimated remaining duration of battery when under a certain amount -->
<string name="power_remaining_less_than_duration_only">Less than <xliff:g id="threshold">%1$s</xliff:g> remaining</string>
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/PowerUtilTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/PowerUtilTest.java
index 5758467..c11687b 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/PowerUtilTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/PowerUtilTest.java
@@ -40,7 +40,7 @@
public static final long TEN_MINUTES_MILLIS = Duration.ofMinutes(10).toMillis();
public static final long THREE_DAYS_MILLIS = Duration.ofDays(3).toMillis();
public static final long THIRTY_HOURS_MILLIS = Duration.ofHours(30).toMillis();
- public static final String NORMAL_CASE_EXPECTED_PREFIX = "Will last until about";
+ public static final String NORMAL_CASE_EXPECTED_PREFIX = "Should last until about";
public static final String ENHANCED_SUFFIX = " based on your usage";
// matches a time (ex: '1:15 PM', '2 AM')
public static final String TIME_OF_DAY_REGEX = " (\\d)+:?(\\d)* (AM)|(PM)";
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 1db9050..bf3fa29 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -2152,8 +2152,14 @@
been identified for them as running). [CHAR LIMIT=NONE] -->
<string name="running_foreground_services_msg">Tap for details on battery and data usage</string>
- <!-- Prompt to turn off data usage [CHAR LIMIT=NONE] -->
- <string name="data_usage_disable_mobile" msgid="8656552431969276305">Turn off mobile data?</string>
+ <!-- Title of the dialog to turn off data usage [CHAR LIMIT=NONE] -->
+ <string name="mobile_data_disable_title">Turn off mobile data?</string>
+
+ <!-- Message body of the dialog to turn off data usage [CHAR LIMIT=NONE] -->
+ <string name="mobile_data_disable_message">You won\’t have access to data or the internet through <xliff:g id="carrier" example="T-Mobile">%s</xliff:g>. Internet will only be available via Wi-Fi.</string>
+
+ <!-- Text used to refer to the user's current carrier in mobile_data_disable_message if the users's mobile network carrier name is not available [CHAR LIMIT=NONE] -->
+ <string name="mobile_data_disable_message_default_carrier">your carrier</string>
<!-- Warning shown when user input has been blocked due to another app overlaying screen
content. Since we don't know what the app is showing on top of the input target, we
diff --git a/packages/SystemUI/src/com/android/systemui/Prefs.java b/packages/SystemUI/src/com/android/systemui/Prefs.java
index 396d317..1a9655e 100644
--- a/packages/SystemUI/src/com/android/systemui/Prefs.java
+++ b/packages/SystemUI/src/com/android/systemui/Prefs.java
@@ -52,7 +52,8 @@
Key.SEEN_MULTI_USER,
Key.NUM_APPS_LAUNCHED,
Key.HAS_SEEN_RECENTS_ONBOARDING,
- Key.SEEN_RINGER_GUIDANCE_COUNT
+ Key.SEEN_RINGER_GUIDANCE_COUNT,
+ Key.QS_HAS_TURNED_OFF_MOBILE_DATA
})
public @interface Key {
@Deprecated
@@ -89,6 +90,7 @@
String HAS_SEEN_RECENTS_ONBOARDING = "HasSeenRecentsOnboarding";
String SEEN_RINGER_GUIDANCE_COUNT = "RingerGuidanceCount";
String QS_TILE_SPECS_REVEALED = "QsTileSpecsRevealed";
+ String QS_HAS_TURNED_OFF_MOBILE_DATA = "QsHasTurnedOffMobileData";
}
public static boolean getBoolean(Context context, @Key String key, boolean defaultValue) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
index b7a64e1..2abe9d9 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
@@ -16,6 +16,8 @@
package com.android.systemui.qs.tiles;
+import static com.android.systemui.Prefs.Key.QS_HAS_TURNED_OFF_MOBILE_DATA;
+
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.Context;
@@ -34,8 +36,8 @@
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settingslib.net.DataUsageController;
import com.android.systemui.Dependency;
+import com.android.systemui.Prefs;
import com.android.systemui.R;
-import com.android.systemui.R.string;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.qs.DetailAdapter;
import com.android.systemui.plugins.qs.QSIconView;
@@ -108,7 +110,11 @@
if (mKeyguardMonitor.isSecure() && !mKeyguardMonitor.canSkipBouncer()) {
mActivityStarter.postQSRunnableDismissingKeyguard(this::showDisableDialog);
} else {
- mUiHandler.post(this::showDisableDialog);
+ if (Prefs.getBoolean(mContext, QS_HAS_TURNED_OFF_MOBILE_DATA, false)) {
+ mDataController.setMobileDataEnabled(false);
+ } else {
+ mUiHandler.post(this::showDisableDialog);
+ }
}
} else {
mDataController.setMobileDataEnabled(true);
@@ -117,12 +123,20 @@
private void showDisableDialog() {
mHost.collapsePanels();
+ String carrierName = mController.getMobileDataNetworkName();
+ if (TextUtils.isEmpty(carrierName)) {
+ carrierName = mContext.getString(R.string.mobile_data_disable_message_default_carrier);
+ }
AlertDialog dialog = new Builder(mContext)
- .setMessage(string.data_usage_disable_mobile)
+ .setTitle(R.string.mobile_data_disable_title)
+ .setMessage(mContext.getString(R.string.mobile_data_disable_message, carrierName))
.setNegativeButton(android.R.string.cancel, null)
.setPositiveButton(
com.android.internal.R.string.alert_windows_notification_turn_off_action,
- (d, w) -> mDataController.setMobileDataEnabled(false))
+ (d, w) -> {
+ mDataController.setMobileDataEnabled(false);
+ Prefs.putBoolean(mContext, QS_HAS_TURNED_OFF_MOBILE_DATA, true);
+ })
.create();
dialog.getWindow().setType(LayoutParams.TYPE_KEYGUARD_DIALOG);
SystemUIDialog.setShowForAllUsers(dialog, true);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index 9eee906..76e3ad7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -36,6 +36,7 @@
AccessPointController getAccessPointController();
DataUsageController getMobileDataController();
DataSaverController getDataSaverController();
+ String getMobileDataNetworkName();
boolean hasVoiceCallingFeature();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
index 2258fa2..779b0fb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -308,6 +308,7 @@
return mDefaultSignalController;
}
+ @Override
public String getMobileDataNetworkName() {
MobileSignalController controller = getDataController();
return controller != null ? controller.getState().networkNameData : "";
diff --git a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeNetworkController.java b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeNetworkController.java
index 64fe8dd..5385f6d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeNetworkController.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeNetworkController.java
@@ -88,4 +88,9 @@
public void dispatchDemoCommand(String command, Bundle args) {
}
+
+ @Override
+ public String getMobileDataNetworkName() {
+ return "";
+ }
}
diff --git a/services/core/java/com/android/server/am/ActivityMetricsLogger.java b/services/core/java/com/android/server/am/ActivityMetricsLogger.java
index 352b757..724dd3f 100644
--- a/services/core/java/com/android/server/am/ActivityMetricsLogger.java
+++ b/services/core/java/com/android/server/am/ActivityMetricsLogger.java
@@ -299,7 +299,7 @@
final boolean otherWindowModesLaunching =
mWindowingModeTransitionInfo.size() > 0 && info == null;
- if ((resultCode < 0 || launchedActivity == null || !processSwitch
+ if ((!isLoggableResultCode(resultCode) || launchedActivity == null || !processSwitch
|| windowingMode == WINDOWING_MODE_UNDEFINED) && !otherWindowModesLaunching) {
// Failed to launch or it was not a process switch, so we don't care about the timing.
@@ -322,6 +322,14 @@
}
/**
+ * @return True if we should start logging an event for an activity start that returned
+ * {@code resultCode} and that we'll indeed get a windows drawn event.
+ */
+ private boolean isLoggableResultCode(int resultCode) {
+ return resultCode == START_SUCCESS || resultCode == START_TASK_TO_FRONT;
+ }
+
+ /**
* Notifies the tracker that all windows of the app have been drawn.
*/
void notifyWindowsDrawn(int windowingMode, long timestamp) {
diff --git a/services/core/java/com/android/server/am/RecentsAnimation.java b/services/core/java/com/android/server/am/RecentsAnimation.java
index 9121568..da56ffd 100644
--- a/services/core/java/com/android/server/am/RecentsAnimation.java
+++ b/services/core/java/com/android/server/am/RecentsAnimation.java
@@ -16,6 +16,7 @@
package com.android.server.am;
+import static android.app.ActivityManager.START_TASK_TO_FRONT;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION;
@@ -95,6 +96,8 @@
}
}
+ mStackSupervisor.getActivityMetricsLogger().notifyActivityLaunching();
+
mService.setRunningRemoteAnimation(mCallingPid, true);
mWindowManager.deferSurfaceLayout();
@@ -143,6 +146,9 @@
// If we updated the launch-behind state, update the visibility of the activities after
// we fetch the visible tasks to be controlled by the animation
mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, PRESERVE_WINDOWS);
+
+ mStackSupervisor.getActivityMetricsLogger().notifyActivityLaunched(START_TASK_TO_FRONT,
+ homeActivity);
} finally {
mWindowManager.continueSurfaceLayout();
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
diff --git a/services/core/java/com/android/server/wm/RecentsAnimationController.java b/services/core/java/com/android/server/wm/RecentsAnimationController.java
index 0b0df6f..3e72a71 100644
--- a/services/core/java/com/android/server/wm/RecentsAnimationController.java
+++ b/services/core/java/com/android/server/wm/RecentsAnimationController.java
@@ -16,13 +16,16 @@
package com.android.server.wm;
+import static android.app.ActivityManagerInternal.APP_TRANSITION_RECENTS_ANIM;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
+import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
import static android.view.RemoteAnimationTarget.MODE_CLOSING;
import static android.view.WindowManager.INPUT_CONSUMER_RECENTS_ANIMATION;
import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
+import static com.android.server.wm.WindowManagerService.H.NOTIFY_APP_TRANSITION_STARTING;
import static com.android.server.wm.proto.RemoteAnimationAdapterWrapperProto.TARGET;
import static com.android.server.wm.proto.AnimationAdapterProto.REMOTE;
@@ -37,6 +40,7 @@
import android.util.Log;
import android.util.Slog;import android.util.proto.ProtoOutputStream;
import android.util.SparseBooleanArray;
+import android.util.SparseIntArray;
import android.util.proto.ProtoOutputStream;
import android.view.IRecentsAnimationController;
import android.view.IRecentsAnimationRunner;
@@ -279,6 +283,10 @@
} catch (RemoteException e) {
Slog.e(TAG, "Failed to start recents animation", e);
}
+ final SparseIntArray reasons = new SparseIntArray();
+ reasons.put(WINDOWING_MODE_FULLSCREEN, APP_TRANSITION_RECENTS_ANIM);
+ mService.mH.obtainMessage(NOTIFY_APP_TRANSITION_STARTING,
+ reasons).sendToTarget();
}
void cancelAnimation() {
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/MockUtils.java b/services/tests/servicestests/src/com/android/server/devicepolicy/MockUtils.java
index 92ea766..17e5832 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/MockUtils.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/MockUtils.java
@@ -22,6 +22,7 @@
import android.content.ComponentName;
import android.content.Intent;
+import android.os.BaseBundle;
import android.os.Bundle;
import android.os.UserHandle;
import android.util.ArraySet;
@@ -92,7 +93,10 @@
public boolean matches(Object item) {
if (item == null) return false;
if (!intent.filterEquals((Intent) item)) return false;
- return intent.getExtras().kindofEquals(((Intent) item).getExtras());
+ BaseBundle extras = intent.getExtras();
+ BaseBundle itemExtras = ((Intent) item).getExtras();
+ return (extras == itemExtras) || (extras != null &&
+ extras.kindofEquals(itemExtras));
}
@Override
public void describeTo(Description description) {
diff --git a/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java b/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java
index ccde049..4f49a4a 100644
--- a/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java
@@ -33,7 +33,6 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import android.support.test.filters.FlakyTest;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -302,7 +301,6 @@
}
@Test
- @FlakyTest(bugId = 37908381)
public void testFocusedWindowMultipleDisplays() throws Exception {
// Create a focusable window and check that focus is calculated correctly
final WindowState window1 =