mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 00:33:30 +02:00
18 lines
460 B
JavaScript
18 lines
460 B
JavaScript
module.exports = function RemoteDebugCtrl($scope, $timeout) {
|
|
function startRemoteConnect() {
|
|
$scope.control.startRemoteConnect().then(function (result) {
|
|
var url = result.lastData
|
|
$scope.$apply(function () {
|
|
$scope.debugCommand = 'adb connect ' + url
|
|
})
|
|
})
|
|
}
|
|
|
|
// TODO: Remove timeout and fix control initialization
|
|
if ($scope.control) {
|
|
startRemoteConnect()
|
|
} else {
|
|
$timeout(startRemoteConnect, 200)
|
|
}
|
|
}
|