Kaydet (Commit) 2d8547d0 authored tarafından Artur Dryomov's avatar Artur Dryomov Kaydeden (comit) Michael Meeks

Clean up Impress remove client source code a bit.

* Remove unnecessary semicolons.
* Remove empty methods that only call super methods.
* Replace String concatenation with StringBuilder.
* Fix possible NullPointerException on String comparison.
* Remove TODO comments generated via IDE.

Change-Id: Id2d2ebd29386080715fd743f81fbfae3a4a0a5ce
Reviewed-on: https://gerrit.libreoffice.org/2915Reviewed-by: 's avatarChris Sherlock <chris.sherlock79@gmail.com>
Reviewed-by: 's avatarMichael Meeks <michael.meeks@suse.com>
Tested-by: 's avatarMichael Meeks <michael.meeks@suse.com>
üst 514d6c6f
......@@ -75,7 +75,6 @@ public class BlankScreenFragment extends SherlockFragment {
aListener);
v.findViewById(R.id.blankscreen_return).setOnClickListener(aListener);
mCommunicationService.getTransmitter().blankScreen();
// TODO Auto-generated method stub
return v;
}
......
......@@ -529,12 +529,6 @@ public class PresentationActivity extends SherlockFragmentActivity {
mActionBarManager.hidePopups();
return super.onInterceptTouchEvent(aEvent);
}
@Override
public boolean onTouchEvent(MotionEvent aEvent) {
return super.onTouchEvent(aEvent);
}
}
private BroadcastReceiver mListener = new BroadcastReceiver() {
......
......@@ -171,7 +171,6 @@ public class SelectorActivity extends SherlockActivity {
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
if (mCommunicationService != null) {
mCommunicationService.stopSearching();
......
......@@ -18,7 +18,6 @@ public class SettingsActivity extends SherlockPreferenceActivity {
// but build with sdk 15
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
addPreferencesFromResource(R.xml.preferences);
......
......@@ -82,17 +82,6 @@ public class ThumbnailFragment extends SherlockFragment {
mCurrentText = null;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public void onPause() {
super.onPause();
}
private void setSelected(int position) {
formatUnselected(mCurrentImage, mCurrentText);
......
......@@ -58,7 +58,7 @@ public abstract class Client {
Thread t = new Thread() {
public void run() {
listen();
};
}
};
t.start();
......
......@@ -33,7 +33,7 @@ public class CommunicationService extends Service implements Runnable {
public enum State {
DISCONNECTED, SEARCHING, CONNECTING, CONNECTED
};
}
/**
* Get the publicly visible device name -- generally the bluetooth name,
......
......@@ -99,13 +99,13 @@ public class Receiver {
}
} else if (aInstruction.equals("slide_notes")) {
int aSlideNumber = Integer.parseInt(aCommand.get(1));
String aNotes = new String();
StringBuilder aNotes = new StringBuilder();
for (int i = 2; i < aCommand.size(); i++) {
aNotes += aCommand.get(i);
aNotes.append(aCommand.get(i));
}
// Store image internally
mSlideShow.putNotes(aSlideNumber, aNotes);
mSlideShow.putNotes(aSlideNumber, aNotes.toString());
Intent aIntent = new Intent(
CommunicationService.MSG_SLIDE_NOTES);
......
......@@ -12,7 +12,7 @@ public class Server {
public enum Protocol {
NETWORK, BLUETOOTH
};
}
private Protocol mProtocol;
private String mAddress;
......
......@@ -63,7 +63,7 @@ public class ServerFinder {
break;
}
}
if (i == aBuffer.length || !aCommand.equals("LOREMOTE_ADVERTISE")) {
if (i == aBuffer.length || !"LOREMOTE_ADVERTISE".equals(aCommand)) {
return;
}
for (int j = i + 1; j < aBuffer.length; j++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment