Skip to content

Commit

Permalink
fix: Allow comma as separator when checking permissions via adb
Browse files Browse the repository at this point in the history
The separator between permission name and "granted=true" is a comma on older Android versions. Verified on Samsung Galaxy S5 (original ROM).
  • Loading branch information
M-Reimer authored and Rob--W committed May 2, 2019
1 parent f0e8e53 commit f187d76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util/adb.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ export default class ADBUtils {
// Set to true the required permissions that have been granted.
for (const line of pmDumpLogs) {
for (const perm of permissions) {
if (line.includes(`${perm}: granted=true`)) {
if (line.includes(`${perm}: granted=true`) ||
line.includes(`${perm}, granted=true`)) {
permissionsMap[perm] = true;
}
}
Expand Down

0 comments on commit f187d76

Please sign in to comment.