mirror of
https://github.com/appium/appium.git
synced 2026-01-25 03:38:52 -06:00
Merge pull request #1160 from bootstraponline/fix_activity_regex
Android packages may have underscores
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user