From 4214c53f3ce0038a040a464cfe8dc1505e5a2310 Mon Sep 17 00:00:00 2001 From: Jan Mekota Date: Sun, 2 May 2021 11:08:15 +0200 Subject: [PATCH] Add shortcut for showing device google accounts --- res/app/control-panes/dashboard/shell/shell-controller.js | 4 ++++ res/app/control-panes/dashboard/shell/shell.pug | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/res/app/control-panes/dashboard/shell/shell-controller.js b/res/app/control-panes/dashboard/shell/shell-controller.js index 38ec4b1843..38437d869c 100644 --- a/res/app/control-panes/dashboard/shell/shell-controller.js +++ b/res/app/control-panes/dashboard/shell/shell-controller.js @@ -87,6 +87,10 @@ module.exports = function ShellCtrl($scope) { $scope.$digest() }) } + + $scope.runGetGoogleAccounts = function() { + $scope.run('dumpsys content 2>/dev/null | sed -n \"s/^Account \\([^ ]*\\) .*com.google\\$/\\1/p\"') + } // WANDERA CUSTOM - END $scope.clear = function() { diff --git a/res/app/control-panes/dashboard/shell/shell.pug b/res/app/control-panes/dashboard/shell/shell.pug index 9fe260b3d2..04d0bb726f 100644 --- a/res/app/control-panes/dashboard/shell/shell.pug +++ b/res/app/control-panes/dashboard/shell/shell.pug @@ -53,6 +53,13 @@ uib-tooltip='{{ "window_animation_scale 1, transition_animation_scale 1, animator_duration_scale 1" | translate }}') i.fa.fa-play span(translate) Enable Animations + + .clearfix + + button.btn.btn-xs.btn-info-outline(ng-click='runGetGoogleAccounts()', + uib-tooltip='{{ "Show device google accounts" | translate }}') + i.fa.fa-list + span(translate) Device google accounts // NOTE: autofill doesn't work here form(method='post', enable-autofill, ng-submit='run(command)')