Commit 98931c7b authored by Nicolas Fella's avatar Nicolas Fella

Rename DeviceSettigsActivity->PluginSettingsActivity

parent a616d5af
......@@ -65,7 +65,7 @@
</intent-filter>
</activity>
<activity
android:name="org.kde.kdeconnect.UserInterface.DeviceSettingsActivity"
android:name="org.kde.kdeconnect.UserInterface.PluginSettingsActivity"
android:label="@string/device_menu_plugins"
android:parentActivityName="org.kde.kdeconnect.UserInterface.MainActivity">
<meta-data
......@@ -259,10 +259,10 @@
<activity
android:name="org.kde.kdeconnect.Plugins.NotificationsPlugin.NotificationFilterActivity"
android:label="@string/title_activity_notification_filter"
android:parentActivityName="org.kde.kdeconnect.UserInterface.DeviceSettingsActivity">
android:parentActivityName="org.kde.kdeconnect.UserInterface.PluginSettingsActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.DeviceSettingsActivity" />
android:value="org.kde.kdeconnect.UserInterface.PluginSettingsActivity" />
</activity>
<activity android:name="org.kde.kdeconnect.Plugins.PhotoPlugin.PhotoActivity" />
......
......@@ -34,7 +34,7 @@ import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.Toast;
import org.kde.kdeconnect.UserInterface.DeviceSettingsActivity;
import org.kde.kdeconnect.UserInterface.PluginSettingsActivity;
import org.kde.kdeconnect.UserInterface.MainActivity;
import org.kde.kdeconnect_tp.R;
......@@ -167,10 +167,10 @@ public class RemoteKeyboardService
if (instances.size() == 1) { // single instance of RemoteKeyboardPlugin -> access its settings
RemoteKeyboardPlugin plugin = instances.get(0);
if (plugin != null) {
Intent intent = new Intent(this, DeviceSettingsActivity.class);
Intent intent = new Intent(this, PluginSettingsActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(DeviceSettingsActivity.EXTRA_DEVICE_ID, plugin.getDeviceId());
intent.putExtra(DeviceSettingsActivity.EXTRA_PLUGIN_KEY, plugin.getPluginKey());
intent.putExtra(PluginSettingsActivity.EXTRA_DEVICE_ID, plugin.getDeviceId());
intent.putExtra(PluginSettingsActivity.EXTRA_PLUGIN_KEY, plugin.getPluginKey());
startActivity(intent);
}
} else { // != 1 instance of plugin -> show main activity view
......
......@@ -42,7 +42,7 @@ import org.json.JSONObject;
import org.kde.kdeconnect.BackgroundService;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.Helpers.StorageHelper;
import org.kde.kdeconnect.UserInterface.DeviceSettingsActivity;
import org.kde.kdeconnect.UserInterface.PluginSettingsActivity;
import org.kde.kdeconnect.UserInterface.PluginSettingsFragment;
import org.kde.kdeconnect_tp.R;
......@@ -185,7 +185,7 @@ public class SftpSettingsFragment
private void restoreActionMode() {
try {
if (savedActionModeState.getBoolean(KEY_ACTION_MODE_ENABLED)) {
actionMode = ((DeviceSettingsActivity)requireActivity()).startSupportActionMode(this);
actionMode = ((PluginSettingsActivity)requireActivity()).startSupportActionMode(this);
if (actionMode != null) {
JSONArray jsonArray = savedActionModeState.getJSONArray(KEY_ACTION_MODE_SELECTED_ITEMS);
......@@ -438,7 +438,7 @@ public class SftpSettingsFragment
@Override
public void onLongClick(StoragePreference storagePreference) {
if (actionMode == null) {
actionMode = ((DeviceSettingsActivity)requireActivity()).startSupportActionMode(this);
actionMode = ((PluginSettingsActivity)requireActivity()).startSupportActionMode(this);
if (actionMode != null) {
for (int i = 0, count = preferenceCategory.getPreferenceCount(); i < count; i++) {
......
......@@ -229,7 +229,7 @@ public class DeviceFragment extends Fragment {
}
menu.add(R.string.device_menu_plugins).setOnMenuItemClickListener(menuItem -> {
Intent intent = new Intent(mActivity, DeviceSettingsActivity.class);
Intent intent = new Intent(mActivity, PluginSettingsActivity.class);
intent.putExtra("deviceId", mDeviceId);
startActivity(intent);
return true;
......
......@@ -53,10 +53,10 @@ public class DeviceSettingsAlertDialogFragment extends AlertDialogFragment {
setCallback(new Callback() {
@Override
public void onPositiveButtonClicked() {
Intent intent = new Intent(requireActivity(), DeviceSettingsActivity.class);
Intent intent = new Intent(requireActivity(), PluginSettingsActivity.class);
intent.putExtra(DeviceSettingsActivity.EXTRA_DEVICE_ID, deviceId);
intent.putExtra(DeviceSettingsActivity.EXTRA_PLUGIN_KEY, pluginKey);
intent.putExtra(PluginSettingsActivity.EXTRA_DEVICE_ID, deviceId);
intent.putExtra(PluginSettingsActivity.EXTRA_PLUGIN_KEY, pluginKey);
requireActivity().startActivity(intent);
}
});
......
......@@ -32,7 +32,7 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
public class DeviceSettingsActivity
public class PluginSettingsActivity
extends AppCompatActivity
implements PluginPreference.PluginPreferenceCallback {
......@@ -47,7 +47,7 @@ public class DeviceSettingsActivity
ThemeUtil.setUserPreferredTheme(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_device_settings);
setContentView(R.layout.activity_plugin_settings);
if (getSupportActionBar() != null) {
getSupportActionBar().setDefaultDisplayHomeAsUpEnabled(true);
......@@ -68,7 +68,7 @@ public class DeviceSettingsActivity
Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragmentPlaceHolder);
if (fragment == null) {
if (pluginKey == null) {
fragment = DeviceSettingsFragment.newInstance(deviceId);
fragment = PluginSettingsListFragment.newInstance(deviceId);
} else {
Device device = BackgroundService.getInstance().getDevice(deviceId);
Plugin plugin = device.getPlugin(pluginKey);
......
......@@ -80,6 +80,6 @@ public class PluginSettingsFragment extends PreferenceFragmentCompat {
}
public String getDeviceId() {
return ((DeviceSettingsActivity)requireActivity()).getDeviceId();
return ((PluginSettingsActivity)requireActivity()).getDeviceId();
}
}
......@@ -35,7 +35,7 @@ import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.PreferenceScreen;
import androidx.recyclerview.widget.RecyclerView;
public class DeviceSettingsFragment extends PreferenceFragmentCompat {
public class PluginSettingsListFragment extends PreferenceFragmentCompat {
private static final String ARG_DEVICE_ID = "deviceId";
private static final String KEY_RECYCLERVIEW_LAYOUTMANAGER_STATE = "RecyclerViewLayoutmanagerState";
......@@ -50,8 +50,8 @@ public class DeviceSettingsFragment extends PreferenceFragmentCompat {
*/
private boolean stateSaved;
public static DeviceSettingsFragment newInstance(@NonNull String deviceId) {
DeviceSettingsFragment fragment = new DeviceSettingsFragment();
public static PluginSettingsListFragment newInstance(@NonNull String deviceId) {
PluginSettingsListFragment fragment = new PluginSettingsListFragment();
Bundle args = new Bundle();
args.putString(ARG_DEVICE_ID, deviceId);
......
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