Commit graph android_device_samsung_a20/universal7885-common/apps/CameraLightSensor
Author SHA1 Message Date
roynatech2544
4584ec21f2
universal7885: CameraLightSensor: Set notification to low priority
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
2022-03-22 18:57:19 +09:00
Soo-Hwan Na
4bd32cf76d
universal7885: CameraLightSensor: Fix param
The param "Intent" can be null
2022-03-22 18:55:39 +09:00
roynatech2544
dd3ffdff56
universal7885: SamsungParts: Use activity name specified on AndroidManifest.xml
Change-Id: I98df41354e39e04cdcc06701d6663ad362795bdf
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
2022-03-22 18:51:41 +09:00
roynatech2544
0518bb3630
universal7885: CameraLightSensor: Fix thread endless loop
* If auto brightness is turned off

Change-Id: I654dd6c4db8d8910779fa256c70efcdb51fac49c
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
2022-03-22 18:51:23 +09:00
roynatech2544
0522bd9d3d
universal7885: CameraLightSensor: Allow user to mute the app's notification
android.app.NotificationChannel
public void setBlockable(boolean blockable)
Allows users to block notifications sent through this channel, if this channel belongs to a package that is signed with the system signature. If the channel does not belong to a package that is signed with the system signature, this method does nothing, since such channels are blockable by default and cannot be set to be unblockable.

Change-Id: Idfa7a672c0be585381239b879ce386e6e99d0619
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
2022-03-22 18:51:06 +09:00
roynatech2544
7f2d2c5b3c
universal7885: CameraLightSensor: Convert to Kotlin
Change-Id: I8162d1f88583143a333b282ad59e45085ec66023
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
2022-03-22 18:50:50 +09:00
roynatech2544
e6d0c326c9
universal7885: CameraLightSensor: Add privapp permissions
* Logcat: Privileged permission android.permission.WRITE_SECURE_SETTINGS for package com.eurekateam.cameralightsensor (/system/priv-app/CameraLightSensor) not in privapp-permissions allowlist

* Turn off debug bool too

Change-Id: Ieae2542852568ceb40017db6a559ded185d582e3
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
2022-03-22 18:47:19 +09:00
roynatech2544
e4569f7c82
universal7885: CameraLightSensor: Use correct code to start service
* W ActivityManager: Unable to start service Intent { cmp=com.eurekateam.cameralightsensor/.CameraLightSensorService } U=0: not found

* Ref: https://stackoverflow.com/questions/19105587/unable-to-start-service-intent-not-found

* Makes BootReceiver unable to start service
2022-03-22 18:45:59 +09:00
roynatech2544
9d3976a986
universal7885: CameraLightSensor: return START_STICKY
* Both codes are only relevant when the phone runs out of memory and kills the service before it finishes executing. START_STICKY tells the OS to recreate the service after it has enough memory and call onStartCommand() again with a null intent. START_NOT_STICKY tells the OS to not bother recreating the service again. There is also a third code START_REDELIVER_INTENT that tells the OS to recreate the service and redeliver the same intent to onStartCommand().

https: //stackoverflow.com/questions/9093271/start-sticky-and-start-not-sticky
Change-Id: I3d5e8d8ee4e6c7270e0a7c8ccc881ec520563801
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
2022-03-22 18:44:19 +09:00
roynatech2544
ae86b3fdcb
universal7885: CameraLightSensor: Merge codes to 2 files and fix bugs
* Add proguard rules too

* Auto-Brightness still working even if the settings is turned off
2022-03-22 18:43:50 +09:00
roynatech2544
0d81c5b97d
universal7885: CameraLightSensor: Correctly monitor brightness settings
* Added an observer
2022-03-22 18:39:42 +09:00
roynatech2544
e96c97cad8
universal7885: CameraLightSensor: Fix some issues on cam
* It was non-usable even when CameraLightSensor service is off
2022-03-22 18:38:55 +09:00
Soo-Hwan Na
c5ec118a76
universal7885: CameraLightSensor: Fix misc mistakes
Change-Id: Ie549fc3ae747fc6601adb2677365e0039bcd2fd4
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
2022-03-22 18:37:05 +09:00
roynatech2544
4f2af28177
universal7885: CameraLightSensor: Fix the service running even if I turn auto-brightness off
Change-Id: I795aef4cbd9d2d5676c8d4ccae11ce5fef828907
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
2022-03-22 18:36:29 +09:00
roynatech2544
0fc8d0c629
a20: Address SELinux denials
* Additionally, try to save more battery on CameraLightSensor

Change-Id: I8a3a86a67eeefb0b023e4162f0a32c9ecca20ff4
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
2022-03-22 18:35:27 +09:00
Gabriel2392
aa12d2a377
universal7885: CameraLightSensor: Finalize code 2022-03-22 18:35:01 +09:00
roynatech2544
e17ee16b93
universal7885: CameraLightSensor: Inital Test
Change-Id: I74b97bec8b5e173acda1939896835ac807b83c71
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
2022-03-22 18:34:01 +09:00
roynatech2544
6fb48f8f49
universal7885: Merge common thing and cleanup
Change-Id: I05c133732980792d49e0495c343e39f8a58b11f9
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
2022-03-22 18:33:37 +09:00
roynatech2544
56c3102c14
universal7885: Inital cameraLightSensor impl
Change-Id: I75791c6b28700d71c990c15b9798fde9713d2e24
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
2022-03-22 18:33:25 +09:00