Fix minor code style issues.

Change-Id: I1cc46176efcdc0a869ba711054137e56662d7ab3
This commit is contained in:
Artur Dryomov
2013-09-07 11:54:04 +03:00
parent 710fc4728f
commit 3faefaafa6
8 changed files with 26 additions and 20 deletions

View File

@@ -20,8 +20,8 @@ import org.libreoffice.impressremote.communication.Server;
public class ComputerConnectionActivity extends SherlockFragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
protected void onCreate(Bundle aSavedInstanceState) {
super.onCreate(aSavedInstanceState);
setUpHomeButton();
setUpTitle();

View File

@@ -36,6 +36,7 @@ import org.libreoffice.impressremote.fragment.TimerSettingDialog;
import org.libreoffice.impressremote.util.FragmentOperator;
import org.libreoffice.impressremote.util.Intents;
import org.libreoffice.impressremote.util.Preferences;
import org.libreoffice.impressremote.util.SavedStates;
public class SlideShowActivity extends SherlockFragmentActivity implements ServiceConnection {
private static enum Mode {
@@ -65,7 +66,7 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
return Mode.PAGER;
}
return (Mode) aSavedInstanceState.getSerializable("MODE");
return (Mode) aSavedInstanceState.getSerializable(SavedStates.Keys.MODE);
}
private void setUpHomeButton() {
@@ -94,9 +95,9 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
}
private boolean isKeepingScreenOnRequired() {
Preferences preferences = Preferences.getSettingsInstance(this);
Preferences aPreferences = Preferences.getSettingsInstance(this);
return preferences.getBoolean(Preferences.Keys.KEEP_SCREEN_ON);
return aPreferences.getBoolean(Preferences.Keys.KEEP_SCREEN_ON);
}
private void bindService() {
@@ -272,9 +273,9 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
}
private boolean areVolumeKeysActionsRequired() {
Preferences preferences = Preferences.getSettingsInstance(this);
Preferences aPreferences = Preferences.getSettingsInstance(this);
return preferences.getBoolean(Preferences.Keys.VOLUME_KEYS_ACTIONS);
return aPreferences.getBoolean(Preferences.Keys.VOLUME_KEYS_ACTIONS);
}
private boolean isLastSlideDisplayed() {
@@ -390,8 +391,8 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
}
private void callEditingTimer(Timer aTimer) {
DialogFragment aFragment = buildTimerEditingDialog(aTimer);
aFragment.show(getSupportFragmentManager(), TimerEditingDialog.TAG);
DialogFragment aTimerDialog = buildTimerEditingDialog(aTimer);
aTimerDialog.show(getSupportFragmentManager(), TimerEditingDialog.TAG);
aTimer.pause();
}
@@ -405,8 +406,8 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
}
private void callSettingTimer() {
DialogFragment aFragment = TimerSettingDialog.newInstance();
aFragment.show(getSupportFragmentManager(), TimerSettingDialog.TAG);
DialogFragment aTimerDialog = TimerSettingDialog.newInstance();
aTimerDialog.show(getSupportFragmentManager(), TimerSettingDialog.TAG);
}
private void stopSlideShow() {
@@ -439,7 +440,7 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
}
private void saveMode(Bundle aOutState) {
aOutState.putSerializable("MODE", mMode);
aOutState.putSerializable(SavedStates.Keys.MODE, mMode);
}
@Override

View File

@@ -120,8 +120,8 @@ public class ComputerConnectionFragment extends SherlockFragment implements Serv
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
public void onActivityCreated(Bundle aSavedInstanceState) {
super.onActivityCreated(aSavedInstanceState);
bindService();
}

View File

@@ -44,8 +44,8 @@ public class SlidesGridFragment extends SherlockFragment implements ServiceConne
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
public void onActivityCreated(Bundle aSavedInstanceState) {
super.onActivityCreated(aSavedInstanceState);
bindService();
}

View File

@@ -49,8 +49,8 @@ public class SlidesPagerFragment extends SherlockFragment implements ServiceConn
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
public void onActivityCreated(Bundle aSavedInstanceState) {
super.onActivityCreated(aSavedInstanceState);
bindService();
}

View File

@@ -20,6 +20,7 @@ import android.widget.TimePicker;
import com.actionbarsherlock.app.SherlockDialogFragment;
import org.libreoffice.impressremote.R;
import org.libreoffice.impressremote.util.Fragments;
import org.libreoffice.impressremote.util.Intents;
public class TimerEditingDialog extends SherlockDialogFragment implements TimePickerDialog.OnTimeSetListener, DialogInterface.OnClickListener {
@@ -40,7 +41,7 @@ public class TimerEditingDialog extends SherlockDialogFragment implements TimePi
private static Bundle buildArguments(int aMinutes) {
Bundle aArguments = new Bundle();
aArguments.putInt("MINUTES", aMinutes);
aArguments.putInt(Fragments.Arguments.MINUTES, aMinutes);
return aArguments;
}
@@ -49,7 +50,7 @@ public class TimerEditingDialog extends SherlockDialogFragment implements TimePi
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mMinutes = getArguments().getInt("MINUTES");
mMinutes = getArguments().getInt(Fragments.Arguments.MINUTES);
}
@Override

View File

@@ -17,6 +17,8 @@ public final class Fragments {
}
public static final String COMPUTER = "COMPUTER";
public static final String MINUTES = "MINUTES";
}
}

View File

@@ -12,5 +12,7 @@ public final class SavedStates {
public static final String PIN = "PIN";
public static final String ERROR_MESSAGE = "ERROR_MESSAGE";
public static final String MODE = "MODE";
}
}