Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 11d26129 authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

Rename SettingsActivity to DeviceSettingsActivity

parent a52aed16
......@@ -17,8 +17,8 @@
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.INTERNET" />
<!--<uses-permission android:name="android.permission.BLUETOOTH" />-->
<!--<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />-->
<!-- <uses-permission android:name="android.permission.BLUETOOTH" /> -->
<!-- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
......@@ -37,11 +37,9 @@
android:label="KDE Connect"
android:supportsRtl="true"
android:theme="@style/KdeConnectTheme">
<service
android:name="org.kde.kdeconnect.BackgroundService"
android:enabled="true" />
<service
android:name="org.kde.kdeconnect.Plugins.RemoteKeyboardPlugin.RemoteKeyboardService"
android:label="KDE Connect Remote Keyboard"
......@@ -49,6 +47,7 @@
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
<meta-data
android:name="android.view.im"
android:resource="@xml/remotekeyboardplugin_method" />
......@@ -60,12 +59,12 @@
android:theme="@style/KdeConnectTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="org.kde.kdeconnect.UserInterface.SettingsActivity"
android:name="org.kde.kdeconnect.UserInterface.DeviceSettingsActivity"
android:label="@string/device_menu_plugins"
android:parentActivityName="org.kde.kdeconnect.UserInterface.MainActivity">
<meta-data
......@@ -91,21 +90,20 @@
<activity
android:name="org.kde.kdeconnect.UserInterface.PluginSettingsActivity"
android:label="@string/device_menu_plugins"
android:parentActivityName="org.kde.kdeconnect.UserInterface.SettingsActivity">
android:parentActivityName="org.kde.kdeconnect.UserInterface.DeviceSettingsActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.SettingsActivity" />
android:value="org.kde.kdeconnect.UserInterface.DeviceSettingsActivity" />
</activity>
<activity
android:name="org.kde.kdeconnect.Plugins.SharePlugin.ShareSettingsActivity"
android:label="@string/device_menu_plugins"
android:parentActivityName="org.kde.kdeconnect.UserInterface.SettingsActivity">
android:parentActivityName="org.kde.kdeconnect.UserInterface.DeviceSettingsActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.Plugins.SharePlugin.ShareSettingsActivity" />
</activity>
<receiver android:name="org.kde.kdeconnect.KdeConnectBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REPLACED" />
......@@ -138,12 +136,13 @@
<activity
android:name="org.kde.kdeconnect.Plugins.MprisPlugin.MprisActivity"
android:label="@string/remote_control"
android:parentActivityName="org.kde.kdeconnect.UserInterface.MainActivity"
android:launchMode="singleTop">
android:launchMode="singleTop"
android:parentActivityName="org.kde.kdeconnect.UserInterface.MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.MainActivity" />
</activity>
<receiver android:name="org.kde.kdeconnect.Plugins.MprisPlugin.MprisMediaNotificationReceiver">
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
......@@ -157,44 +156,49 @@
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.MainActivity" />
</activity>
<activity android:name="org.kde.kdeconnect.Plugins.RunCommandPlugin.RunCommandWidgetDeviceSelector"
android:theme="@style/Theme.AppCompat.Light.Dialog"
<activity
android:name="org.kde.kdeconnect.Plugins.RunCommandPlugin.RunCommandWidgetDeviceSelector"
android:excludeFromRecents="true"
android:label="@string/pref_plugin_runcommand"
android:launchMode="singleTask"
android:screenOrientation="user"
android:noHistory="true"
android:excludeFromRecents="true"
android:label="@string/pref_plugin_runcommand"/>
android:screenOrientation="user"
android:theme="@style/Theme.AppCompat.Light.Dialog" />
<service
android:name="org.kde.kdeconnect.Plugins.RunCommandPlugin.RunCommandWidgetDataProviderService"
android:exported="false" android:permission="android.permission.BIND_REMOTEVIEWS"/>
<receiver android:label="@string/pref_plugin_runcommand" android:name="org.kde.kdeconnect.Plugins.RunCommandPlugin.RunCommandWidget">
android:exported="false"
android:permission="android.permission.BIND_REMOTEVIEWS" />
<receiver
android:name="org.kde.kdeconnect.Plugins.RunCommandPlugin.RunCommandWidget"
android:label="@string/pref_plugin_runcommand">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<intent-filter>
<action android:name="RUN_COMMAND_ACTION" />
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/remotecommandplugin_widget" />
</receiver>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/remotecommandplugin_widget" />
</receiver>
<activity android:name="org.kde.kdeconnect.Plugins.RunCommandPlugin.RunCommandUrlActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.nfc.action.NDEF_DISCOVERED"></action>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="kdeconnect" android:host="runcommand"/>
<data
android:host="runcommand"
android:scheme="kdeconnect" />
</intent-filter>
</activity>
<activity
android:name="org.kde.kdeconnect.Plugins.MousePadPlugin.MousePadActivity"
android:label="@string/remote_control"
......@@ -203,7 +207,6 @@
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.MainActivity" />
</activity>
<activity
android:name="org.kde.kdeconnect.Plugins.PresenterPlugin.PresenterActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
......@@ -214,7 +217,6 @@
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.MainActivity" />
</activity>
<activity
android:name="org.kde.kdeconnect.Plugins.SharePlugin.ShareActivity"
android:label="KDE Connect">
......@@ -272,7 +274,6 @@
android:value="org.kde.kdeconnect.UserInterface.PluginSettingsActivity" />
</activity>
</application>
</manifest>
</manifest>
\ No newline at end of file
......@@ -27,7 +27,6 @@ import android.app.Notification;
import android.app.PendingIntent;
import android.app.RemoteInput;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Resources;
......@@ -46,8 +45,8 @@ import android.util.Log;
import org.kde.kdeconnect.Helpers.AppsHelper;
import org.kde.kdeconnect.NetworkPacket;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect.UserInterface.DeviceSettingsActivity;
import org.kde.kdeconnect.UserInterface.MainActivity;
import org.kde.kdeconnect.UserInterface.SettingsActivity;
import org.kde.kdeconnect_tp.R;
import java.io.ByteArrayOutputStream;
......@@ -85,7 +84,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
}
@Override
public void startPreferencesActivity(final SettingsActivity parentActivity) {
public void startPreferencesActivity(final DeviceSettingsActivity parentActivity) {
if (hasPermission()) {
Intent intent = new Intent(parentActivity, NotificationFilterActivity.class);
parentActivity.startActivity(intent);
......
......@@ -23,7 +23,6 @@ package org.kde.kdeconnect.Plugins;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
......@@ -31,13 +30,12 @@ import android.os.Build;
import android.support.annotation.StringRes;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.view.View;
import android.widget.Button;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.NetworkPacket;
import org.kde.kdeconnect.UserInterface.DeviceSettingsActivity;
import org.kde.kdeconnect.UserInterface.PluginSettingsActivity;
import org.kde.kdeconnect.UserInterface.SettingsActivity;
import org.kde.kdeconnect_tp.R;
public abstract class Plugin {
......@@ -128,9 +126,9 @@ public abstract class Plugin {
* If hasSettings returns true, this will be called when the user
* wants to access this plugin preferences and should launch some
* kind of interface. The default implementation will launch a
* SettingsActivity with content from "yourplugin"_preferences.xml.
* PluginSettingsActivity with content from "yourplugin"_preferences.xml.
*/
public void startPreferencesActivity(SettingsActivity parentActivity) {
public void startPreferencesActivity(DeviceSettingsActivity parentActivity) {
Intent intent = new Intent(parentActivity, PluginSettingsActivity.class);
intent.putExtra("plugin_display_name", getDisplayName());
intent.putExtra("plugin_key", getPluginKey());
......
......@@ -50,7 +50,7 @@ import org.kde.kdeconnect.Helpers.MediaStoreHelper;
import org.kde.kdeconnect.Helpers.NotificationHelper;
import org.kde.kdeconnect.NetworkPacket;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect.UserInterface.SettingsActivity;
import org.kde.kdeconnect.UserInterface.DeviceSettingsActivity;
import org.kde.kdeconnect_tp.R;
import java.io.File;
......@@ -281,7 +281,7 @@ public class SharePlugin extends Plugin {
}
@Override
public void startPreferencesActivity(SettingsActivity parentActivity) {
public void startPreferencesActivity(DeviceSettingsActivity parentActivity) {
Intent intent = new Intent(parentActivity, ShareSettingsActivity.class);
intent.putExtra("plugin_display_name", getDisplayName());
intent.putExtra("plugin_key", getPluginKey());
......
......@@ -23,7 +23,6 @@ package org.kde.kdeconnect.UserInterface;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
......@@ -31,7 +30,6 @@ import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
......@@ -184,6 +182,7 @@ public class DeviceFragment extends Fragment {
return;
}
//Plugins button list
final Collection<Plugin> plugins = device.getLoadedPlugins().values();
for (final Plugin p : plugins) {
......@@ -197,7 +196,7 @@ public class DeviceFragment extends Fragment {
}
menu.add(R.string.device_menu_plugins).setOnMenuItemClickListener(menuItem -> {
Intent intent = new Intent(mActivity, SettingsActivity.class);
Intent intent = new Intent(mActivity, DeviceSettingsActivity.class);
intent.putExtra("deviceId", mDeviceId);
startActivity(intent);
return true;
......
......@@ -29,7 +29,7 @@ import org.kde.kdeconnect.Device;
import java.util.List;
public class SettingsActivity extends AppCompatPreferenceActivity {
public class DeviceSettingsActivity extends AppCompatPreferenceActivity {
static private String deviceId; //Static because if we get here by using the back button in the action bar, the extra deviceId will not be set.
......@@ -47,12 +47,12 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
BackgroundService.RunCommand(getApplicationContext(), service -> {
final Device device = service.getDevice(deviceId);
if (device == null) {
SettingsActivity.this.runOnUiThread(SettingsActivity.this::finish);
DeviceSettingsActivity.this.runOnUiThread(DeviceSettingsActivity.this::finish);
return;
}
List<String> plugins = device.getSupportedPlugins();
for (final String pluginKey : plugins) {
PluginPreference pref = new PluginPreference(SettingsActivity.this, pluginKey, device);
PluginPreference pref = new PluginPreference(DeviceSettingsActivity.this, pluginKey, device);
preferenceScreen.addPreference(pref);
}
});
......
......@@ -14,7 +14,7 @@ public class PluginPreference extends CheckBoxPreference {
final String pluginKey;
final View.OnClickListener listener;
public PluginPreference(final SettingsActivity activity, final String pluginKey, final Device device) {
public PluginPreference(final DeviceSettingsActivity activity, final String pluginKey, final Device device) {
super(activity);
setLayoutResource(R.layout.preference_with_button);
......
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