Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Jan 9, 2024
1 parent af495b1 commit e86a15a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/tools/settings-client-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ commands.isSettingsAppServiceRunningInForeground = async function isSettingsAppS

// The foreground service is available since api level 26,
// thus this method works only for api level 26+.

// 'dumpsys activity services <package>' had slightly better performance
// than 'dumpsys activity services' and parsing the foreground apps.
const output = await this.shell(['dumpsys', 'activity', 'services', SETTINGS_HELPER_ID]);
return output.includes(FOREGROUND_APP_KEYWORD);
};
Expand Down

0 comments on commit e86a15a

Please sign in to comment.