Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26b030d8 authored by Dan Gittik's avatar Dan Gittik
Browse files

Fixed power manager CTS test.

Added an annotation necessary to allow the power manager CTS test to
access the non-public method nap.

Test: adb install -r \
      out/host/linux-x86/cts/android-cts/testcases/CtsOsTestCases.apk
      adb shell am instrument -e class android.os.cts.PowerManagerTest \
      -w android.os.cts/android.support.test.runner.AndroidJUnitRunner

Change-Id: Ida939f074654bef351e2b8fd563c8463431ce9c6
Fixes: 77907164
parent 606440f1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -604,6 +604,10 @@ package android.os {
    field public static final android.os.Parcelable.Creator<android.os.IncidentReportArgs> CREATOR;
  }

  public final class PowerManager {
    method public void nap(long);
  }

  public class Process {
    method public static final int getThreadScheduler(int) throws java.lang.IllegalArgumentException;
  }
+0 −1
Original line number Diff line number Diff line
@@ -1494,7 +1494,6 @@ Landroid/os/PowerManager;->getMaximumScreenBrightnessSetting()I
Landroid/os/PowerManager;->getMinimumScreenBrightnessSetting()I
Landroid/os/PowerManager;->isLightDeviceIdleMode()Z
Landroid/os/PowerManager;->mService:Landroid/os/IPowerManager;
Landroid/os/PowerManager;->nap(J)V
Landroid/os/PowerManager;->userActivity(JZ)V
Landroid/os/PowerManager;->validateWakeLockParameters(ILjava/lang/String;)V
Landroid/os/PowerManager;->wakeUp(JLjava/lang/String;)V
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
import android.content.Context;
import android.util.Log;
import android.util.proto.ProtoOutputStream;
@@ -960,6 +961,7 @@ public final class PowerManager {
     *
     * @hide Requires signature permission.
     */
    @TestApi
    public void nap(long time) {
        try {
            mService.nap(time);