frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiController.java
class StaEnabledState extends State {
switch (msg.what) {
case CMD_WIFI_TOGGLED:
if (! mSettingsStore.isWifiToggleEnabled()) {
if (checkScanOnlyModeAvailable()) {
transitionTo(mStaDisabledWithScanState);
} else {
transitionTo(mStaDisabledState); // 转入StaDisableState 处理 wifi disable 事项
}
}
class StaDisabledState extends State {
public void enter() {
mWifiStateMachinePrime.disableWifi(); // 转入wifiStateMachinePrime 处理wifi disable
// Supplicant can't restart right away, so note the time we switched off
mDisabledTimestamp = SystemClock.elapsedRealtime();
mDeferredEnableSerialNumber++;
mHaveDeferredEnable = false;
mWifiStateMachine.clearANQPCache();
}
}
1、素材包获取
链接: https://pan.baidu.com/s/1KgCtQ_7wt2mlbGbIaMVvmw 提取码: xxh8
2、将素材全部拉进去 3、创建新的场景 并且将场景添加到build settings里面
4、脚本
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityE…