-
Notifications
You must be signed in to change notification settings - Fork 32
/
cospravit.txt
580 lines (467 loc) · 25.9 KB
/
cospravit.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
Widget Preview Builder:
https://play.google.com/store/apps/details?id=lav.widgetpreviewbuilder.free&hl=en_US&gl=US
------------------------
1. ako zrusim pin/heslo
deviceManager.setPasswordMinimumLength(compName, 0);
boolean result = deviceManager.resetPassword("", DevicePolicyManager.RESET_PASSWORD_REQUIRE_ENTRY);
2. ako nahodim pin/heslo
DevicePolicyManager deviceManager = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE);
ComponentName compName = new ComponentName(MessageService.this, LockAdmin.class);
boolean active = deviceManager.isAdminActive(compName);
if (active) {
deviceManager.setPasswordQuality(compName,DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED);
deviceManager.setPasswordMinimumLength(compName, 5);
boolean result = deviceManager.resetPassword("blablabla", DevicePolicyManager.RESET_PASSWORD_REQUIRE_ENTRY);
}
3. password quality:
DevicePolicyManager.PASSWORD_QUALITY_SOMETHING - pattern lock?
DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK - tvar, odtlacok prstu?
DevicePolicyManager.PASSWORD_QUALITY_NUMERIC - pin?
DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC - heslo?
DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC - heslo?
DevicePolicyManager.PASSWORD_QUALITY_COMPLEX - heslo?
--------------------------------
Direct boot:
- Asi nemozem spravit, nepodporuje to WorkManager. :-(
- toto je super na to, aby sa PPP startol aj pri uzamknutej obrazovke.
- android.intent.action.LOCKED_BOOT_COMPLETED vid:
https://medium.com/@jordan_shifter/direct-boot-on-android-nougat-71f06c4a7c9e
- Ak nepuzijes direct boot, tak apka pada napr. v Fabric, android_job.
To preto, lebo chcu pouzivat shared preferences a v uzamknutej obrazovke bez direct boot
to spadne na IllegalStateException.
Fabric, android-job uz nepouzivam, treba testnut s Firebase Crashlytics a WorkManager
- Ako spravit podporu Direct boot:
https://developer.android.com/training/articles/direct-boot
- Len mam taky strasne blby pocit, ze neviem ako movnut shared preferences z device do credential storage.
Vid:
https://developer.android.com/reference/android/content/Context#moveSharedPreferencesFrom(android.content.Context,%20java.lang.String)
https://developer.android.com/reference/android/content/Context#moveDatabaseFrom(android.content.Context,%20java.lang.String)
Alebo, ze by pomohlo toto?
https://stackoverflow.com/questions/51377089/android-crashlytics-fails-on-direct-boot-due-to-disk-encryption
------------------
ActivateProfileHelper.setScreenTimeout()
- disableScreenTimeoutInternalChange = true;
- pre kazdy timeout z parametra:
if (PPApplication.lockDeviceActivity != null)
// in LockDeviceActivity.onDestroy() will be used this value to revert back system screen timeout
PPApplication.screenTimeoutBeforeDeviceLock = 15000;
else {
Settings.System.putInt(appContext.getContentResolver(), Settings.System.SCREEN_OFF_TIMEOUT, xxx);
}
- nerobi 6, 8. Preco?
- zavola:
setActivatedProfileScreenTimeout(appContext, 0);
- zavola work:
DisableScreenTimeoutInternalChangeWorker.class
- volane z:
- ActivateProfileHelper.execute() - aktivacia profilu ak je obrazovka zapnuta
- LockDeviceActivity.onDestroy() - na nastavenie timeoutu, ak sa este nenastavil
- ScreenOnOffBroadcastReceiver.onReceive() na ACTION_USER_PRESENT
ActivateProfileHelper.setActivatedProfileScreenTimeout()
- ulozi do shared preferences timeout.
- ulozi to aj do ApplicationPreferences.prefActivatedProfileScreenTimeout
- pouzije to v ScreenOnOffBroadcastReceiver.onReceive() na ACTION_USER_PRESENT
- pouzije to aj v LockDeviceActivity.onDestroy() na vratenie timeoutu
- volane je z:
- ActivateProfileHelper.setScreenTimeout() - nastavi 0, lebo netreba nastavovat na screen On ACTION_USER_PRESENT
- ActivateProfileHelper.execute - nastavi profile parameter _deviceScreenTimeout, ak je screen off
- SettingsContentObserver.onChange() - nastvi 0 ak posledny zapamatany timeout je iny ako aktualny. a nie je to internalChange
ActivateProfileHelper.disableScreenTimeoutInternalChange
to aby sa nepouzila na ten screen On ACTION_USER_PRESENT. Tu sa predpoklada, ze zmena prisla z vonka.
premenna PPApplication.screenTimeoutBeforeDeviceLock:
- tu si pamatam, aky timeout je pred spustenim LockDeviceActivity.
- na onCreate() ho zistuje
- na onDestroy() nastavi spat timeout na tuto odpamatanu hodnotu
- na onDestroy() potom nastavi timeot na hodnotu ApplicationPreferences.prefActivatedProfileScreenTimeout.
Takto sa nastavuje tiemout pri aktivacii profilu:
// screen timeout
if (Permissions.checkProfileScreenTimeout(appContext, profile, null)) {
if (PPApplication.isScreenOn) {
if (PPApplication.screenTimeoutHandler != null) {
PPApplication.screenTimeoutHandler.post(() -> {
setScreenTimeout(profile._deviceScreenTimeout, appContext);
});
}
else {
setActivatedProfileScreenTimeout(appContext, profile._deviceScreenTimeout);
}
}
- cize ak je screen on, nastavi sa timeount hned.
- ak je screen off, nastavi sa timeount az v ScreenOnOffBroadcastReceiver.onReceive() na ACTION_USER_PRESENT
cize len sa hodnota ulozi do ApplicationPreferences.prefActivatedProfileScreenTimeout.
Toto cele chapem.
-----------------------
Zmena hlasitosti profilom:
Toto su parametre:
forRingerMode -> true, ak menim aj ringer mod?
- ak profil meni ringer mod, ton zvonenia, notifikacie, systemu, DTMF, tak je true
- inac je false
forProfileActivation -> true ak volam pre aktivaciu profilu?
- ak je volane z ActivateProfileHelper.execute(), je true, cize ano ide o aktivaciu profilu
- ak je volane z PhoneCallListener.setLinkUnlinkNotificationVolume() je false, cize je to pocas hovoru
aby sa vykonal unlink.
setRingerVolume(appContext, profile.getVolumeRingtoneValue()); -> pozri co za premennu to nastavuje
- ApplicationPreferences.prefRingerVolume
meni sa pri starte PPP, pri aktivacii profilu, pri zmene hlasitosti zvonenia v systeme
setNotificationVolume(appContext, profile.getVolumeNotificationValue()); -> pozri co za premennu to nastavuje
- ApplicationPreferences.prefNotificationVolume
meni sa pri starte PPP, pri aktivacii profilu, pri zmene hlasitosti notifikacii v systeme
meni sa aj na hlaitost zvonenia pri unlinku, podla mna preto, lebo v podstate je len 1 volume
pri zmerovananych hlasitostiach, tak nech su rovnake.
-> Len ak je system ringer mode audible, alebo ak ApplicationPreferences.prefRingerMode=0
-> ringerMode == 0 znamena, ze je nenastaveny. Ide o ringer mod podla Profile.RINGERMODE_*
if (isAudibleSystemRingerMode(audioManager, systemZenMode/*, appContext*/) || (ringerMode == 0)) {
...
-> tu zistujem ci ma zlinkovane (merged) ringing a notificartion
vrati to:
if (ApplicationPreferences.applicationForceSetMergeRingNotificationVolumes > 0)
ApplicationPreferences.applicationForceSetMergeRingNotificationVolumes == 1
- cize ak je natrdo v Settongs, ze ma zmergovane
else
ApplicationPreferences.prefMergedRingNotificationVolumes
cize v podstate bud ak uzivatel nastavil natvrdo, ze ma zmergovane alebo a detekcia vratila, ze ma zmergovane
if (ActivateProfileHelper.getMergedRingNotificationVolumes() &&
ApplicationPreferences.applicationUnlinkRingerNotificationVolumes) {
-> ma zmergovane a ma zapnuty unlink
...
} else {
-> tu zistujem ci ma zlinkovane (merged) ringing a notificartion
vrati to:
if (ApplicationPreferences.applicationForceSetMergeRingNotificationVolumes > 0)
ApplicationPreferences.applicationForceSetMergeRingNotificationVolumes == 1
- cize ak je natrdo v Settongs, ze ma zmergovane
else
ApplicationPreferences.prefMergedRingNotificationVolumes
cize v podstate bud ak uzivatel nastavil natvrdo, ze ma zmergovane alebo a detekcia vratila, ze ma zmergovane
if (!ActivateProfileHelper.getMergedRingNotificationVolumes()) {
-> nie je zmergovane
...
-> nastavuje hlasitost notifikacie, ale z ApplicationPreferences.prefNotificationVolume
nastavi sa hore na zaciatku
volume = ApplicationPreferences.prefNotificationVolume;
}
-> nastavuje hlasitost zvonenia, ale z ApplicationPreferences.prefRingerVolume
nastavi sa hore na zaciatku
volume = ApplicationPreferences.prefRingerVolume;
-> zapisuje sa aj do servisu, NACO?
PhoneProfilesService.getInstance().ringingVolume = volume;
...
}
...
}
static void getMergedRingNotificationVolumes(Context context) {
synchronized (PPApplication.profileActivationMutex) {
ApplicationPreferences.prefMergedRingNotificationVolumes =
ApplicationPreferences.getSharedPreferences(context).getBoolean(PREF_MERGED_RING_NOTIFICATION_VOLUMES, true);
}
}
static boolean getMergedRingNotificationVolumes() {
if (ApplicationPreferences.applicationForceSetMergeRingNotificationVolumes > 0)
return ApplicationPreferences.applicationForceSetMergeRingNotificationVolumes == 1;
else
return ApplicationPreferences.prefMergedRingNotificationVolumes;
}
Ak v Settings menim ringtone na Pixeli, meni sa STREAM_RING aj STREAM_NOTIFICATION
Ale ako pozeram, tak sa to ignoruje, tie zmeny v observeri, lebo prave aktivujem porfil.
To je to, co to ma aj robit.
Tak preco kua to na tej Xperii robi inac? Jedine mi zostava to testnut u Marta. Logovat si to.
------------------
Night mode - cize zlty film:
Pozeraj toto:
/home/henrisko/Stiahnuté/Tweaker-master/app/src/main/java/com/zacharee1/systemuituner/views/NightModeView.kt
/home/henrisko/Stiahnuté/Tweaker-master/app/src/main/java/com/zacharee1/systemuituner/services/tiles/NightModeTile.kt
/home/henrisko/Stiahnuté/Tweaker-master/app/src/main/java/com/zacharee1/systemuituner/prefs/NightModePreference.kt
Je to aplikacia SysteUI Tunner. Mas ho v S10.
--------------
Night light (blue light filter):
Vypada to, ze takto sa to robi:
if (isActive) {
//if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N) { // API 24, ale skontroluj
// prefManager.saveOption(SettingsType.SECURE, "twilight_mode", 0)
// writeSecure("twilight_mode", 0)
//} else {
prefManager.saveOption(SettingsType.SECURE, "night_display_activated", 0)
writeSecure("night_display_activated", 0)
//}
} else {
//if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N) { // API 24, ale skontroluj
// prefManager.saveOption(SettingsType.SECURE, "twilight_mode", 1)
// writeSecure("twilight_mode", 1)
//} else {
prefManager.saveOption(SettingsType.SECURE, "night_display_activated", 1)
writeSecure("night_display_activated", 1)
//}
}
fun Context.writeSecure(key: String?, value: Any?): Boolean {
if (key.isNullOrBlank()) return false
return try {
Settings.Secure.putString(contentResolver, key, value?.toString())
true
} catch (e: SecurityException) {
false;
}
}
//const val TWILIGHT_MODE = "twilight_mode"
const val NIGHT_DISPLAY_ACTIVATED = "night_display_activated"
- pouzijem toto len, chcem len zapnut/vypnut
const val NIGHT_DISPLAY_AUTO_MODE = "night_display_auto_mode"
const val NIGHT_DISPLAY_COLOR_TEMPERATURE = "night_display_color_temperature"
// tieto dve este musim zistit, ci vobec vie nastavit.
// v aplikacii to nie je
const val NIGHT_DISPLAY_CUSTOM_START_TIME = "night_display_custom_start_time"
const val NIGHT_DISPLAY_CUSTOM_END_TIME = "night_display_custom_end_time"
// pre API 24
//writeSecure(NightModeView.TWILIGHT_MODE, info.twilightMode)
// pre API 25+
writeSecure(NightModeView.NIGHT_DISPLAY_ACTIVATED, info.nightModeActivated)
- Funguje na Pixeli
writeSecure(NightModeView.NIGHT_DISPLAY_AUTO_MODE, info.nightModeAuto)
- Toto mozno bude treba na inych mobiloch ako Pixel. K tomu NIGHT_DISPLAY_ACTIVATED
//writeSecure(NightModeView.NIGHT_DISPLAY_COLOR_TEMPERATURE, info.nightModeTemp)
Zdroj: https://github.com/zacharee/Tweaker/blob/master/app/src/main/java/com/zacharee1/systemuituner/services/tiles/NightModeTile.kt
Bude potrebovat WRITE_SECURE_SETTINGS.
Testovane cez System UI Tuner s grantnutym WRITE_SECURE_SETTINGS na Pixel 3a.
Testni to potom este na Samsungu, ci to ide. Neviem, niekde som cital, ze to zhasne obrazovku
a pomoze len restart mobilu. Len neviem ci to bolo pri tomto.
!!! Hm, tak ako som pisal. Na Samsungu to zhaslo obrazovku.
!!! Aj ked zmenim len automaticke zapinanie.
!!! Takze toto urcite nemozem spravit.
!!! Ale? Mozno System UI tuner zapise len pri zmene automatiky aj to zapnutie. A to je mozno problem.
!!! Testni, testni testni.
!!! Mozno treba len writeSecure(NightModeView.NIGHT_DISPLAY_ACTIVATED, info.nightModeActivated)
!!! Lebo som sa rozhodol, ze to budem len zapinat/vypinat, nebudem menit parametre
!!! Lebo toto asi je pre sunrise/sunset - ak teda toto blbne na Samsungu:
!!! writeSecure(NightModeView.NIGHT_DISPLAY_AUTO_MODE, info.nightModeAuto)
Mam ine, uvidime - ktohovie ci pojde na Samsungoch. Asi prd pomoze, ta apka je natvrdo pre API 24.
https://github.com/farmerbb/Night-Light/blob/master/app/src/main/java/com/farmerbb/nightlight/util/U.java
Ale mam toto:
https://github.com/zacharee/Tweaker/issues/120
Pre Samsung: https://www.macrodroidforum.com/index.php?threads/samsung-s21-eye-comfort-shield-setting-key.2962/
Funguje na S10, S21, S23 = supeeer!!! a je to Setting.System "blue_light_filter", takze netreba G1 pravo.
Nefunguje. Meni switch v Nastavenia ale filter nenhadzuje.
Xiaomi Settings.System "screen_paper_mode_enabled" Rreba root!!! PPPPSaj G1 je tu nanic.
Huawei: Settings.System "eyes_protection_mode", netreba G1 pravo. - tu je to trocha cudne (dava tam aj ine hodnoty), ale funguje 0/1
Toto dam default pre vsetky ostatne mobily, napr. Oppo je vraj to iste co OnePlus:
Pixel: Settings.Secure "night_display_activated", treba G1 pravo.
OnePlus: Settings.Secure "night_display_activated", treba G1 pravo. Musel som si ho ale pridat, lebo ho tam nemal.
Kde netreba G1, skus, ci nebude treba PPPPS.
---
Toto asi nie:
Mozno taky test tam dat, ze nech si uzivatel skusi a za par sekund vrati, teda ak to pojde.
Vyskusaj aj to. Testuj na Galaxy S10.
Ak to vrati, tak potom to sprav tak, ze uzivatel musi cez test dako prejst. A len ak potvrdi
(najlepsie 2x) ze to nezhaslo obrazovku, tak to nastav ako povolene.
Cize sprav na to dialog s tymi 3 parametrami:
1. nemenit/zapnut/vypnut
2. automaticke zapinanie
3. teplota farby
4. Test tlacitko a len ak ho potvrdi, tak povolit OK.
To s tym OK, to treba ten preference spravit dako inac nez obycajne.
S pouiztim public Dialog onCreateDialog(Bundle savedInstanceState)
---
Zavolanie Settings = (I) parameter:
Toto je, ked to hore nepojde. Cize zavolanie Settings. Take uz mam pri nejakych parametroch profilu:
ACTION_NIGHT_DISPLAY_SETTINGS
Zdroj: https://developer.android.com/reference/android/provider/Settings#ACTION_NIGHT_DISPLAY_SETTINGS
Sprav aspon toto, lebo na Galaxy mi to hore vyplo obrazovku. :-(
------------------
EventsHandler.handleEvents()
- volane strasne vela krat zaujima ma restart udalosti a samotny orientacny senzor
- SENSOR_TYPE_DEVICE_ORIENTATION
- z OrientationScanner.runEventsHandlerForOrientationChange() - zisti, aky thread to pouziva
- z PPPExtenderBroadcastRecveiver.onReceive() - je to volane v HandlerThread - vroadcast treba, lebo senzor sleduje aplikacie na popredi
------------------------
Orientation sensor:
Light senzor sa generuje hrozne casto. Na Samsungu donekonecna a par krat za sekundu.
Spravil som sice:
- ze sa neregistruje, ak ziadna udalost ho nepouziva
- ze sa ma handler volat az o polovicu intervalu
Ale aj tak to musi zrat vela. Kazdych 5 sekund volat eventsHandler je proste vela.
Zatial mam nenapadlo, co s tym. Do nastaveni senzora daj aspon info preference o tom ze check light zerie bateriu.
-----------------------
java.lang.IllegalStateException: You are adding too many system settings.
You should stop using system settings for app specific data package: sk.henrichg.phoneprofilesplus
Tato exception nie je sposobena tym, ze uz je prilis vela veci nakonfigurovanych v profile?
Neviem kedy sa nastavuje pocitadlo. Ze by to bola vec threadu? Lebo vsetko v ActivateProfileHelper
volam v jednom threade.
Raz uz mi toto vzniklo aj pri inom parametri, ktory by nemal byt null, takz enull to nie je:
PHONE_MODEL=SM-A145P
BRAND=samsung
at sk.henrichg.phoneprofilesplus.ActivateProfileHelper.execute(ActivateProfileHelper.java:4838)
Settings.System.putInt(appContext.getContentResolver(),
Settings.System.SCREEN_BRIGHTNESS,
profile.getDeviceBrightnessManualValue(appContext));
Tu sa nahadzuje integer takze profile.getDeviceBrightnessManualValue(appContext) nevrati null.
Mozno sa to uvolnuje postupne, ako to nahadzuje do db. Tak mozno to ani nie je vec threadu, ale package.
Proste prilis vela veci naraz menim. Sa to cachuje Ako ale toto vyriesit? Hm, hm.
HOTOVO tak, ze zapisujem len ak uz taha hodnota nie je zapisana. To by mohlo dost zmensit pocet zapisov.
--------------------------
NFC senzor:
Aplikacia NFC Tags:
- zapisuje tag takto:
- DATA: com.miui.calculator
- FORMAT: External (04) = NfcRecord.TNF_EXTERNAL_TYPE
- TYPE: android.com:pkg
- PAYLOAD: com.miui.calculator
Aplikacia NFC Tasks okamzite spisti Kakulacku, ziaden sys dialog, ci tag precitat sa nezobrazi.
PPP:
- zapisuje tag takto:
- DATA: hhh
- FORMAT: Media (02) = NdefRecord.TNF_MIME_MEDIA
- TYPE: application/vnd.phoneprofilesplus.events
- PAYLOAD: hhh
Dialog sa zobrazuje.
No a teraz otazka: preco sa zobrazuje ten hnusny dialog?
Skus teda pouzit tiez External.
Ako spravit Intent + ako spravit NdfeRecord:
https://developer.android.com/develop/connectivity/nfc/nfc#ext-type
-------------------------------------
Check novych verzii PPP:
Keď nemám Droid-ify. Čo urobím? Otvorím GitHub? Týka sa to denného checku, mesačného aj toho z menu?
Lebo ma napadlo, ze ak nema Dorid-ify, mohol by som testnut NeoStore a ak ani to, tak F-Droid.
U F-Droid mam problem, ze nema default IzzyOnDroid. Hm.
---
Raz denne - toto notifikuje novu verziu, ked naozaj vyjde v IzzyOnDroid:
Hlada verziu, co je v releases.md
TU MUSI BYT verzia z releases.md v IzzyOnDroid. Ak nie je, nenotifikuje.
CheckCriticalPPPReleasesBroadcastReceiver pozera pre API >=33 IzzyOnDroid repo,
zorbrai notifikaciu k tam JE pppReleaseData.versionCodeInReleases.
Pre nizsie API hned zobrazi notifikaciu.
Notifikacia otvara CheckPPPReleasesActivity s:
_intent.putExtra(CheckPPPReleasesActivity.EXTRA_CRITICAL_CHECK, true);
_intent.putExtra(CheckPPPReleasesActivity.EXTRA_NEW_VERSION_NAME, versionNameInReleases);
_intent.putExtra(CheckPPPReleasesActivity.EXTRA_NEW_VERSION_CODE, versionCodeInReleases);
---
Mesacne - toto je len taky check, ze "Kukni sa , ci nahodou nie je vonku nova verzia":
Testuje, co je nainstalovane Droid-ify, NeoStore, F-Droid a podla toho robi:
1. nie je aplikacia:
Hlada verziu, co je v releases.md
- Pre API >= 33 pozera IzzyOnDroid repo, hlada tam pppReleaseData.versionCodeInReleases,
zobrazi notifikaciu ak NIE JE v IzzyOnDroid - bude pozerat do GitHub.
- Pre nizsie API hned zobrazi notifikaciu - bude pozerat do GitHub.
2. je aplikacia:
Hned zobrazi notifikaciu - istalovat sa bude aplikaciou.
Notifikacia otvara CheckPPPReleasesActivity s:
_intent.putExtra(CheckPPPReleasesActivity.EXTRA_CRITICAL_CHECK, false);
_intent.putExtra(CheckPPPReleasesActivity.EXTRA_NEW_VERSION_NAME, versionNameInReleases);
_intent.putExtra(CheckPPPReleasesActivity.EXTRA_NEW_VERSION_CODE, versionCodeInReleases);
---
CheckPPPReleasesActivity:
Na tie 2 pripady hore nie je menuItem nastavene, takze sa volashowDialog kde sa menuItem da podla
EXTRA_CRITICAL_CHECK na -1 alebo -2.
- Ked je criticalCheck = false. Podla toho, co je nainstalovane sa vola prislusny obchod. TOTO JE SUPER:
if (droidifyInstalled)
checkInDroidIfy(activity, false);
else if (neostoreInstalled)
checkInNeoStore(activity);
else if (fdroidInstalled)
checkInFDroid(activity);
else {
if (Build.VERSION.SDK_INT < 33)
checkInGitHub(activity, false);
else {
checkInDroidIfy(activity, true);
}
}
Akurat musis pozriet ked nema ziaden obchod Tak bud natvrdo chce Droid-Ify (checkInDroidIfy())
alebo GitHub (checkInGitHub()). Toto podla API verzie.
checkInDroidIfy(): Zobrazi dialog na instalciu PPP cez Droid-ify a ak nie je nainstalovane Droid-ify,
dialog ponuka jeho instalaciu.
checkInGitHub(): Zobrazi dialog na instalciu PPP, cisto len z GitHub.
Takze ak nie je ziadna apka, natvrdo pyta Drodi-ify. Myslim, ze toto moze byt. Droid-ify je preferovane,
ale ak ma nainstaloane nieoc ine, pouzije to.
- Ked je criticalCheck = true. Tu je pytany Drodi-ify:
if (Build.VERSION.SDK_INT < 33)
checkInGitHub(activity, false);
else {
checkInDroidIfy(activity, true);
}
Musis pozriet: bud natvrdo chce Droid-Ify (checkInDroidIfy()) alebo GitHub (checkInGitHub()).
Toto podla API verzie.
checkInDroidIfy(): Zobrazi dialog na instalciu PPP cez Droid-ify a ak nie je nainstalovane Droid-ify,
dialog ponuka jeho instalaciu.
checkInGitHub(): Zobrazi dialog na instalciu PPP, cisto len z GitHub.
!!!
Tu bez ohladu na to, ci ma naistalovanu inu apku, pyta Droid-ify natvrdo. Tu musi tiez pozerat aplikacie
a ponukat nainstalovanu.
HOTOVO
---
Z Editor menu - GitHub (toto je v CheckPPPReleasesActivity.showDialog()):
if (Build.VERSION.SDK_INT < 33)
checkInGitHub(activity, false);
else {
checkInDroidIfy(activity, true);
}
checkInDroidIfy(): Zobrazi dialog na instalciu PPP cez Droid-ify a ak nie je nainstalovane Droid-ify,
dialog ponuka jeho instalaciu.
checkInGitHub(): Zobrazi dialog na instalciu PPP, cisto len z GitHub.
Toto je OK, ma to ponuknut dialog na Droid-ify pre API 33+, Je v nom poznamka o tom, ze instalacia
z GitHub nie je podporovana a je tam tl. na otvorenie Droid-ify.
Ked nie je Droid-ify nainstalovane, zobrazuje link na IzzyOnDroid, pre API >= 33 pise, ze stiahnutie apk
nie je podporovane. Ponuka tl. na instalaciu Droid-ify.
-------------
Check novych verzii PPPE a PPPPS:
Tu notifikaciu zobrazuje ImportantInfoNotification.
Zobrazuje sa:
- v momente ked povolim notifkacie pre PPP
- ked startne PPP servis
Cize nie az tak casto. Ale tu sa netestuje, ci su naistalovane stores a podobne. Len sa zobrazi otifikacia.
PPPE a PPPPS ale sa da instalovat aj z prislusnych dialogov, co sa otvoria z preferences.
Dalej sa da instalovat z ImportantInfoActivity.
Na instalaciu sa vola:
ExtenderDialogPreferenceFragment.installPPPExtender()
- ak ma daky store instalovany, instaluje natvrdo zo storu
- ak nema store instalovany:
- pre API 33+: ponuka instalciu Droid-ify -> vola installDroidIfy(), a az potom moze PPPE instalovat.
- pre nizsie API instaluje z GitHub -> installExtenderFromGitHub()
- upozornuje ze nie je podporvana instalacia zo stiahnuteho APK pre API >= 33.
Ale toto podla mna nema zmysel, kedze installExtenderFromGitHub() je volany vzdy len pre API < 33.
PPPPSDialogPreferenceFragment.installPPPPutSettings()
Pre API < 34:
- ak ma daky store instalovany, instaluje natvrdo zo storu
- ak nema store instalovany:
- pre API 33+: ponuka instalciu Droid-ify -> vola installDroidIfy(), a az potom moze PPPE instalovat.
- pre nizsie API instaluje z GitHub -> installExtenderFromGitHub()
- upozornuje ze nie je podporvana instalacia zo stiahnuteho APK pre API >= 33.
Ale toto podla mna nema zmysel, kedze installExtenderFromGitHub() je volany vzdy len pre API < 33.
Pre API >= 34:
- vola installPPPPutSettingsFromGitHub34()
- je tam link na InstallWithOptions, klik ho downloadne.
- je tam dalsi link na downlaod PPPPS.
- je tam navod ako naistalovat PPPS pomocou InstallWithOptions.
--------------
PPP:
Add: "Force stop applications" with root.
Add: "Use dynamic color for indicator" to draw indicators with dynamic color if global "Use dynamic colors" is disabled. Widget One row and List.
Add: New parameter into Settings/Editor: "Hide event details".
Add: New parameter into Settings/Editor: "Hide event details for "Start order"".
Change: Removed splash screen at start of Editor.
Change: Acronyms strings changed to icons.
Change: "Screen timeout" profile parameter for OnePlus without Shizuku.
Change: Install PPP from installed store also for critical PPP version.
Change: Removed Twitter/X from support menus and README.md.
Change: Added Mastodon into README.md
Change: Added icons in "Support" menu items.
Change: Added icons in "Check app. releases" menu items.
Change: Allow "Notification sensor" when only application is configured (not needed is "Check text").
Change: "Notification sensor", fixed "Check text".
Change: "Switch profiles" into icon widget when are configured only 2 profiles.
Change: Delay for start of BT connected devices detector when is started from broadcast.
Change: Increased size of preference titles.
Change: Long click to Tasker command in Important info -> direct copy to clipboard.
Change: Reverted back height of PPP notification for Samsung devices in Amdroid 14+
Change: "Activity log"/"Help" as activity.
Change: Widgets: Rounded corners radius + opaqueness of background for API >= 31.
Change: Widgets: Added parameter "Use dynamic colors" for preferences indicator when global "Dynamic colors" is disabled.
Change: Call "Request ignore battery optimizations" from Settings/System/Battery optimization, if is not set.
Change: Vertically center of profile name in Activator header, if preferences indicator is disabled.
Change: Better detection of drag handle click.
Change: Added background dim for popup windows.
Change: Small changes in GUI.
Fix: "Call screening" sensor block calls, even when event is not running.
Fix: Animation of open/close dialogs.
Fix: Bluetooth enable/disable.
Fix: NFC enable/disable not working in Android 14.
Fix: Color of preference values in PPP Settings.
Fix: Maybe fixed bad notification exception at first PPP start.
Fix: Popup windows in API level < 30.