Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DfuProgressListener : Java.Lang.Object, IDfuProgressListener
- {
- private UpdateFirmwareListActivity activity;
- public DfuProgressListener(UpdateFirmwareListActivity activity)
- {
- this.activity = activity;
- }
- public void OnDeviceConnected(string p0)
- {
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- System.Diagnostics.Debug.WriteLine($"###OnDeviceConnected: {p0}");
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- activity.IsUpdateRunning = true;
- }
- public void OnDeviceConnecting(string p0)
- {
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- System.Diagnostics.Debug.WriteLine($"###OnDeviceConnecting: {p0}");
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- }
- public void OnDeviceDisconnected(string p0)
- {
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- System.Diagnostics.Debug.WriteLine($"###OnDeviceDisconnected: {p0}");
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- }
- public void OnDeviceDisconnecting(string p0)
- {
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- System.Diagnostics.Debug.WriteLine($"###OnDeviceDisconnecting: {p0}");
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- }
- public void OnDfuAborted(string p0)
- {
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- System.Diagnostics.Debug.WriteLine($"###OnDfuAborted: {p0}");
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- activity.IsUpdateRunning = false;
- }
- public void OnDfuCompleted(string p0)
- {
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- System.Diagnostics.Debug.WriteLine($"###OnDfuCompleted: {p0}");
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- activity.IsUpdateRunning = false;
- activity.UpdateFirmwareCompleted();
- }
- public void OnDfuProcessStarted(string p0)
- {
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- System.Diagnostics.Debug.WriteLine($"###OnDfuProcessStarted: {p0}");
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- activity.IsUpdateRunning = true;
- }
- public void OnDfuProcessStarting(string p0)
- {
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- System.Diagnostics.Debug.WriteLine($"###OnDfuProcessStarting: {p0}");
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- activity.IsUpdateRunning = true;
- }
- public void OnEnablingDfuMode(string p0)
- {
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- System.Diagnostics.Debug.WriteLine($"###OnEnablingDfuMode: {p0}");
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- }
- public void OnError(string p0, int p1, int p2, string p3)
- {
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- System.Diagnostics.Debug.WriteLine($"###OnError: {p3}");
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- activity.IsUpdateRunning = false;
- activity.UpdateFirmwareError();
- }
- public void OnFirmwareValidating(string p0)
- {
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- System.Diagnostics.Debug.WriteLine($"###OnFirmwareValidating: {p0}");
- System.Diagnostics.Debug.WriteLine("-----------------------------------------");
- }
- public void OnProgressChanged(string p0, int p1, float p2, float p3, int p4, int p5)
- {
- activity.UpdateProgress.Hide();
- activity.UpdateFirmwareProgress(p1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement