Skip to content

Commit

Permalink
Update 1.4_r1.
Browse files Browse the repository at this point in the history
  • Loading branch information
D4rK7355608 committed Sep 9, 2022
1 parent 29b5ccb commit 8b81652
Show file tree
Hide file tree
Showing 19 changed files with 232 additions and 35 deletions.
6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Version 1.4_r1:
- Added Russian language support;
- Added Indonesian language support;
- Added missing permissions;
- Fixed back button on permissions activity;
- Fixed title on permissions activity;
- Fixed GitHub about link;
- Fixed Open source licenses not showing licenses;
- Other minor tweaks.

# Version 1.3_r1:
- Added language preferences (Android 13+);
- Fixed Firebase crashes;
Expand Down
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ plugins {
id 'org.jetbrains.kotlin.android'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
id 'com.google.android.gms.oss-licenses-plugin'
}
android {
compileSdk 33
def tagName = '1.3_r1'
def tagName = '1.4_r1'
defaultConfig {
applicationId "com.d4rk.lowbrightness"
minSdk 26
targetSdk 33
versionCode 10
versionCode 13
versionName tagName
buildConfigField "String", "VERSION_NAME", "\"${tagName}\""
archivesBaseName = "com.d4rk.lowbrightness-v${tagName}"
Expand Down
11 changes: 6 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
</queries>
<application
android:name=".ads.Ads"
android:appCategory="productivity"
android:banner="@drawable/ic_toolbar_background"
android:label="@string/app_name"
android:description="@string/app_description"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher"
android:logo="@drawable/ic_launcher_foreground"
android:label="@string/app_name"
android:banner="@drawable/ic_toolbar_background"
android:supportsRtl="true"
android:resizeableActivity="true"
android:appCategory="productivity"
android:theme="@style/AppThemeActionBar"
android:localeConfig="@xml/locales_config"
tools:targetApi="33">
Expand Down Expand Up @@ -63,10 +64,10 @@
<activity
android:name=".ui.permissions.PermissionsActivity"
android:exported="true"
android:label="@string/feedback">
android:label="@string/permissions">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="ui.permissions.PermissionsActivity"/>
android:value=".ui.permissions.PermissionsActivity"/>
</activity>
<activity
android:name=".ui.settings.SettingsActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private void createNotificationChannel() {
}
private void showNotification() {
this.createNotificationChannel();
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this, NOTIFICATION_CHANNEL_ID).setSmallIcon(R.drawable.ic_eye).setContentTitle("Blue light filter active").setContentText("Tap to edit settings or disable");
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this, NOTIFICATION_CHANNEL_ID).setSmallIcon(R.drawable.ic_eye).setContentTitle(getResources().getString(R.string.notification_title)).setContentText(getResources().getString(R.string.notification_context));
mBuilder.setOngoing(true);
Intent resultIntent = new Intent(this, MainActivity.class);
TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class AboutFragment : Fragment(R.layout.fragment_about) {
startActivity(intent)
}
binding.itemSettingsMoreAboutGithub.setOnClickListener {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/D4rK7355608/com.d4rk.englishwithlidia.plus"))
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/D4rK7355608/com.d4rk.lowbrightness"))
startActivity(intent)
}
binding.itemSettingsMoreAboutTwitter.setOnClickListener {
Expand All @@ -48,8 +48,7 @@ class AboutFragment : Fragment(R.layout.fragment_about) {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://forum.xda-developers.com/m/d4rk7355608.10095012"))
startActivity(intent)
}
binding.itemSettingsMoreAboutLibraries.setOnClickListener {
OssLicensesMenuActivity.setActivityTitle(getString(R.string.libraries))
binding.itemSettingsMoreAboutLicenses.setOnClickListener {
val intent = Intent(activity, OssLicensesMenuActivity::class.java)
startActivity(intent)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ public void onViewCreated(@NonNull View root, @Nullable Bundle savedInstanceStat
final RequestDrawOverAppsPermission permissionRequester = new RequestDrawOverAppsPermission(getActivity());
if (!permissionRequester.canDrawOverlays()) {
AlertDialog.Builder builder = new AlertDialog.Builder(requireContext());
builder.setTitle("App needs permission!");
builder.setMessage("Applying a blue light filter to overlay the screen, requires a special permission called \"Display over other apps\". \n\nPlease, allow this permission on the next screen so that the blue light filter can be applied");
builder.setTitle(R.string.app_needs_permission_title);
builder.setMessage(R.string.app_needs_permission_message);
builder.setCancelable(false);
builder.setPositiveButton("Allow permission", (dialog, id) -> {
builder.setPositiveButton(R.string.allow_permission, (dialog, id) -> {
dialog.cancel();
permissionRequester.requestPermissionDrawOverOtherApps();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class SettingsActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferen
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=com.d4rk.androidtutorials"))
startActivity(intent)
}
alertDialog.setNegativeButton(R.string.cool, null)
alertDialog.setNegativeButton(android.R.string.cancel, null)
alertDialog.show()
true
}
Expand All @@ -95,7 +95,7 @@ class SettingsActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferen
val alertDialog: AlertDialog.Builder = AlertDialog.Builder(requireContext())
alertDialog.setTitle(R.string.changelog)
alertDialog.setMessage(R.string.changes)
alertDialog.setNegativeButton(R.string.cool, null)
alertDialog.setNegativeButton(android.R.string.cancel, null)
alertDialog.show()
true
}
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/layout/fragment_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,20 @@
app:chipIcon="@drawable/ic_xda"
app:chipSpacing="0dp"
style="@style/Widget.Material3.Chip.Assist.Elevated"
app:layout_constraintEnd_toStartOf="@id/item_settings_more_about_libraries"
app:layout_constraintEnd_toStartOf="@id/item_settings_more_about_licenses"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/item_settings_more_about_github"/>
<com.google.android.material.chip.Chip
android:id="@+id/item_settings_more_about_libraries"
android:id="@+id/item_settings_more_about_licenses"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:minHeight="0dp"
android:text="@string/libraries"
android:text="@string/oss_license_title"
android:textColor="?android:textColorPrimary"
android:tooltipText="@string/libraries"
android:tooltipText="@string/oss_license_title"
app:chipIcon="@drawable/ic_libraries"
app:chipSpacing="0dp"
style="@style/Widget.Material3.Chip.Assist.Elevated"
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/values-in/arrays.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<resources>
<string-array name="dark_mode_entries">
<item>Ikuti Mode Sistem</item>
<item>Mode Cahaya</item>
<item>Mode Gelap</item>
<item>Mode Gelap Baterai Otomatis</item>
</string-array>
</resources>
64 changes: 64 additions & 0 deletions app/src/main/res/values-in/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<resources>
<string name="app_version">Versi: kapan %1s</string>
<string name="app_description">Kurangi atau tingkatkan kecerahan layar Anda dengan menggunakan aplikasi kami! 🔆</string>
<string name="enable_scheduler">Aktifkan penjadwal</string>
<string name="disable_scheduler">Nonaktifkan penjadwal</string>
<string name="enabled_only_during_this_interval">Diaktifkan hanya selama interval ini:</string>
<string name="brightness_sum">Tentukan seberapa kuat filter overlay seharusnya. Tingkat yang lebih tinggi direkomendasikan untuk membaca waktu malam.</string>
<string name="filter_sum">Pilih warna yang menurut Anda paling tidak mengganggu mata Anda dan memiliki kontras yang cukup dengan aplikasi, biasanya terlihat di layar.</string>
<string name="schedule">Jadwal</string>
<string name="time_remaining_to_darken_label">Kecerahan layar akan berkurang dalam</string>
<string name="time_remaining_to_lighten_label">Kecerahan asli akan dipulihkan dalam</string>
<string name="customize_overlay_color">Filter warna hamparan</string>
<string name="intensity">Tingkat pengoptimalan kecerahan</string>
<string name="scheduler_description">Jadwalkan periode kapan layar akan menjadi gelap secara otomatis, untuk mengurangi ketegangan mata dan membuatnya lebih nyaman untuk membaca di lingkungan yang gelap.</string>
<string name="dev_feedback">Kirim ke dev</string>
<string name="feedback">Masukan</string>
<string name="feedback_tooltip">Kirimkan ulasan Anda kepada kami di Google Play Store.</string>
<string name="feedback_toast">Terima kasih telah menilai kami!</string>
<string name="rate_us">Nilai aplikasi kami!</string>
<string name="terms_of_service">Persyaratan Layanan</string>
<string name="code_of_conduct">Kode etik</string>
<string name="ad">Iklan</string>
<string name="more_apps">Aplikasi tambahan lainnya…</string>
<string name="changelog">Changelog</string>
<string name="normal">Normal</string>
<string name="internet">Internet [INTERNET]</string>
<string name="settings">Pengaturan</string>
<string name="permissions">Izin</string>
<string name="check_for_updates">Periksa pembaruan…</string>
<string name="more">Lagi</string>
<string name="internet_sum">Digunakan untuk mengirim laporan kesalahan.</string>
<string name="theme">Tema</string>
<string name="google_dev">Google Dev</string>
<string name="open_me">Buka saya :)</string>
<string name="privacy_policy">Kebijakan pribadi</string>
<string name="menu_home">Rumah</string>
<string name="menu_about">Tentang</string>
<string name="share">Membagikan</string>
<string name="share_subject">Coba sekarang!!!</string>
<string name="share_using">Bagikan menggunakan…</string>
<string name="support_me">Dukung saya</string>
<string name="support_me_sum">Klik di sini jika Anda ingin mendukung saya tanpa membayar uang. Hanya beberapa waktu untuk melihat iklan.</string>
<string name="notifications_description">Setelah Anda mengaktifkan aplikasi ini, Anda akan memiliki penyihir notifikasi, Anda dapat mengubah intensitas kecerahan tanpa membuka aplikasi itu sendiri.</string>
<string name="license">Lisensi</string>
<string name="runtime">Waktu tayang</string>
<string name="schedule_exact_alarm">Jadwalkan alarm yang tepat [SCHEDULE_EXACT_ALARM]</string>
<string name="schedule_exact_alarm_sum">Digunakan untuk menampilkan notifikasi aplikasi.</string>
<string name="foreground_service">Layanan latar depan [FOREGROUND_SERVICE]</string>
<string name="foreground_service_sum">Digunakan untuk membuat aplikasi berjalan di latar belakang dan memantau kecerahan.</string>
<string name="write_settings">Tulis pengaturan [WRITE_SETTINGS]</string>
<string name="write_settings_sum">Digunakan untuk memiliki akses untuk mengubah kecerahan.</string>
<string name="receive_boot_completed">Terima boot selesai [RECEIVE_BOOT_COMPLETED]</string>
<string name="receive_boot_completed_sum">Digunakan untuk membuat boot aplikasi.</string>
<string name="appearance">Penampilan</string>
<string name="app_needs_permission_title">Aplikasi membutuhkan izin</string>
<string name="app_needs_permission_message">Menerapkan filter cahaya warna untuk melapisi layar, memerlukan izin khusus yang disebut "Tampilkan di atas aplikasi lain" [SYSTEM_ALERT_WINDOW]. \n\nHarap izinkan izin ini di layar berikutnya agar filter cahaya biru dapat diterapkan.</string>
<string name="allow_permission">Berikan izin</string>
<string name="notification_title">Filter cahaya warna aktif</string>
<string name="notification_context">Ketuk untuk mengedit pengaturan atau menonaktifkan</string>
<string name="ad_id">ID iklan [AD_ID]</string>
<string name="ad_id_sum">Digunakan untuk mengizinkan iklan ditampilkan di perangkat Android 13+.</string>
<string name="system_alert_window">Jendela peringatan sistem [SYSTEM_ALERT_WINDOW]</string>
<string name="system_alert_window_sum">Digunakan untuk mengizinkan aplikasi menggambar di atas aplikasi lain.</string>
</resources>
8 changes: 8 additions & 0 deletions app/src/main/res/values-ro/arrays.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<resources>
<string-array name="dark_mode_entries">
<item>Urmărește modul sistemului</item>
<item>Modul luminos</item>
<item>Modul întunecat</item>
<item>Modul întunecat la economisitorul de baterie</item>
</string-array>
</resources>
12 changes: 10 additions & 2 deletions app/src/main/res/values-ro/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<resources>
<string name="app_version">Versiunea %1s</string>
<string name="app_description">Reduceți sau creșteți luminozitatea ecranului folosind aplicația noastră! 🔆</string>
<string name="enable_scheduler">Activați programatorul</string>
<string name="disable_scheduler">Dezactivați programatorul</string>
<string name="enabled_only_during_this_interval">Activat numai în acest interval:</string>
Expand Down Expand Up @@ -30,15 +31,13 @@
<string name="internet_sum">Folosit pentru a trimite rapoarte de eroare.</string>
<string name="theme">Teme</string>
<string name="google_dev">Google Dev</string>
<string name="libraries">Librării cu surse deschise.</string>
<string name="open_me">Deschide-mă :)</string>
<string name="privacy_policy">Politica de confidențialitate</string>
<string name="menu_home">Acasă</string>
<string name="menu_about">Despre</string>
<string name="share">Împărtășește</string>
<string name="share_subject">Încercați acum!!!</string>
<string name="share_using">Împărtășește folosind..</string>
<string name="notifications">Notificări!</string>
<string name="support_me">Susține-mă</string>
<string name="support_me_sum">Faceți clic aici dacă doriți să mă susțineți fără să plătiți bani. Doar ceva timp pentru vizualizarea unei reclame.</string>
<string name="notifications_description">După ce activați această aplicație, veți avea o vrăjitoare de notificare, puteți schimba intensitatea luminozității fără a deschide aplicația în sine.</string>
Expand All @@ -53,4 +52,13 @@
<string name="receive_boot_completed">Primire încărcare finalizată [RECEIVE_BOOT_COMPLETED]</string>
<string name="receive_boot_completed_sum">Folosit pentru a porni aplicația odată cu telefonul.</string>
<string name="appearance">Aparențe</string>
<string name="app_needs_permission_title">Aplicația necesită permisiunea</string>
<string name="app_needs_permission_message">Aplicarea unui filtru de lumină colorată pentru a suprapune ecranul necesită o permisiune specială numită „Afișare peste alte aplicații” [SYSTEM_ALERT_WINDOW]. \n\nVă rugăm să permiteți această permisiune pe ecranul următor, astfel încât filtrul de lumină albastră să poată fi aplicat.</string>
<string name="allow_permission">Permiteți permisiunea</string>
<string name="notification_title">Filtru de lumină color activ</string>
<string name="notification_context">Atingeți pentru a edita setările sau pentru a dezactiva</string>
<string name="ad_id">ID anunțuri [AD_ID]</string>
<string name="ad_id_sum">Folosit pentru a permite afișarea anunțurilor pe dispozitivele Android 13+.</string>
<string name="system_alert_window">Fereastra de alertă de sistem [SYSTEM_ALERT_WINDOW]</string>
<string name="system_alert_window_sum">Folosit pentru a permite atragerea aplicației peste alte aplicații.</string>
</resources>
8 changes: 8 additions & 0 deletions app/src/main/res/values-ru/arrays.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<resources>
<string-array name="dark_mode_entries">
<item>Следуйте системному режиму</item>
<item>Легкий режим</item>
<item>Темный режим</item>
<item>Автоматический темный режим батареи</item>
</string-array>
</resources>
Loading

0 comments on commit 8b81652

Please sign in to comment.