package Ġcom . mr k ost ua . math alarm . alarm Settings . option Deep Wake Up Ċ Ċ import Ġcom . mr k ost ua . math alarm . alarm Settings . option Set Ring tone . MediaPlayer Helper Ċ import Ġcom . mr k ost ua . math alarm . alarm Settings . option Set Ring tone . Ring tone Object Ċ import Ġcom . mr k ost ua . math alarm . data . Alarm Data Helper Ċ import Ġjavax . inject . Inject Ċ Ċ /** Ċ Ġ* Ġ@ author ĠK ost ian ty n ĠP ry sia zh ny i Ġon Ġ 4 / 1 2 / 2 0 1 8 . Ċ Ġ*/ Ċ class ĠOption Set Deep Wake Up Presenter Ġ@ Inject Ġconstructor ( private Ġval Ġdata Helper : ĠAlarm Data Helper , Ġprivate Ġval Ġmedia Player : ĠMedia Player Helper ) Ġ: ĠOption Set Deep Wake Up Contract . Presenter Ġ{ ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġring tone Object : ĠRing tone Object ĊĊĠĠĠ Ġoverride Ġfun Ġstart () Ġ{ ĊĠĠĠĠĠĠĠ Ġring tone Object Ġ= Ġdata Helper . get Saved Deep Wake Up Ring tone Ob () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġplay Ring tone () Ġ{ ĊĠĠĠĠĠĠĠ Ġmedia Player . play Deep Wake Up Ring tone ( ring tone Object ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġstop Playing Ring tone () Ġ{ ĊĠĠĠĠĠĠĠ Ġmedia Player . stop Playing () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget Deep Wake Up Ring tone Name () Ġ= Ġring tone Object . name ĊĊĠĠĠ Ġoverride Ġfun Ġsave State In SP ( isChecked : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġdata Helper . save Deep Wake Up State In SP ( isChecked ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetState From SP (): ĠBoolean Ġ= Ġdata Helper . get Deep Wake Up State From SP () ĊĊĠĠĠ Ġoverride Ġfun Ġrelease Objects () Ġ{ ĊĠĠĠĠĠĠĠ Ġmedia Player . release MediaPlayer () ĊĠĠĠ Ġ} Ċ }