Merge pull request #1160 from bootstraponline/fix_activity_regex

Android packages may have underscores
This commit is contained in:
Jonathan Lipps
2013-09-13 09:58:28 -07:00

View File

@@ -1254,7 +1254,7 @@ ADB.prototype.getFocusedPackageAndActivity = function(cb) {
logger.info("Getting focused package and activity");
this.requireDeviceId();
var cmd = this.adbCmd + " shell dumpsys window windows"
, searchRe = new RegExp(/mFocusedApp.+ ([a-zA-Z0-9\.]+)\/(\.?[^\}]+)\}/);
, searchRe = new RegExp(/mFocusedApp.+ ([a-zA-Z0-9\._]+)\/(\.?[^\}]+)\}/);
exec(cmd, { maxBuffer: 524288 }, function(err, stdout) {
if (err) {