/// <summary> /// 发送收紧内存的命令 /// adb command example:adb shell am send-trim-memory 12345 RUNNING_LOW /// </summary> /// <param name="pid"></param> /// <param name="level"></param> /// <exception cref="Exceptions.AdbShellCommandFailedException"></exception> public void TrimMemory(int pid, TrimMemoryLevel level) { CmdStation.GetShellCommand(Device, $"am send-trim-memory {pid} {level}") .To(RaiseOutput) .Execute() .ThrowIfShellExitCodeNotEqualsZero(); }
public CommandResult TrimMemory(int pid, TrimMemoryLevel level) { return(executor.AdbShell(device, $"am send-trim-memory {pid} {level}")); }