From 47008fe9e28288d5d6b68382c2690f78f64331e4 Mon Sep 17 00:00:00 2001 From: Jonathan Lipps Date: Fri, 30 May 2014 15:24:31 -0700 Subject: [PATCH] ensure we don't get extraneous bits when finding activity fix #2507 --- lib/devices/android/adb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/devices/android/adb.js b/lib/devices/android/adb.js index df4e91b63..29df4dc68 100644 --- a/lib/devices/android/adb.js +++ b/lib/devices/android/adb.js @@ -1203,7 +1203,7 @@ ADB.prototype.getFocusedPackageAndActivity = function (cb) { logger.info("Getting focused package and activity"); var cmd = "dumpsys window windows" , nullRe = new RegExp(/mFocusedApp=null/) - , searchRe = new RegExp(/mFocusedApp.+ ([a-zA-Z0-9\._]+)\/(\.?[^\} ]+).*\}/); + , searchRe = new RegExp(/mFocusedApp.+ ([a-zA-Z0-9\._]+)\/(\.?[^ ]+) /); this.shell(cmd, function (err, stdout) { if (err) return cb(err);