├── app ├── .gitignore ├── multidex-config.txt ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── ic_alarm_black_24dp.png │ │ │ │ ├── ic_check_white_48dp.png │ │ │ │ ├── ic_history_black_18dp.png │ │ │ │ ├── ic_history_black_48dp.png │ │ │ │ ├── ic_history_white_24dp.png │ │ │ │ ├── ic_perm_identity_black_24dp.png │ │ │ │ ├── ic_remove_red_eye_black_48dp.png │ │ │ │ ├── ic_remove_red_eye_white_24dp.png │ │ │ │ ├── patrick_brinksma_382458_unsplash.jpg │ │ │ │ └── side_nav_bar.xml │ │ │ ├── values │ │ │ │ ├── secret.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ ├── arrays.xml │ │ │ │ └── styles.xml │ │ │ ├── drawable-hdpi │ │ │ │ ├── ic_alarm_black_24dp.png │ │ │ │ ├── ic_check_white_48dp.png │ │ │ │ ├── ic_history_black_18dp.png │ │ │ │ ├── ic_history_black_48dp.png │ │ │ │ ├── ic_history_white_24dp.png │ │ │ │ ├── ic_perm_identity_black_24dp.png │ │ │ │ ├── ic_remove_red_eye_black_48dp.png │ │ │ │ └── ic_remove_red_eye_white_24dp.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── ic_alarm_black_24dp.png │ │ │ │ ├── ic_check_white_48dp.png │ │ │ │ ├── ic_history_black_18dp.png │ │ │ │ ├── ic_history_black_48dp.png │ │ │ │ ├── ic_history_white_24dp.png │ │ │ │ ├── ic_perm_identity_black_24dp.png │ │ │ │ ├── ic_remove_red_eye_black_48dp.png │ │ │ │ └── ic_remove_red_eye_white_24dp.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_alarm_black_24dp.png │ │ │ │ ├── ic_check_white_48dp.png │ │ │ │ ├── ic_history_black_18dp.png │ │ │ │ ├── ic_history_black_48dp.png │ │ │ │ ├── ic_history_white_24dp.png │ │ │ │ ├── ic_perm_identity_black_24dp.png │ │ │ │ ├── ic_remove_red_eye_black_48dp.png │ │ │ │ └── ic_remove_red_eye_white_24dp.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ic_alarm_black_24dp.png │ │ │ │ ├── ic_check_white_48dp.png │ │ │ │ ├── ic_history_black_18dp.png │ │ │ │ ├── ic_history_black_48dp.png │ │ │ │ ├── ic_history_white_24dp.png │ │ │ │ ├── ic_perm_identity_black_24dp.png │ │ │ │ ├── ic_remove_red_eye_black_48dp.png │ │ │ │ └── ic_remove_red_eye_white_24dp.png │ │ │ ├── xml │ │ │ │ ├── default_configs.xml │ │ │ │ └── analytics.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── menu │ │ │ │ ├── main.xml │ │ │ │ └── activity_main_drawer.xml │ │ │ ├── layout │ │ │ │ ├── content_main.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── app_bar_main.xml │ │ │ │ ├── fragment_scheduler_disabled.xml │ │ │ │ ├── nav_header_main.xml │ │ │ │ ├── fragment_privacy_policy.xml │ │ │ │ ├── fragment_welcome.xml │ │ │ │ ├── fragment_scheduler_enabled.xml │ │ │ │ └── fragment_settings.xml │ │ │ └── raw │ │ │ │ └── privacy_policy.md │ │ ├── java │ │ │ └── com │ │ │ │ └── hasmobi │ │ │ │ └── eyerest │ │ │ │ ├── helpers │ │ │ │ ├── IShowHideScheduler.java │ │ │ │ └── RequestDrawOverAppsPermission.java │ │ │ │ ├── base │ │ │ │ ├── Prefs.java │ │ │ │ ├── Constants.java │ │ │ │ └── Application.java │ │ │ │ ├── broadcast_receivers │ │ │ │ └── OnBootBroadcastReceiver.java │ │ │ │ ├── custom_views │ │ │ │ ├── SquareImageView.java │ │ │ │ ├── OverlayView.java │ │ │ │ └── DiscreeteSeekBar.java │ │ │ │ ├── billingutil │ │ │ │ ├── Base64DecoderException.java │ │ │ │ ├── IabException.java │ │ │ │ ├── IabResult.java │ │ │ │ ├── SkuDetails.java │ │ │ │ ├── Purchase.java │ │ │ │ ├── Inventory.java │ │ │ │ └── Security.java │ │ │ │ ├── fragments │ │ │ │ ├── main │ │ │ │ │ ├── SchedulerDisabledFragment.java │ │ │ │ │ ├── WelcomeFragment.java │ │ │ │ │ ├── SchedulerEnabledFragment.java │ │ │ │ │ └── SettingsFragment.java │ │ │ │ └── PrivacyPolicyFragment.java │ │ │ │ ├── services │ │ │ │ ├── MyFirebaseMessagingService.java │ │ │ │ ├── SchedulerService.java │ │ │ │ └── OverlayService.java │ │ │ │ └── activities │ │ │ │ └── MainActivity.java │ │ ├── AndroidManifest.xml │ │ └── aidl │ │ │ └── com │ │ │ └── android │ │ │ └── vending │ │ │ └── billing │ │ │ └── IInAppBillingService.aidl │ └── com │ │ └── android │ │ └── vending │ │ └── billing │ │ └── IInAppBillingService.aidl ├── proguard-rules.pro ├── google-services.json ├── build.gradle └── app.iml ├── settings.gradle ├── .idea ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── markdown-navigator │ └── profiles_settings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── compiler.xml ├── gradle.xml ├── misc.xml └── markdown-navigator.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── README.md ├── .circleci └── config.yml ├── gradle.properties ├── .gitignore ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | app.iml 3 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /app/multidex-config.txt: -------------------------------------------------------------------------------- 1 | com/google/firebase/provider/FirebaseInitProvider.class 2 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_alarm_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable/ic_alarm_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_check_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable/ic_check_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/values/secret.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_history_black_18dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable/ic_history_black_18dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_history_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable/ic_history_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_history_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable/ic_history_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_alarm_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-hdpi/ic_alarm_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_check_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-hdpi/ic_check_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_alarm_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-mdpi/ic_alarm_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_check_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-mdpi/ic_check_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_alarm_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xhdpi/ic_alarm_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_check_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xhdpi/ic_check_white_48dp.png -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/markdown-navigator/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_history_black_18dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-hdpi/ic_history_black_18dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_history_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-hdpi/ic_history_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_history_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-hdpi/ic_history_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_history_black_18dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-mdpi/ic_history_black_18dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_history_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-mdpi/ic_history_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_history_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-mdpi/ic_history_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_history_black_18dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xhdpi/ic_history_black_18dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_history_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xhdpi/ic_history_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_history_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xhdpi/ic_history_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_alarm_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xxhdpi/ic_alarm_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_check_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xxhdpi/ic_check_white_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_perm_identity_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable/ic_perm_identity_black_24dp.png -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_history_black_18dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xxhdpi/ic_history_black_18dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_history_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xxhdpi/ic_history_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_history_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xxhdpi/ic_history_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_remove_red_eye_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable/ic_remove_red_eye_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_remove_red_eye_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable/ic_remove_red_eye_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_perm_identity_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-hdpi/ic_perm_identity_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_perm_identity_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-mdpi/ic_perm_identity_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/patrick_brinksma_382458_unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable/patrick_brinksma_382458_unsplash.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_remove_red_eye_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-hdpi/ic_remove_red_eye_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_remove_red_eye_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-hdpi/ic_remove_red_eye_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_remove_red_eye_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-mdpi/ic_remove_red_eye_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_remove_red_eye_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-mdpi/ic_remove_red_eye_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_perm_identity_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xhdpi/ic_perm_identity_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_remove_red_eye_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xhdpi/ic_remove_red_eye_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_remove_red_eye_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xhdpi/ic_remove_red_eye_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_perm_identity_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xxhdpi/ic_perm_identity_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_remove_red_eye_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xxhdpi/ic_remove_red_eye_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_remove_red_eye_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dzhuneyt/android-app-eye-rest-blue-light-filter/HEAD/app/src/main/res/drawable-xxhdpi/ic_remove_red_eye_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/java/com/hasmobi/eyerest/helpers/IShowHideScheduler.java: -------------------------------------------------------------------------------- 1 | package com.hasmobi.eyerest.helpers; 2 | 3 | public interface IShowHideScheduler { 4 | 5 | void showOrHideSchedulerUI(boolean show); 6 | } 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri May 03 13:19:11 EEST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/xml/default_configs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | after_enable_message 5 | Done! It was that easy. 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #607D8B 4 | #455A64 5 | #90A4AE 6 | #00000000 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/hasmobi/eyerest/base/Prefs.java: -------------------------------------------------------------------------------- 1 | package com.hasmobi.eyerest.base; 2 | 3 | import android.content.Context; 4 | import android.content.SharedPreferences; 5 | 6 | public class Prefs { 7 | 8 | static public SharedPreferences get(Context c) { 9 | return c.getSharedPreferences("settings", Context.MODE_PRIVATE); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | > 2 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/xml/analytics.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 300 4 | 5 | 6 | false 7 | 8 | 9 | UA-1704294-189 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 160dp 5 | 6 | 16dp 7 | 20dp 8 | 16dp 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 5 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/hasmobi/eyerest/base/Constants.java: -------------------------------------------------------------------------------- 1 | package com.hasmobi.eyerest.base; 2 | 3 | public class Constants { 4 | static public final String PREF_EYEREST_ENABLED = "filter_enabled"; 5 | static public final String PREF_DIM_LEVEL = "opacity_percent"; 6 | static public final String PREF_OVERLAY_COLOR = "overlay_color"; 7 | public static final String PREF_SCHEDULER_ENABLED = "scheduler_enabled"; 8 | 9 | public static final String ANALYTICS_EVENT_OVERLAY_SERVICE = "screen_dim"; 10 | public static final String ANALYTICS_EVENT_SCHEDULER_SERVICE = "scheduler_service"; 11 | } 12 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in P:\android-sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/hasmobi/eyerest/broadcast_receivers/OnBootBroadcastReceiver.java: -------------------------------------------------------------------------------- 1 | package com.hasmobi.eyerest.broadcast_receivers; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.content.SharedPreferences; 7 | 8 | import com.hasmobi.eyerest.base.Application; 9 | import com.hasmobi.eyerest.base.Prefs; 10 | import com.hasmobi.eyerest.services.SchedulerService; 11 | import com.hasmobi.eyerest.base.Constants; 12 | import com.hasmobi.eyerest.services.OverlayService; 13 | 14 | public class OnBootBroadcastReceiver extends BroadcastReceiver { 15 | @Override 16 | public void onReceive(Context context, Intent intent) { 17 | if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) { 18 | Application.refreshServices(context); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/hasmobi/eyerest/custom_views/SquareImageView.java: -------------------------------------------------------------------------------- 1 | package com.hasmobi.eyerest.custom_views; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | 6 | public class SquareImageView extends androidx.appcompat.widget.AppCompatImageView { 7 | public SquareImageView(Context context) { 8 | super(context); 9 | } 10 | 11 | public SquareImageView(Context context, AttributeSet attrs) { 12 | super(context, attrs); 13 | } 14 | 15 | public SquareImageView(Context context, AttributeSet attrs, int defStyleAttr) { 16 | super(context, attrs, defStyleAttr); 17 | } 18 | 19 | @Override 20 | public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 21 | super.onMeasure(widthMeasureSpec, heightMeasureSpec); 22 | 23 | // Get whichever is smaller - width or height. 24 | // Helps to make a square instead of a rectangle. 25 | int size = Math.max(getMeasuredWidth(), getMeasuredHeight()); 26 | 27 | setMeasuredDimension(size, size); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/res/menu/activity_main_drawer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 13 | 14 | 15 | 18 | 19 | 23 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Eye Rest 3 | 4 | Open navigation drawer 5 | Close navigation drawer 6 | 7 | Settings 8 | Enable eye rest 9 | Filter overlay color 10 | Brightness optimization level 11 | 12 | Screen brightness will be reduced in 13 | Original brightness will be restored in 14 | Schedule the period when the screen should automatically darken, to reduce eye strain and make it more comfortable to read in dark environments. 15 | Night mode 16 | 17 | 18 | Hello blank fragment 19 | 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Eye-Rest 2 | 3 | ![App screenshot](https://i.imgur.com/MsufnsE.png) 4 | 5 | "Sore eyes" or "itchiness" are common side effects of too much smartphone usage, especially in dark environments, e.g. in your bed at night. People usually go darken the screen as much as possible, but even the lowest setting is often not comfortable for prolonged usage. 6 | 7 | Eye Rest makes it easy to apply a blue light filter that overlays the screen and reduces emitted light, reducing eye strain. 8 | 9 | **Features:** 10 | - Control the amount of intensity of the blue light filter (overlay) 11 | 12 | ![App screenshot](https://i.imgur.com/VQBr0wZ.png) 13 | - Select the color of the overlay: 14 | 15 | ![App screenshot](https://i.imgur.com/SzDTM3G.png) 16 | - Enable a scheduler that will only enable the blue light filter in a scheduled interval (e.g. only at night) 17 | 18 | ![App screenshot](https://i.imgur.com/0vYns1H.png) 19 | 20 | **Build status:** 21 | 22 | [![CircleCI](https://circleci.com/gh/Dzhuneyt/Android-App---Eye-Rest-Blue-Light-Filter.svg?style=svg)](https://circleci.com/gh/Dzhuneyt/Android-App---Eye-Rest-Blue-Light-Filter) 23 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build: 4 | working_directory: ~/code 5 | docker: 6 | - image: circleci/android:api-28 7 | environment: 8 | JVM_OPTS: -Xmx3200m 9 | steps: 10 | - checkout 11 | - restore_cache: 12 | key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} 13 | - run: 14 | name: Chmod permissions #if permission for Gradlew Dependencies fail, use this. 15 | command: sudo chmod +x ./gradlew 16 | - run: yes | sdkmanager --licenses || exit 0 17 | - run: yes | sdkmanager --update || exit 0 18 | - run: 19 | name: Download Dependencies 20 | command: ./gradlew androidDependencies 21 | - save_cache: 22 | paths: 23 | - ~/.gradle 24 | key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} 25 | - run: 26 | name: Run Tests 27 | command: ./gradlew lint test 28 | - store_artifacts: 29 | path: app/build/reports 30 | destination: reports 31 | - store_test_results: 32 | path: app/build/test-results -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/hasmobi/eyerest/billingutil/Base64DecoderException.java: -------------------------------------------------------------------------------- 1 | // Copyright 2002, Google, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package com.hasmobi.eyerest.billingutil; 16 | 17 | /** 18 | * Exception thrown when encountering an invalid Base64 input character. 19 | * 20 | * @author nelson 21 | */ 22 | public class Base64DecoderException extends Exception { 23 | public Base64DecoderException() { 24 | super(); 25 | } 26 | 27 | public Base64DecoderException(String s) { 28 | super(s); 29 | } 30 | 31 | private static final long serialVersionUID = 1L; 32 | } 33 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # Make sure to gradually decrease this value and note 21 | # changes in performance. Allocating too lttle memory may 22 | # also decrease performance. 23 | android.enableJetifier=true 24 | android.useAndroidX=true 25 | org.gradle.jvmargs = -Xmx1100m -------------------------------------------------------------------------------- /app/src/main/res/layout/app_bar_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_scheduler_disabled.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 16 | 17 |