From 617049a75950d8344b41aafdaf1ae7d9657765b1 Mon Sep 17 00:00:00 2001 From: Albert Almeida Date: Mon, 11 Dec 2017 17:47:27 +0100 Subject: [PATCH] Cleanup code Remove unused units and methods. --- AndroidDebugBridge.pas | 10 +--------- Animators.pas | 2 +- DumpFileLoader.pas | 2 +- FormOpenViewServerWindow.pas | 2 +- LayoutViewer.pas | 4 ++-- ViewServerLoader.pas | 2 +- 6 files changed, 7 insertions(+), 15 deletions(-) diff --git a/AndroidDebugBridge.pas b/AndroidDebugBridge.pas index eaa41a6..74525ee 100644 --- a/AndroidDebugBridge.pas +++ b/AndroidDebugBridge.pas @@ -33,7 +33,6 @@ TWindowManagerEntry = record function IsServerRunning: boolean; function StartServer: boolean; function StopServer: boolean; - function GetDeviceSerial: string; function GetWindowList(Timeout: integer = -1): TWindowManagerEntryArray; function DumpWindow(const WindowHash: string; const CheckCanceled: TObjectProcedure): TView; @@ -69,7 +68,6 @@ TAdbDeviceConnection = class procedure Disconnect; inline; function ShellExecute(const Command: string): TStream; procedure ConnectTcp(Port: integer); - property DeviceSerial: string read FDevice; property Socket: TTCPBlockSocket read GetSocket; end; @@ -86,7 +84,6 @@ TViewServerClient = class(TInterfacedObject, IViewServerClient) function IsServerRunning: boolean; function StartServer: boolean; function StopServer: boolean; - function GetDeviceSerial: string; function GetWindowList(Timeout: integer = -1): TWindowManagerEntryArray; // Used only for debugging purposes. class function LoadDumpWindowFile: TView; @@ -224,7 +221,7 @@ TViewServerCaptureViewTask = class(TCaptureViewTask) implementation uses - LazLogger, synsock; + synsock; const AdbServerPort = 5037; @@ -500,11 +497,6 @@ function TViewServerClient.StopServer: boolean; end; end; -function TViewServerClient.GetDeviceSerial: string; -begin - Result := FAdbDeviceConnection.DeviceSerial; -end; - function TViewServerClient.GetWindowList(Timeout: integer): TWindowManagerEntryArray; var Line: string; diff --git a/Animators.pas b/Animators.pas index 9bf665c..81aabb7 100644 --- a/Animators.pas +++ b/Animators.pas @@ -134,7 +134,7 @@ function FloatEvaluator(const Fraction: single; implementation uses - CustomTimer, fgl, dateutils, LCLIntf; + CustomTimer, fgl, LCLIntf; const AnimationTickInterval = 10; // milliseconds diff --git a/DumpFileLoader.pas b/DumpFileLoader.pas index e5404a2..d96465a 100644 --- a/DumpFileLoader.pas +++ b/DumpFileLoader.pas @@ -12,7 +12,7 @@ function CreateDumpFileLoadTask(const FilePath: string): TLayoutLoadTask; implementation uses - SysUtils, LazUTF8, laz2_XMLRead, laz2_DOM, Logging; + SysUtils, laz2_XMLRead, laz2_DOM, Logging; type { TDeviceMonitorDumpLoadTask } diff --git a/FormOpenViewServerWindow.pas b/FormOpenViewServerWindow.pas index c41796f..378acaf 100644 --- a/FormOpenViewServerWindow.pas +++ b/FormOpenViewServerWindow.pas @@ -5,7 +5,7 @@ interface uses - Classes, SysUtils, Forms, Controls, Graphics, Dialogs, + SysUtils, Forms, Controls, StdCtrls, AndroidDebugBridge; type diff --git a/LayoutViewer.pas b/LayoutViewer.pas index 3e923e8..087233d 100644 --- a/LayoutViewer.pas +++ b/LayoutViewer.pas @@ -5,8 +5,8 @@ interface uses - Classes, Controls, Graphics, Menus, ExtCtrls, ViewTypes, Animators, OpenGLContext, - TaskRunner, LMessages; + Classes, Controls, Graphics, ExtCtrls, ViewTypes, Animators, OpenGLContext, + LMessages; type diff --git a/ViewServerLoader.pas b/ViewServerLoader.pas index df5fe12..b6668f8 100644 --- a/ViewServerLoader.pas +++ b/ViewServerLoader.pas @@ -14,7 +14,7 @@ function CreateDumpWindowFileLoadTask: TLayoutLoadTask; implementation -uses AndroidDebugBridge, Logging, Classes, Graphics, TaskRunner, GLext, gl, LCLProc; +uses AndroidDebugBridge, Logging, Graphics, TaskRunner, GLext, gl, LCLProc; type