mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
location and unit tests updates
This commit is contained in:
@ -285,15 +285,6 @@ export class TKConsole {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public trace(): void {
|
public trace(): void {
|
||||||
// unsless we have a proper way to get the target OS this cannot be used
|
|
||||||
// currently this introduced a console <=> application cyclic dependency
|
|
||||||
|
|
||||||
//this._nativeClass.log('=== trace(): JS stack ===')
|
|
||||||
// if (i.TargetOS.Android == targetOS) {
|
|
||||||
// var e = <any>new Error('console.trace()');
|
|
||||||
// this.log(e.stack);
|
|
||||||
//}
|
|
||||||
//else if (i.TargetOS.iOS == targetOS) {
|
|
||||||
var callstack = [];
|
var callstack = [];
|
||||||
var currentFunction = arguments.callee.caller;
|
var currentFunction = arguments.callee.caller;
|
||||||
while (currentFunction) {
|
while (currentFunction) {
|
||||||
@ -306,7 +297,6 @@ export class TKConsole {
|
|||||||
currentFunction = currentFunction.caller;
|
currentFunction = currentFunction.caller;
|
||||||
this.log(callstack.join('\n'));
|
this.log(callstack.join('\n'));
|
||||||
}
|
}
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public dump(obj: any): void {
|
public dump(obj: any): void {
|
||||||
|
@ -154,7 +154,7 @@ export class LocationManager {
|
|||||||
var it = providers.iterator();
|
var it = providers.iterator();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
var element = it.next();
|
var element = it.next();
|
||||||
console.log('found provider: ' + element);
|
//console.log('found provider: ' + element);
|
||||||
var location = this.androidLocationManager.getLastKnownLocation(element);
|
var location = this.androidLocationManager.getLastKnownLocation(element);
|
||||||
if (location) {
|
if (location) {
|
||||||
return LocationManager.locationFromAndroidLocation(location);
|
return LocationManager.locationFromAndroidLocation(location);
|
||||||
|
@ -85,7 +85,7 @@ export class LocationManager {
|
|||||||
|
|
||||||
implementation: {
|
implementation: {
|
||||||
locationManagerDidUpdateLocations: function (manager, locations) {
|
locationManagerDidUpdateLocations: function (manager, locations) {
|
||||||
console.log('location received: ' + locations.count());
|
//console.log('location received: ' + locations.count());
|
||||||
for (var i = 0; i < locations.count(); i++) {
|
for (var i = 0; i < locations.count(); i++) {
|
||||||
this.onLocation(LocationManager.locationFromCLLocation(locations.objectAtIndex(i)));
|
this.onLocation(LocationManager.locationFromCLLocation(locations.objectAtIndex(i)));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user