50 lines
1.1 KiB
C#
50 lines
1.1 KiB
C#
using UnityEngine;
|
||
|
||
/// <summary>
|
||
/// 保留兼容API,但应用已取消Android开机自启。
|
||
/// </summary>
|
||
public class AndroidAutoStartManager : MonoBehaviour
|
||
{
|
||
private static AndroidAutoStartManager _instance;
|
||
|
||
public static AndroidAutoStartManager Instance
|
||
{
|
||
get
|
||
{
|
||
if (_instance == null)
|
||
{
|
||
GameObject go = new GameObject("AndroidAutoStartManager");
|
||
_instance = go.AddComponent<AndroidAutoStartManager>();
|
||
DontDestroyOnLoad(go);
|
||
}
|
||
|
||
return _instance;
|
||
}
|
||
}
|
||
|
||
public bool HasBootStartPermission()
|
||
{
|
||
return false;
|
||
}
|
||
|
||
public void SetAutoStartEnabled(bool enabled)
|
||
{
|
||
Debug.Log("[AutoStart] Android开机自启已在当前版本中禁用");
|
||
}
|
||
|
||
public bool IsAutoStartEnabled()
|
||
{
|
||
return false;
|
||
}
|
||
|
||
public void OpenAppSettings()
|
||
{
|
||
Debug.Log("[AutoStart] Android开机自启已禁用,无需打开自启设置");
|
||
}
|
||
|
||
public void PrintDiagnosticsInfo()
|
||
{
|
||
Debug.Log("[AutoStart] Android开机自启已禁用");
|
||
}
|
||
}
|