Differential D17818 Diff 48252 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 All 18 Lines | |||||
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | package org.kde.kdeconnect.Plugins.RunCommandPlugin; | 22 | package org.kde.kdeconnect.Plugins.RunCommandPlugin; | ||
23 | 23 | | |||
24 | import android.app.Activity; | 24 | import android.app.Activity; | ||
25 | import android.content.Intent; | 25 | import android.content.Intent; | ||
26 | import android.graphics.drawable.Drawable; | 26 | import android.graphics.drawable.Drawable; | ||
27 | import android.support.v4.content.ContextCompat; | | |||
28 | 27 | | |||
29 | import org.json.JSONException; | 28 | import org.json.JSONException; | ||
30 | import org.json.JSONObject; | 29 | import org.json.JSONObject; | ||
31 | import org.kde.kdeconnect.NetworkPacket; | 30 | import org.kde.kdeconnect.NetworkPacket; | ||
32 | import org.kde.kdeconnect.Plugins.Plugin; | 31 | import org.kde.kdeconnect.Plugins.Plugin; | ||
33 | import org.kde.kdeconnect_tp.R; | 32 | import org.kde.kdeconnect_tp.R; | ||
34 | 33 | | |||
35 | import java.util.ArrayList; | 34 | import java.util.ArrayList; | ||
36 | import java.util.Collections; | 35 | import java.util.Collections; | ||
37 | import java.util.Iterator; | 36 | import java.util.Iterator; | ||
38 | 37 | | |||
38 | import androidx.core.content.ContextCompat; | ||||
39 | | ||||
39 | public class RunCommandPlugin extends Plugin { | 40 | public class RunCommandPlugin extends Plugin { | ||
40 | 41 | | |||
41 | private final static String PACKET_TYPE_RUNCOMMAND = "kdeconnect.runcommand"; | 42 | private final static String PACKET_TYPE_RUNCOMMAND = "kdeconnect.runcommand"; | ||
42 | private final static String PACKET_TYPE_RUNCOMMAND_REQUEST = "kdeconnect.runcommand.request"; | 43 | private final static String PACKET_TYPE_RUNCOMMAND_REQUEST = "kdeconnect.runcommand.request"; | ||
43 | 44 | | |||
44 | private final ArrayList<JSONObject> commandList = new ArrayList<>(); | 45 | private final ArrayList<JSONObject> commandList = new ArrayList<>(); | ||
45 | private final ArrayList<CommandsChangedCallback> callbacks = new ArrayList<>(); | 46 | private final ArrayList<CommandsChangedCallback> callbacks = new ArrayList<>(); | ||
46 | private final ArrayList<CommandEntry> commandItems = new ArrayList<>(); | 47 | private final ArrayList<CommandEntry> commandItems = new ArrayList<>(); | ||
▲ Show 20 Lines • Show All 144 Lines • Show Last 20 Lines |