summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorArtur Dryomov <artur.dryomov@gmail.com>2013-03-22 22:13:30 +0300
committerMichael Meeks <michael.meeks@suse.com>2013-03-25 10:33:36 +0000
commit2d8547d095897037388b27075fd7dc182a4e4912 (patch)
tree204535bc6ab1b175b102e773ecb9f70111ca269d /android
parent514d6c6fb61437a2e4f6c94abb4bfea22936f86c (diff)
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/2915 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@suse.com> Tested-by: Michael Meeks <michael.meeks@suse.com>
Diffstat (limited to 'android')
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java1
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java6
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java1
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java1
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java11
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/communication/Client.java2
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java2
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java6
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/communication/Server.java2
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java2
10 files changed, 7 insertions, 27 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java b/android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java
index be82eeb99a7f..8f172e5dada4 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java
@@ -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;
}
diff --git a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
index d3a0352cea1c..51e590f1d3ab 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
@@ -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() {
diff --git a/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java b/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java
index 1b8c044fcc06..3b0f6842ba76 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java
@@ -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();
diff --git a/android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java b/android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java
index 56d5bad6ca3a..471e96bedcf6 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java
@@ -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);
diff --git a/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java b/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java
index d1f248761454..c939973c106d 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java
@@ -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);
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/Client.java b/android/sdremote/src/org/libreoffice/impressremote/communication/Client.java
index ce5e3ad0e946..198b87332af6 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/Client.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/Client.java
@@ -58,7 +58,7 @@ public abstract class Client {
Thread t = new Thread() {
public void run() {
listen();
- };
+ }
};
t.start();
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java b/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java
index 5b326612b313..8028f00ea956 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java
@@ -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,
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java b/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java
index 5a6316ed237e..4ba252f406ea 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java
@@ -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);
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/Server.java b/android/sdremote/src/org/libreoffice/impressremote/communication/Server.java
index 82172beb427b..77e6eb3fcc7f 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/Server.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/Server.java
@@ -12,7 +12,7 @@ public class Server {
public enum Protocol {
NETWORK, BLUETOOTH
- };
+ }
private Protocol mProtocol;
private String mAddress;
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java b/android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java
index 703069ce0f31..f1726ad85474 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java
@@ -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++) {