Disable USB connection type when monkeys are running.
Bug: 5375336 Also use the correct API for testing if monkeys are running. (ActivityManager.isUserAMonkey()) Bug: 5375910 Change-Id: I2bf8e061ee5977d521de197d3a92095c1a98218d
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.settings;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
@@ -278,7 +279,7 @@ public class Utils {
|
||||
* Returns true if Monkey is running.
|
||||
*/
|
||||
public static boolean isMonkeyRunning() {
|
||||
return SystemProperties.getBoolean("ro.monkey", false);
|
||||
return ActivityManager.isUserAMonkey();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user