/// <summary> /// Refreshes the properties. /// </summary> public void RefreshProperties() { if (this.IsOnline) { try { this.Properties.Clear(); var receiver = new GetPropReceiver(); this.ExecuteShellCommand(GetPropReceiver.GetpropCommand, receiver); foreach (var property in receiver.Properties) { this.Properties.Add(property.Key, property.Value); } this.OnBuildInfoChanged(EventArgs.Empty); } catch (AdbException aex) { Log.Warn(LOG_TAG, aex); } } }
/// <summary> /// Gets the properties of a device. /// </summary> /// <param name="device"> /// The device for which to list the properties. /// </param> /// <returns> /// A dictionary containing the properties of the device, and their values. /// </returns> public static Dictionary<string, string> GetProperties(this DeviceData device) { var receiver = new GetPropReceiver(); AdbClient.Instance.ExecuteRemoteCommand(GetPropReceiver.GetpropCommand, device, receiver); return receiver.Properties; }
/// <summary> /// Refreshes the properties. /// </summary> public void RefreshProperties() { if (this.IsOnline) { try { this.Properties.Clear(); var receiver = new GetPropReceiver(); this.ExecuteShellCommand(GetPropReceiver.GetpropCommand, receiver); foreach (var property in receiver.Properties) { this.Properties.Add(property.Key, property.Value); } this.OnBuildInfoChanged(EventArgs.Empty); } catch (AdbException aex) { Log.w(LOG_TAG, aex); } } }