|
|
|
@ -24,7 +24,7 @@ import android.view.MenuItem;
|
|
|
|
|
import android.view.View;
|
|
|
|
|
import android.widget.Toast;
|
|
|
|
|
|
|
|
|
|
import com.xypower.common.FileUtils;
|
|
|
|
|
import com.xypower.common.FilesUtils;
|
|
|
|
|
import com.xypower.common.JSONUtils;
|
|
|
|
|
import com.xypower.common.MicroPhotoContext;
|
|
|
|
|
import com.xypower.mpremote.databinding.ActivityDeviceBinding;
|
|
|
|
@ -253,7 +253,7 @@ public class DeviceActivity extends AppCompatActivity {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (adbShellResponse.getExitCode() == 0) {
|
|
|
|
|
String[] lines = FileUtils.splitLines(adbShellResponse.getAllOutput());
|
|
|
|
|
String[] lines = FilesUtils.splitLines(adbShellResponse.getAllOutput());
|
|
|
|
|
for (String line : lines) {
|
|
|
|
|
int pos = line.indexOf("]: [");
|
|
|
|
|
if (pos != -1) {
|
|
|
|
@ -276,7 +276,7 @@ public class DeviceActivity extends AppCompatActivity {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (adbShellResponse.getExitCode() == 0) {
|
|
|
|
|
String[] lines = FileUtils.splitLines(adbShellResponse.getAllOutput());
|
|
|
|
|
String[] lines = FilesUtils.splitLines(adbShellResponse.getAllOutput());
|
|
|
|
|
for (String line : lines) {
|
|
|
|
|
int pos = line.indexOf("versionName=");
|
|
|
|
|
if (pos != -1) {
|
|
|
|
@ -307,7 +307,7 @@ public class DeviceActivity extends AppCompatActivity {
|
|
|
|
|
res = pullFile(adb, remoteFilePath, localFilePath);
|
|
|
|
|
|
|
|
|
|
if (res) {
|
|
|
|
|
String content = FileUtils.readTextFile(localFilePath.getAbsolutePath());
|
|
|
|
|
String content = FilesUtils.readTextFile(localFilePath.getAbsolutePath());
|
|
|
|
|
if (!TextUtils.isEmpty(content)) {
|
|
|
|
|
int pos = content.indexOf(" ");
|
|
|
|
|
if (pos != -1) {
|
|
|
|
|