mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-22 12:05:32 -04:00
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>
This commit is contained in:
parent
2c3de84078
commit
9d3976a986
1 changed files with 1 additions and 1 deletions
|
|
@ -301,7 +301,7 @@ public class CameraLightSensorService extends Service {
|
|||
destroy = false;
|
||||
avail = true;
|
||||
startForeground(50, PushNotification());
|
||||
return START_NOT_STICKY;
|
||||
return START_STICKY;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in a new issue