-Added battery info to the device list.

-Added App panel for opening common apps.
This commit is contained in:
Gunther Brunner
2014-05-01 22:06:48 +09:00
parent a819fc980a
commit cceded14c2
7 changed files with 74 additions and 5 deletions

View File

@@ -0,0 +1,34 @@
module.exports = function ShellCtrl($scope, gettext) {
// TODO: implement multiple devices
// $scope.results = []
$scope.result = null
$scope.referenceUrl = 'https://github.com/jackpal/Android-Terminal-Emulator/wiki/Android-Shell-Command-Reference'
$scope.run = function(command) {
if (command === 'clear') {
$scope.clear()
return
}
$scope.command = ''
return $scope.control.shell(command)
.progressed(function(result) {
$scope.result = result
$scope.data = result.data.join('')
$scope.$digest()
})
.then(function(result) {
$scope.result = result
$scope.data = result.data.join('')
$scope.$digest()
})
}
$scope.clear = function () {
$scope.command = ''
$scope.data = ''
$scope.result = null
}
}