0

我可能会误解,但我有一个带有后台 SIP 连接的应用程序。我想测试打盹模式的效果并在插入时激活它,如下所示:

{turn screen off}
adb shell dumpsys battery unplug
adb shell dumpsys deviceidle force-idle

它报告:Now forced in to idle mode

在这一点上,我希望 SIP 连接终止,但它不会,并且应用程序会继续报告通过 logcat 中的 SIP 接收到的传入事件。

该应用程序未列入白名单。该应用程序使用前台服务。它还具有活动的 BLE 连接。测试的设备是 Android 9.0、7.0 和 6.0。没有即将到来的警报。

打瞌睡没有激活吗?为什么我仍然可以在打盹模式下使用后台 SIP?

我已经查看了打瞌睡模式未激活的其他问题,它们与我的场景无关或没有帮助。

输出自adb shell dumpsys deviceidle

  Settings:
    light_after_inactive_to=+3m0s0ms
    light_pre_idle_to=+3m0s0ms
    light_idle_to=+5m0s0ms
    light_idle_factor=2.0
    light_max_idle_to=+15m0s0ms
    light_idle_maintenance_min_budget=+1m0s0ms
    light_idle_maintenance_max_budget=+5m0s0ms
    min_light_maintenance_time=+5s0ms
    min_deep_maintenance_time=+30s0ms
    inactive_to=+30m0s0ms
    sensing_to=+4m0s0ms
    locating_to=+30s0ms
    location_accuracy=20.0m
    motion_inactive_to=+10m0s0ms
    idle_after_inactive_to=+30m0s0ms
    idle_pending_to=+5m0s0ms
    max_idle_pending_to=+10m0s0ms
    idle_pending_factor=2.0
    idle_to=+1h0m0s0ms
    max_idle_to=+6h0m0s0ms
    idle_factor=2.0
    min_time_to_alarm=+1h0m0s0ms
    max_temp_app_whitelist_duration=+5m0s0ms
    mms_temp_app_whitelist_duration=+1m0s0ms
    sms_temp_app_whitelist_duration=+20s0ms
    notification_whitelist_duration=+30s0ms
    wait_for_unlock=false
  Idling history:
         normal: -19h4m49s215ms (screen)
     light-idle: -18h54m32s964ms
    light-maint: -18h48m18s528ms
     light-idle: -18h48m11s920ms
         normal: -18h43m43s296ms (screen)
     light-idle: -18h40m13s536ms
    light-maint: -18h33m18s510ms
     light-idle: -18h33m12s60ms
         normal: -18h31m31s253ms (screen)
     light-idle: -18h27m17s548ms
    light-maint: -18h22m16s567ms
     light-idle: -18h22m2s291ms
         normal: -18h17m49s816ms (screen)
     light-idle: -18h13m29s513ms
    light-maint: -18h7m11s538ms
     light-idle: -18h7m6s333ms
         normal: -17h57m35s217ms (screen)
     light-idle: -17h53m29s554ms
         normal: -17h52m26s147ms (screen)
     light-idle: -17h47m54s553ms
    light-maint: -17h42m44s848ms
     light-idle: -17h42m35s25ms
    light-maint: -17h30m45s356ms
     light-idle: -17h30m21s806ms
    light-maint: -17h12m18s549ms
     light-idle: -17h12m13s371ms
    light-maint: -16h57m13s326ms
     light-idle: -16h57m7s306ms
      deep-idle: -16h48m45s370ms
         normal: -16h38m46s314ms (screen)
     light-idle: -16h34m21s565ms
    light-maint: -16h28m36s542ms
     light-idle: -16h28m30s110ms
         normal: -16h21m56s316ms (screen)
     light-idle: -16h17m47s563ms
    light-maint: -16h12m18s512ms
     light-idle: -16h12m13s313ms
    light-maint: -16h2m12s536ms
         normal: -16h2m9s150ms (screen)
     light-idle: -15h57m18s531ms
         normal: -15h55m10s373ms (screen)
     light-idle: -15h51m18s792ms
    light-maint: -15h43m25s404ms
     light-idle: -15h43m18s390ms
         normal: -15h33m2s763ms (screen)
     light-idle: -13h42m17s846ms
    light-maint: -13h37m17s863ms
     light-idle: -13h37m12s681ms
    light-maint: -13h27m11s882ms
     light-idle: -13h27m4s561ms
         normal: -13h17m31s644ms (screen)
     light-idle: -13h13m25s398ms
    light-maint: -13h8m24s883ms
     light-idle: -13h8m18s614ms
    light-maint: -12h57m17s861ms
     light-idle: -12h57m12s700ms
    light-maint: -12h42m11s838ms
     light-idle: -12h41m48s997ms
         normal: -12h41m13s943ms (screen)
     light-idle: -12h25m52s900ms
         normal: -12h24m21s664ms (screen)
     light-idle: -12h21m14s813ms
    light-maint: -12h12m45s380ms
     light-idle: -12h12m38s73ms
    light-maint: -12h1m52s833ms
     light-idle: -12h1m46s112ms
    light-maint: -11h46m45s885ms
     light-idle: -11h45m53s812ms
    light-maint: -11h28m29s849ms
     light-idle: -11h28m22s804ms
      deep-idle: -11h15m53s818ms
     deep-maint: -10h30m44s772ms
      deep-idle: -10h25m44s590ms
         normal: -9h36m22s919ms (motion)
     light-idle: -9h30m17s889ms
    light-maint: -9h14m52s870ms
     light-idle: -9h14m45s265ms
    light-maint: -8h38m52s831ms
     light-idle: -8h38m46s242ms
      deep-idle: -8h28m29s770ms
     deep-maint: -7h31m25s804ms
      deep-idle: -7h30m40s510ms
     deep-maint: -5h33m26s791ms
      deep-idle: -5h32m56s244ms
     deep-maint: -1h42m24s704ms
      deep-idle: -1h41m53s988ms
         normal: -1h10m9s174ms (screen)
     light-idle: -48m17s830ms
    light-maint: -42m17s880ms
     light-idle: -42m10s218ms
    light-maint: -31m34s844ms
     light-idle: -31m27s280ms
         normal: -30m35s597ms (screen)
     light-idle: -26m15s855ms
         normal: -23m19s137ms (screen)
      deep-idle: -7m21s262ms
     deep-maint: -4m38s5ms
      deep-idle: -4m36s505ms
     deep-maint: -4m33s406ms
      deep-idle: -4m32s376ms
  Whitelist (except idle) system apps:
    {a bunch of apps that aren't my app}
  Whitelist system apps:
    {a bunch of apps that aren't my app}
  Whitelist user apps:
    {a bunch of apps that aren't my app}
  Whitelist (except idle) all app ids:
    1000
    1001
    1201
    1203
    2000
    5003
    5004
    5006
    5010
    5012
    5017
    5018
    10003
    10006
    10007
    10008
    10015
    10024
    10025
    10029
    10031
    10032
    10037
    10042
    10044
    10047
    10048
    10051
    10053
    10054
    10056
    10063
    10065
    10066
    10067
    10071
    10080
    10095
    10100
    10116
    10120
    10129
    10136
    10162
    10165
    10167
    10169
    10173
    10176
    10178
    10181
    10183
    10189
    10199
    10220
    10233
    10272
    10278
    10294
    10305
    10311
    10313
    10314
    10319
    10329
    10330
    11254
    11280
    11475
  Whitelist user app ids:
    5017
    10003
    10051
    10162
    10199
    10220
    10272
    10278
    10294
    10314
    11254
    11280
    11475
  Whitelist all app ids:
    1000
    1001
    1201
    1203
    2000
    5003
    5004
    5006
    5010
    5012
    5017
    5018
    10003
    10006
    10007
    10008
    10015
    10024
    10025
    10029
    10031
    10032
    10037
    10042
    10044
    10047
    10048
    10051
    10054
    10056
    10063
    10065
    10067
    10071
    10080
    10095
    10100
    10116
    10120
    10136
    10162
    10165
    10167
    10169
    10173
    10176
    10178
    10181
    10183
    10189
    10199
    10220
    10233
    10272
    10278
    10294
    10305
    10311
    10313
    10314
    10329
    10330
    11254
    11280
    11475
  mLightEnabled=true  mDeepEnabled=true
  mForceIdle=true
  mMotionSensor={Sensor name="SAMSUNG Significant Motion Sensor", vendor="Samsung Inc.", version=2, type=17, maxRange=1.0, resolution=1.0, power=0.3, minDelay=-1}
  mScreenOn=false
  mScreenLocked=true
  mNetworkConnected=true
  mCharging=false
  mMotionActive=true
  mNotMoving=false
  mLocating=false mHasGps=true mHasNetwork=false mLocated=false
  mState=IDLE mLightState=OVERRIDE
  mInactiveTimeout=+30m0s0ms
  mActiveIdleOpCount=-1
  mNextAlarmTime=+3h55m27s612ms
  mNextIdlePendingDelay=+10m0s0ms
  mNextIdleDelay=+6h0m0s0ms
  mMaintenanceStartTime=-4m33s410ms

4

0 回答 0