Skip to content

Commit

Permalink
Why use PARTIAL when we can still get FULL!?
Browse files Browse the repository at this point in the history
  • Loading branch information
n8fr8 committed Jul 3, 2018
1 parent 77fd35f commit ea7facf
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/main/java/org/havenapp/main/service/MonitorService.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.PixelFormat;
import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
Expand All @@ -26,6 +28,12 @@
import android.support.v4.app.NotificationCompat;
import android.telephony.SmsManager;
import android.text.TextUtils;
import android.view.Gravity;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.WindowManager;

import com.google.android.cameraview.CameraView;

import org.havenapp.main.HavenApp;
import org.havenapp.main.MonitorActivity;
Expand Down Expand Up @@ -138,8 +146,10 @@ public void onCreate() {

showNotification();

// startCamera();

PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);
wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
wakeLock = powerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK,
"MyWakelockTag");
wakeLock.acquire();
}
Expand Down Expand Up @@ -360,4 +370,6 @@ else if (eventTrigger.getType() == EventTrigger.CAMERA_VIDEO) {
}




}

0 comments on commit ea7facf

Please sign in to comment.