当前位置:   article > 正文

android关机流程后_shutdownthread.java

shutdownthread.java
在用户确认关机后,关机流程会走到ShutdownThread中.

ShutdownThread包含过具体关机和关机动画处理.
ShutdownThread.java

  public static void shutdown(final Context context, String reason, boolean confirm) {
        mReboot = false;
        mRebootSafeMode = false;
        mReason = reason;
        shutdownInner(context, confirm);
    }
    public static void reboot(final Context context, String reason, boolean confirm) {
        mReboot = true;
        mRebootSafeMode = false;
        mRebootHasProgressBar = false;
        mReason = reason;
        shutdownInner(context, confirm);
    }
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

上面分别是关机和重启的方法,差别在于mReboot的值.

再次确认关机或重启的提示框

再次确认关机或重启的提示框


    private static void shutdownInner(final Context context, boolean confirm) {
.....
        if (confirm) {
            ....
   
  • 1
  • 2
  • 3
  • 4
  • 5
本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/945244
推荐阅读
相关标签
  

闽ICP备14008679号