#! /usr/bin/env python
# -*- encoding: euc-kr -*-

# KA:  [20070622]  MMI reponse speed UP in 3800
import os
#os.system('schedtool -R -p 1 `pidof python VDCIApp`')
# KA:  [20070622]  MMI reponse speed UP in 3800 ==

import gettext         
#print 'SETTING LANGAUGE'
#os.environ["LC_ALL"] = 'es_ES'      
#os.environ["LANG"] = 'ko_KR'  
#gettext.install('lgvp-ko', '/usr/local/lgvp/locale', unicode=False)


import utils
__builtins__._ = utils.insert_translation_mark

import runtime

#import dtmf
#runtime.dspg = dtmf.Dspg()

import log
runtime.log = log.Log()

import mmiDebug
runtime.mmiDebug = mmiDebug.MmiDebug()

import mmiSoundPath

import baseui
import manager

def quit():
	try:
		#runtime.modem.end_voice_duplex()
		#runtime.modem.monitor(False)
		#runtime.modem.hangup()
		pass
	finally:
		runtime.evas.quit()

baseui.ui_init(quit)

#import model
#runtime.manager = manager.Manager(model.IdleStage())

import sys, status
# if len(sys.argv) > 1:
#	if sys.argv[1] == 'restart':
#		status.is_restart = True

runtime.manager = manager.Manager()

import sys
#if len(sys.argv) > 1:
#	if sys.argv[1] == 'restart':
#		print 'restart LGVP'
#		import status
#		status.restore_status()

runtime.manager.stage.show()

''' eicho/newair7 remove 06.08.17
def check_intr_cb():
	return True
runtime.evas.timeout_add(200, check_intr_cb)
'''

import tstmod
tstmod.check_error_report()
'''
import config
if config.start_with_offhook:
	try:
		if '0' in open('/proc/driver/hook_sense').read():
			runtime.manager.handle_key(True, config.OffHook)
	except:
		pass
'''

runtime.evas.loop()
