package Ġcom . vl ad 1 m 1 r . watch face . data Ċ Ċ import Ġandroid . content . SharedPreferences Ċ import Ġcom . vl ad 1 m 1 r . watch face . settings . comp lications . picker . Comp lication Location Ċ Ċ const Ġval ĠKEY _ AN ALOG _ WATCH _ FACE Ġ= Ġ" an alog _ watch _ face _ key " Ċ Ċ const Ġval ĠKEY _ WATCH _ FACE _ TYPE Ġ= Ġ" watch _ face _ type " Ċ private Ġconst Ġval ĠKEY _ HAS _ COMP LIC ATIONS _ IN _ AM BI ENT _ MODE Ġ= Ġ" has _ comp lications _ in _ ambient _ mode " Ċ private Ġconst Ġval ĠKEY _ HAS _ T IC KS _ IN _ AM BI ENT _ MODE Ġ= Ġ" has _ ticks _ in _ ambient _ mode " Ċ private Ġconst Ġval ĠKEY _ HAS _ T IC KS _ IN _ INTER ACTIVE _ MODE Ġ= Ġ" has _ ticks _ in _ interactive _ mode " Ċ Ċ const Ġval ĠKEY _ HAS _ SECOND _ HAND Ġ= Ġ" has _ second _ hand " Ċ const Ġval ĠKEY _ HAS _ HAND S Ġ= Ġ" has _ hands " Ċ const Ġval ĠKEY _ HAS _ BIG GER _ TOP _ AND _ BOTTOM _ COMP LIC ATIONS Ġ= Ġ" has _ big ger _ top _ and _ bottom _ comp lications " Ċ const Ġval ĠKEY _ HAS _ S MO OTH _ SECONDS _ HAND Ġ= Ġ" has _ smooth _ seconds _ hand " Ċ Ċ const Ġval ĠKEY _ SHO ULD _ ADJ UST _ TO _ S QUARE _ SCREEN Ġ= Ġ" should _ adjust _ to _ square _ screen " Ċ Ċ const Ġval ĠKEY _ HAS _ BLACK _ AM BI ENT _ BACKGROUND Ġ= Ġ" has _ black _ ambient _ background " Ċ Ċ const Ġval ĠKEY _ HAS _ BIG GER _ COMP LIC ATION _ TEXT Ġ= Ġ" has _ big ger _ comp lication _ text " Ċ Ċ const Ġval ĠKEY _ USE _ ANTI _ ALIAS ING _ IN _ AM BI ENT _ MODE Ġ= Ġ" use _ anti _ alias ing _ in _ ambient _ mode " Ċ Ċ const Ġval ĠKEY _ SETTINGS _ OPEN _ COUNT Ġ= Ġ" settings _ open _ count " Ċ Ċ const Ġval ĠKEY _ HAS _ CENTER _ CIR CLE _ IN _ AM BI ENT _ MODE Ġ= Ġ" has _ center _ circle _ in _ ambient _ mode " Ċ Ċ const Ġval ĠKEY _ COMP LIC ATION _ PROVIDER _ NAME Ġ= Ġ" comp lication _ provider _ name " Ċ Ċ const Ġval ĠKEY _ SHO ULD _ KEEP _ HAND _ COLOR _ IN _ AM BI ENT _ MODE Ġ= Ġ" should _ keep _ hand _ color _ in _ ambient _ mode " Ċ class ĠData Storage ( private Ġval Ġshared Preferences : ĠSharedPreferences ) Ġ{ ĊĊĠĠĠ Ġfun Ġget Ticks Layout Type (): ĠT icks Layout Type Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠT icks Layout Type . from Id ( shared Preferences . getInt ( KEY _ WATCH _ FACE _ TYPE , ĠT icks Layout Type . ORIGIN AL . id )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġset Ticks Layout Type ( ticks Layout Type : ĠT icks Layout Type ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġeditor Ġ= Ġshared Preferences . edit () ĊĠĠĠĠĠĠĠ Ġeditor . put Int ( KEY _ WATCH _ FACE _ TYPE , Ġticks Layout Type . id ) ĊĠĠĠĠĠĠĠ Ġeditor . apply () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġhas Comp lications In Ambient Mode () Ġ= Ġshared Preferences . getBoolean ( KEY _ HAS _ COMP LIC ATIONS _ IN _ AM BI ENT _ MODE , Ġtrue ) ĊĊĠĠĠ Ġfun Ġset Has Comp lications In Ambient Mode ( comp lications In Ambient Mode : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġeditor Ġ= Ġshared Preferences . edit () ĊĠĠĠĠĠĠĠ Ġeditor . put Boolean ( KEY _ HAS _ COMP LIC ATIONS _ IN _ AM BI ENT _ MODE , Ġcomp lications In Ambient Mode ) ĊĠĠĠĠĠĠĠ Ġeditor . apply () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġhas Ticks In Ambient Mode () Ġ= Ġshared Preferences . getBoolean ( KEY _ HAS _ T IC KS _ IN _ AM BI ENT _ MODE , Ġtrue ) ĊĊĠĠĠ Ġfun Ġset Has Ticks In Ambient Mode ( ticks In Ambient Mode : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġeditor Ġ= Ġshared Preferences . edit () ĊĠĠĠĠĠĠĠ Ġeditor . put Boolean ( KEY _ HAS _ T IC KS _ IN _ AM BI ENT _ MODE , Ġticks In Ambient Mode ) ĊĠĠĠĠĠĠĠ Ġeditor . apply () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġhas Ticks In Interactive Mode () Ġ= Ġshared Preferences . getBoolean ( KEY _ HAS _ T IC KS _ IN _ INTER ACTIVE _ MODE , Ġtrue ) ĊĊĠĠĠ Ġfun Ġset Has Ticks In Interactive Mode ( ticks In Interactive Mode : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġeditor Ġ= Ġshared Preferences . edit () ĊĠĠĠĠĠĠĠ Ġeditor . put Boolean ( KEY _ HAS _ T IC KS _ IN _ INTER ACTIVE _ MODE , Ġticks In Interactive Mode ) ĊĠĠĠĠĠĠĠ Ġeditor . apply () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġhas Big ger Top And Bottom Comp lications () Ġ= Ġshared Preferences . getBoolean ( KEY _ HAS _ BIG GER _ TOP _ AND _ BOTTOM _ COMP LIC ATIONS , Ġfalse ) ĊĊĠĠĠ Ġfun Ġset Has Big ger Top And Bottom Comp lications ( big ger Top And Bottom Comp lications : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġeditor Ġ= Ġshared Preferences . edit () ĊĠĠĠĠĠĠĠ Ġeditor . put Boolean ( KEY _ HAS _ BIG GER _ TOP _ AND _ BOTTOM _ COMP LIC ATIONS , Ġbigger Top And Bottom Comp lications ) ĊĠĠĠĠĠĠĠ Ġeditor . apply () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġhas Smooth Seconds Hand () Ġ= Ġshared Preferences . getBoolean ( KEY _ HAS _ S MO OTH _ SECONDS _ HAND , Ġfalse ) ĊĊĠĠĠ Ġfun Ġset Has Smooth Seconds Hand ( has Smooth Seconds Hand : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġeditor Ġ= Ġshared Preferences . edit () ĊĠĠĠĠĠĠĠ Ġeditor . put Boolean ( KEY _ HAS _ S MO OTH _ SECONDS _ HAND , Ġhas Smooth Seconds Hand ) ĊĠĠĠĠĠĠĠ Ġeditor . apply () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġshould Adjust ToS quare Screen () Ġ= Ġshared Preferences . getBoolean ( KEY _ SHO ULD _ ADJ UST _ TO _ S QUARE _ SCREEN , Ġfalse ) ĊĊĠĠĠ Ġfun Ġset Should Adjust ToS quare Screen ( should Adjust ToS quare Screen : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġeditor Ġ= Ġshared Preferences . edit () ĊĠĠĠĠĠĠĠ Ġeditor . put Boolean ( KEY _ SHO ULD _ ADJ UST _ TO _ S QUARE _ SCREEN , Ġshould Adjust ToS quare Screen ) ĊĠĠĠĠĠĠĠ Ġeditor . apply () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġhas Black Ambient Background () Ġ= Ġshared Preferences . getBoolean ( KEY _ HAS _ BLACK _ AM BI ENT _ BACKGROUND , Ġfalse ) ĊĊĠĠĠ Ġfun Ġset Has Black Ambient Background ( has Black Ambient Background : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġeditor Ġ= Ġshared Preferences . edit () ĊĠĠĠĠĠĠĠ Ġeditor . put Boolean ( KEY _ HAS _ BLACK _ AM BI ENT _ BACKGROUND , Ġhas Black Ambient Background ) ĊĠĠĠĠĠĠĠ Ġeditor . apply () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġuse Anti Alias ing In Ambient Mode () Ġ= Ġshared Preferences . getBoolean ( KEY _ USE _ ANTI _ ALIAS ING _ IN _ AM BI ENT _ MODE , Ġfalse ) ĊĊĠĠĠ Ġfun Ġset Use Anti Alias ing In Ambient Mode ( use Anti Alias ing In Ambient Mode : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġeditor Ġ= Ġshared Preferences . edit () ĊĠĠĠĠĠĠĠ Ġeditor . put Boolean ( KEY _ USE _ ANTI _ ALIAS ING _ IN _ AM BI ENT _ MODE , Ġuse Anti Alias ing In Ambient Mode ) ĊĠĠĠĠĠĠĠ Ġeditor . apply () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Settings Open Count () Ġ= Ġshared Preferences . getLong ( KEY _ SETTINGS _ OPEN _ COUNT , Ġ 0 ) ĊĊĠĠĠ Ġfun Ġincrease Settings Open Count () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġsettings Open Count Ġ= Ġshared Preferences . getLong ( KEY _ SETTINGS _ OPEN _ COUNT , Ġ 0 ) ĊĠĠĠĠĠĠĠ Ġval Ġeditor Ġ= Ġshared Preferences . edit () ĊĠĠĠĠĠĠĠ Ġeditor . put Long ( KEY _ SETTINGS _ OPEN _ COUNT , Ġsettings Open Count Ġ+ Ġ 1 ) ĊĠĠĠĠĠĠĠ Ġeditor . apply () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġhas Center Circle In Ambient Mode () Ġ= Ġshared Preferences . getBoolean ( KEY _ HAS _ CENTER _ CIR CLE _ IN _ AM BI ENT _ MODE , Ġtrue ) ĊĊĠĠĠ Ġfun Ġset Has Center Circle In Ambient Mode ( ticks In Ambient Mode : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġeditor Ġ= Ġshared Preferences . edit () ĊĠĠĠĠĠĠĠ Ġeditor . put Boolean ( KEY _ HAS _ CENTER _ CIR CLE _ IN _ AM BI ENT _ MODE , Ġticks In Ambient Mode ) ĊĠĠĠĠĠĠĠ Ġeditor . apply () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġset Comp lication Provider Name ( comp lication Id : ĠInt , Ġcomp lication Provider Name : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġeditor Ġ= Ġshared Preferences . edit () ĊĠĠĠĠĠĠĠ Ġeditor . putString ( KEY _ COMP LIC ATION _ PROVIDER _ NAME Ġ+ Ġcomp lication Id , Ġcomp lication Provider Name ) ĊĠĠĠĠĠĠĠ Ġeditor . apply () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Comp lication Provider Name ( comp lication Id : ĠInt ) Ġ= Ġshared Preferences . getString ( KEY _ COMP LIC ATION _ PROVIDER _ NAME Ġ+ Ġcomp lication Id , Ġ"") ĊĊĠĠĠ Ġfun Ġshould Keep Hand Color In Ambient Mode () Ġ= Ġshared Preferences . getBoolean ( KEY _ SHO ULD _ KEEP _ HAND _ COLOR _ IN _ AM BI ENT _ MODE , Ġfalse ) ĊĊĠĠĠ Ġfun Ġset Should Keep Hand Color In Ambient Mode ( should Keep Hand Color In Ambient Mode : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġeditor Ġ= Ġshared Preferences . edit () ĊĠĠĠĠĠĠĠ Ġeditor . put Boolean ( KEY _ SHO ULD _ KEEP _ HAND _ COLOR _ IN _ AM BI ENT _ MODE , Ġshould Keep Hand Color In Ambient Mode ) ĊĠĠĠĠĠĠĠ Ġeditor . apply () ĊĠĠĠ Ġ} Ċ Ċ }