Commit 37657388 authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

Uppercasing some stuff

parent 360e4bc1
......@@ -419,7 +419,7 @@ public class BackgroundService extends Service {
}).start();
}
public static <T extends Plugin> void runWithPlugin(final Context c, final String deviceId, final Class<T> pluginClass, final PluginCallback<T> cb) {
public static <T extends Plugin> void RunWithPlugin(final Context c, final String deviceId, final Class<T> pluginClass, final PluginCallback<T> cb) {
RunCommand(c, service -> {
Device device = service.getDevice(deviceId);
......
......@@ -222,7 +222,7 @@ public class MousePadActivity extends AppCompatActivity implements GestureDetect
mCurrentX = event.getX();
mCurrentY = event.getY();
BackgroundService.runWithPlugin(this, deviceId, MousePadPlugin.class, plugin -> {
BackgroundService.RunWithPlugin(this, deviceId, MousePadPlugin.class, plugin -> {
float deltaX = (mCurrentX - mPrevX) * displayDpiMultiplier * mCurrentSensitivity;
float deltaY = (mCurrentY - mPrevY) * displayDpiMultiplier * mCurrentSensitivity;
......@@ -293,7 +293,7 @@ public class MousePadActivity extends AppCompatActivity implements GestureDetect
@Override
public void onLongPress(MotionEvent e) {
getWindow().getDecorView().performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
BackgroundService.runWithPlugin(this, deviceId, MousePadPlugin.class, MousePadPlugin::sendSingleHold);
BackgroundService.RunWithPlugin(this, deviceId, MousePadPlugin.class, MousePadPlugin::sendSingleHold);
}
@Override
......@@ -303,13 +303,13 @@ public class MousePadActivity extends AppCompatActivity implements GestureDetect
@Override
public boolean onSingleTapConfirmed(MotionEvent e) {
BackgroundService.runWithPlugin(this, deviceId, MousePadPlugin.class, MousePadPlugin::sendSingleClick);
BackgroundService.RunWithPlugin(this, deviceId, MousePadPlugin.class, MousePadPlugin::sendSingleClick);
return true;
}
@Override
public boolean onDoubleTap(MotionEvent e) {
BackgroundService.runWithPlugin(this, deviceId, MousePadPlugin.class, MousePadPlugin::sendDoubleClick);
BackgroundService.RunWithPlugin(this, deviceId, MousePadPlugin.class, MousePadPlugin::sendDoubleClick);
return true;
}
......@@ -348,15 +348,15 @@ public class MousePadActivity extends AppCompatActivity implements GestureDetect
private void sendMiddleClick() {
BackgroundService.runWithPlugin(this, deviceId, MousePadPlugin.class, MousePadPlugin::sendMiddleClick);
BackgroundService.RunWithPlugin(this, deviceId, MousePadPlugin.class, MousePadPlugin::sendMiddleClick);
}
private void sendRightClick() {
BackgroundService.runWithPlugin(this, deviceId, MousePadPlugin.class, MousePadPlugin::sendRightClick);
BackgroundService.RunWithPlugin(this, deviceId, MousePadPlugin.class, MousePadPlugin::sendRightClick);
}
private void sendScroll(final float y) {
BackgroundService.runWithPlugin(this, deviceId, MousePadPlugin.class, plugin -> plugin.sendScroll(0, y));
BackgroundService.RunWithPlugin(this, deviceId, MousePadPlugin.class, plugin -> plugin.sendScroll(0, y));
}
//TODO: Does not work on KitKat with or without requestFocus()
......
......@@ -25,7 +25,7 @@ public class PhotoActivity extends AppCompatActivity {
protected void onStart() {
super.onStart();
BackgroundService.runWithPlugin(this, getIntent().getStringExtra("deviceId"), PhotoPlugin.class, plugin -> {
BackgroundService.RunWithPlugin(this, getIntent().getStringExtra("deviceId"), PhotoPlugin.class, plugin -> {
this.plugin = plugin;
});
......
......@@ -52,7 +52,7 @@ public class PresenterActivity extends AppCompatActivity {
final String deviceId = getIntent().getStringExtra("deviceId");
BackgroundService.runWithPlugin(this, deviceId, PresenterPlugin.class, plugin -> runOnUiThread(() -> {
BackgroundService.RunWithPlugin(this, deviceId, PresenterPlugin.class, plugin -> runOnUiThread(() -> {
this.plugin = plugin;
findViewById(R.id.next_button).setOnClickListener(v -> plugin.sendNext());
findViewById(R.id.previous_button).setOnClickListener(v -> plugin.sendPrevious());
......
......@@ -58,7 +58,7 @@ public class RunCommandActivity extends AppCompatActivity {
private void updateView() {
BackgroundService.runWithPlugin(this, deviceId, RunCommandPlugin.class, plugin -> {
BackgroundService.RunWithPlugin(this, deviceId, RunCommandPlugin.class, plugin -> {
runOnUiThread(() -> {
ListView view = findViewById(R.id.runcommandslist);
......@@ -119,7 +119,7 @@ public class RunCommandActivity extends AppCompatActivity {
addCommandButton.setOnClickListener(v -> {
BackgroundService.runWithPlugin(RunCommandActivity.this, deviceId, RunCommandPlugin.class, plugin -> {
BackgroundService.RunWithPlugin(RunCommandActivity.this, deviceId, RunCommandPlugin.class, plugin -> {
plugin.sendSetupPacket();
AlertDialog dialog = new AlertDialog.Builder(RunCommandActivity.this)
.setTitle(R.string.add_command)
......@@ -160,7 +160,7 @@ public class RunCommandActivity extends AppCompatActivity {
protected void onResume() {
super.onResume();
BackgroundService.runWithPlugin(this, deviceId, RunCommandPlugin.class, plugin -> {
BackgroundService.RunWithPlugin(this, deviceId, RunCommandPlugin.class, plugin -> {
plugin.addCommandsUpdatedCallback(commandsChangedCallback);
});
}
......@@ -169,7 +169,7 @@ public class RunCommandActivity extends AppCompatActivity {
protected void onPause() {
super.onPause();
BackgroundService.runWithPlugin(this, deviceId, RunCommandPlugin.class, plugin -> {
BackgroundService.RunWithPlugin(this, deviceId, RunCommandPlugin.class, plugin -> {
plugin.removeCommandsUpdatedCallback(commandsChangedCallback);
});
}
......
......@@ -89,7 +89,7 @@ public class SendFileActivity extends AppCompatActivity {
if (uris.isEmpty()) {
Log.w("SendFileActivity", "No files to send?");
} else {
BackgroundService.runWithPlugin(this, mDeviceId, SharePlugin.class, plugin -> plugin.queuedSendUriList(uris));
BackgroundService.RunWithPlugin(this, mDeviceId, SharePlugin.class, plugin -> plugin.queuedSendUriList(uris));
}
}
finish();
......
......@@ -113,7 +113,7 @@ public class ShareActivity extends AppCompatActivity {
list.setOnItemClickListener((adapterView, view, i, l) -> {
Device device = devicesList.get(i - 1); //NOTE: -1 because of the title!
BackgroundService.runWithPlugin(this, device.getDeviceId(), SharePlugin.class, plugin -> plugin.share(intent));
BackgroundService.RunWithPlugin(this, device.getDeviceId(), SharePlugin.class, plugin -> plugin.share(intent));
finish();
});
});
......@@ -147,7 +147,7 @@ public class ShareActivity extends AppCompatActivity {
final String deviceId = intent.getStringExtra("deviceId");
if (deviceId != null) {
BackgroundService.runWithPlugin(this, deviceId, SharePlugin.class, plugin -> {
BackgroundService.RunWithPlugin(this, deviceId, SharePlugin.class, plugin -> {
plugin.share(intent);
finish();
});
......
......@@ -33,7 +33,7 @@ import java.util.Collection;
import java.util.concurrent.ConcurrentHashMap;
@PluginFactory.LoadablePlugin
public class SystemvolumePlugin extends Plugin {
public class SystemVolumePlugin extends Plugin {
private final static String PACKET_TYPE_SYSTEMVOLUME = "kdeconnect.systemvolume";
private final static String PACKET_TYPE_SYSTEMVOLUME_REQUEST = "kdeconnect.systemvolume.request";
......@@ -45,7 +45,7 @@ public class SystemvolumePlugin extends Plugin {
private final ConcurrentHashMap<String, Sink> sinks;
private final ArrayList<SinkListener> listeners;
public SystemvolumePlugin() {
public SystemVolumePlugin() {
sinks = new ConcurrentHashMap<>();
listeners = new ArrayList<>();
}
......
......@@ -37,9 +37,9 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.ListFragment;
public class SystemvolumeFragment extends ListFragment implements Sink.UpdateListener, SystemvolumePlugin.SinkListener {
public class SystemvolumeFragment extends ListFragment implements Sink.UpdateListener, SystemVolumePlugin.SinkListener {
private SystemvolumePlugin plugin;
private SystemVolumePlugin plugin;
private Activity activity;
private SinkAdapter adapter;
private Context context;
......@@ -63,7 +63,7 @@ public class SystemvolumeFragment extends ListFragment implements Sink.UpdateLis
}
public void connectToPlugin(final String deviceId) {
BackgroundService.runWithPlugin(activity, deviceId, SystemvolumePlugin.class, plugin -> {
BackgroundService.RunWithPlugin(activity, deviceId, SystemVolumePlugin.class, plugin -> {
this.plugin = plugin;
plugin.addSinkListener(SystemvolumeFragment.this);
plugin.requestSinkList();
......
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