Differential D17250 Diff 47307 src/org/kde/kdeconnect/Plugins/RunCommandPlugin/RunCommandPlugin.java
Changeset View
Changeset View
Standalone View
Standalone View
src/org/kde/kdeconnect/Plugins/RunCommandPlugin/RunCommandPlugin.java
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | 39 | public class RunCommandPlugin extends Plugin { | |||
---|---|---|---|---|---|
64 | } | 64 | } | ||
65 | 65 | | |||
66 | public ArrayList<CommandEntry> getCommandItems() { | 66 | public ArrayList<CommandEntry> getCommandItems() { | ||
67 | return commandItems; | 67 | return commandItems; | ||
68 | } | 68 | } | ||
69 | 69 | | |||
70 | @Override | 70 | @Override | ||
71 | public String getDisplayName() { | 71 | public String getDisplayName() { | ||
72 | return context.getResources().getString(R.string.pref_plugin_runcommand); | 72 | return context.getResources().getString(R.string.plugin_runcommand); | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | @Override | 75 | @Override | ||
76 | public String getDescription() { | 76 | public String getDescription() { | ||
77 | return context.getResources().getString(R.string.pref_plugin_runcommand_desc); | 77 | return context.getResources().getString(R.string.pref_plugin_runcommand_desc); | ||
78 | } | 78 | } | ||
79 | 79 | | |||
80 | @Override | 80 | @Override | ||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Line(s) | |||||
169 | public void startMainActivity(Activity parentActivity) { | 169 | public void startMainActivity(Activity parentActivity) { | ||
170 | Intent intent = new Intent(parentActivity, RunCommandActivity.class); | 170 | Intent intent = new Intent(parentActivity, RunCommandActivity.class); | ||
171 | intent.putExtra("deviceId", device.getDeviceId()); | 171 | intent.putExtra("deviceId", device.getDeviceId()); | ||
172 | parentActivity.startActivity(intent); | 172 | parentActivity.startActivity(intent); | ||
173 | } | 173 | } | ||
174 | 174 | | |||
175 | @Override | 175 | @Override | ||
176 | public String getActionName() { | 176 | public String getActionName() { | ||
177 | return context.getString(R.string.pref_plugin_runcommand); | 177 | return context.getString(R.string.plugin_runcommand); | ||
178 | } | 178 | } | ||
179 | 179 | | |||
180 | public boolean canAddCommand(){ | 180 | public boolean canAddCommand(){ | ||
181 | return canAddCommand; | 181 | return canAddCommand; | ||
182 | } | 182 | } | ||
183 | 183 | | |||
184 | void sendSetupPacket() { | 184 | void sendSetupPacket() { | ||
185 | NetworkPacket np = new NetworkPacket(RunCommandPlugin.PACKET_TYPE_RUNCOMMAND_REQUEST); | 185 | NetworkPacket np = new NetworkPacket(RunCommandPlugin.PACKET_TYPE_RUNCOMMAND_REQUEST); | ||
186 | np.set("setup", true); | 186 | np.set("setup", true); | ||
187 | device.sendPacket(np); | 187 | device.sendPacket(np); | ||
188 | } | 188 | } | ||
189 | 189 | | |||
190 | } | 190 | } |