Skip to content

Commit

Permalink
Bugfix for compilation error in LogcatReader when Opaque is built.
Browse files Browse the repository at this point in the history
  • Loading branch information
iiordanov committed Jan 27, 2019
1 parent abe40b5 commit d7ae63b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Opaque/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.undatech.opaque"
android:versionCode="1461"
android:versionCode="1462"
android:versionName="1.4.6" >

<uses-permission android:name="android.permission.INTERNET"></uses-permission>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.undatech.opaque.util;

import com.iiordanov.bVNC.Constants;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
Expand All @@ -14,6 +12,7 @@

public class LogcatReader {
public static String TAG = "LogcatReader";
private static final int LOGCAT_MAX_LINES = 500;
private List<String> logcatCommand = new ArrayList<String>();

public LogcatReader() {
Expand All @@ -25,8 +24,8 @@ public LogcatReader() {
}

public String getMyLogcat(int lines) {
ArrayList<String> logCatLines = new ArrayList<>(Constants.LOGCAT_MAX_LINES);
StringBuilder logCatOutput = new StringBuilder(Constants.LOGCAT_MAX_LINES);
ArrayList<String> logCatLines = new ArrayList<>(LOGCAT_MAX_LINES);
StringBuilder logCatOutput = new StringBuilder(LOGCAT_MAX_LINES);
String line;

try {
Expand All @@ -40,7 +39,7 @@ public String getMyLogcat(int lines) {
e.printStackTrace();
}

for (int i = Math.max(logCatLines.size() - Constants.LOGCAT_MAX_LINES, 0); i < logCatLines.size(); i++) {
for (int i = Math.max(logCatLines.size() - LOGCAT_MAX_LINES, 0); i < logCatLines.size(); i++) {
logCatOutput.append(logCatLines.get(i));
}

Expand Down

0 comments on commit d7ae63b

Please sign in to comment.