Skip to content

Commit

Permalink
Revert to commit b475563
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Kennedy committed Apr 5, 2018
1 parent 286e693 commit eeaa529
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@
/src/assets/theme/
/src/distriqtkey/
/widget/
/widget_treatments/
/widget_watch/
.actionScriptProperties
.project
4 changes: 2 additions & 2 deletions .settings/FlexPrettyPrintCommand.prefs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Thu Mar 29 12:36:21 GMT+00:00 2018
#Sun Feb 11 03:46:48 GMT+00:00 2018
ASRearr_AddDefaultHeaderForProperties=1
ASRearr_AddDefaultHeaderForStaticProperties=1
ASRearr_BlankLinesBeforeElement=
Expand Down Expand Up @@ -28,7 +28,7 @@ ASRearr_ModifierOrder_Property=<Namespace>,override,native,public,private,protec
ASRearr_MoveImportsOutsideClass=true
ASRearr_RemoveExistingCopyrightHeaders=false
ASRearr_RemoveExistingSectionHeaders=false
ASRearr_SectionHeaderMap=\#\n\#Thu Mar 29 12\:36\:21 GMT+00\:00 2018\n
ASRearr_SectionHeaderMap=\#\n\#Sun Feb 11 03\:46\:48 GMT+00\:00 2018\n
ASRearr_SortGettersAndSettersWithAssociatedProperties=true
ASRearr_SortGettersAndSettersWithAssociatedStaticProperties=true
ASRearr_UseCopyrightGeneration=false
Expand Down
Binary file added src/Assets.car
Binary file not shown.
3 changes: 2 additions & 1 deletion src/Spike-app.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@

<!-- iOS specific capabilities -->
<iPhone>
<!--<assetsCar>Assets.car</assetsCar>-->
<assetsCar>Assets.car</assetsCar>
<!-- A list of plist key/value pairs to be added to the application Info.plist -->
<InfoAdditions>
<![CDATA[<key>UIViewControllerBasedStatusBarAppearance</key><false/>]]>
Expand Down Expand Up @@ -506,6 +506,7 @@
<extensionID>com.distriqt.BluetoothLE</extensionID>
<extensionID>com.distriqt.Calendar</extensionID>
<extensionID>com.distriqt.Core</extensionID>
<extensionID>com.distriqt.Exceptions</extensionID>
<extensionID>com.distriqt.NetworkInfo</extensionID>
<extensionID>com.distriqt.Notifications</extensionID>
<extensionID>com.freshplanet.AirBackgroundFetch</extensionID>
Expand Down
17 changes: 11 additions & 6 deletions src/Spike.as
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ package
import flash.net.URLVariables;
import flash.system.System;
import flash.utils.clearInterval;
import flash.utils.getTimer;
import flash.utils.setTimeout;

import mx.utils.ObjectUtil;
Expand All @@ -37,6 +38,7 @@ package
private var starling:Starling;
private var scaler:ScreenDensityScaleFactorManager;
private var timeoutID:int = -1;
private var deactivationTimer:Number;

private static var _instance:Spike;

Expand Down Expand Up @@ -161,12 +163,12 @@ package
//Push Chart Screen
/*if(AppInterface.instance.navigator != null)
{
var nowTimer:Number = getTimer();
if(AppInterface.instance.navigator.activeScreenID != Screens.GLUCOSE_CHART && nowTimer - deactivationTimer > 5 * 60 * 1000)
{
AppInterface.instance.menu.selectedIndex = 0;
AppInterface.instance.navigator.replaceScreen(Screens.GLUCOSE_CHART, Fade.createCrossfadeTransition(1.5));
}
var nowTimer:Number = getTimer();
if(AppInterface.instance.navigator.activeScreenID != Screens.GLUCOSE_CHART && nowTimer - deactivationTimer > 5 * 60 * 1000)
{
AppInterface.instance.menu.selectedIndex = 0;
AppInterface.instance.navigator.replaceScreen(Screens.GLUCOSE_CHART, Fade.createCrossfadeTransition(1.5));
}
}*/

//Update Variables
Expand All @@ -193,6 +195,9 @@ package
//Notify Services
myTrace("dispatching event SpikeEvent.APP_IN_BACKGROUND");
instance.dispatchEvent(new SpikeEvent(SpikeEvent.APP_IN_BACKGROUND));

//Update timer
deactivationTimer = getTimer();
}

/**
Expand Down
6 changes: 0 additions & 6 deletions src/services/DeepSleepService.as
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ package services

import events.SettingsServiceEvent;

import starling.core.Starling;

import utils.Constants;
import utils.Trace;

Expand Down Expand Up @@ -143,10 +141,6 @@ package services

private static function playSound():void
{
//Safeguard for starling
if (!BackgroundFetch.appIsInForeground())
Starling.current.stop( true );

if (!BackgroundFetch.isPlayingSound() && !Constants.appInForeground && !BackgroundFetch.appIsInForeground()) //No need to play if the app is in the foregorund
{
var nowDate:Date = new Date();
Expand Down
20 changes: 11 additions & 9 deletions src/ui/InterfaceController.as
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ package ui
import com.adobe.touch3D.Touch3DEvent;
import com.distriqt.extension.bluetoothle.BluetoothLE;
import com.distriqt.extension.bluetoothle.events.PeripheralEvent;
//import com.distriqt.extension.networkinfo.NetworkInfo;
import com.distriqt.extension.exceptions.ExceptionReport;
import com.distriqt.extension.exceptions.Exceptions;
import com.distriqt.extension.networkinfo.NetworkInfo;
import com.distriqt.extension.notifications.Notifications;
import com.freshplanet.ane.AirBackgroundFetch.BackgroundFetch;

import flash.events.Event;
import flash.events.EventDispatcher;
//import flash.net.URLLoader;
//import flash.net.URLVariables;
import flash.net.URLLoader;
import flash.net.URLVariables;
import flash.system.Capabilities;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
//import flash.utils.ByteArray;
import flash.utils.ByteArray;

import spark.formatters.DateTimeFormatter;

Expand All @@ -36,7 +38,7 @@ package ui

import model.ModelLocator;

//import network.EmailSender;
import network.EmailSender;

import services.BluetoothService;
import services.CalibrationService;
Expand Down Expand Up @@ -125,13 +127,13 @@ package ui
BluetoothService.instance.addEventListener(BlueToothServiceEvent.BLUETOOTH_SERVICE_INITIATED, blueToothServiceInitiated);

//Exceptions Management
/*Exceptions.service.setUncaughtExceptionHandler();
Exceptions.service.setUncaughtExceptionHandler();

if (Exceptions.service.hasPendingException())
{
Trace.myTrace("interfaceController.as", "A crash has ocurred. Notifying user...");
//Starling.juggler.delayCall(manageExceptions, 5);
}*/
}

//3D Touch Management
setup3DTouch();
Expand Down Expand Up @@ -202,7 +204,7 @@ package ui
}
}

/*private static function manageExceptions():void
private static function manageExceptions():void
{
AlertManager.showActionAlert
(
Expand Down Expand Up @@ -271,7 +273,7 @@ package ui
else
Trace.myTrace("interfaceController.as", "Error sending crash report! Error: " + response.statuscode);
}
}*/
}

private static function setup3DTouch():void
{
Expand Down

0 comments on commit eeaa529

Please sign in to comment.