code: private synchronized static void acquireWakeLock(Context context) {
          // Setup wake lock.
          if (sWakeLock == null) {
              PowerManager powerManager = (PowerManager) context.getApplicationContext().getSystemService(
                      Context.POWER_SERVICE);
              sWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, NAME);
              sWakeLock.setReferenceCounted(true);
          }
  
          // Acquire lock.
          sWakeLock.acquire();
  
          sLogger.log(WingsService.class, "acquireWakeLock", "sWakeLock=" + sWakeLock);
      }
docs: Acquires a wake lock.
  
  @param context the {@link Context}.