mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-29 13:17:43 +00:00
Convert fields to local variables
Summary: Depends on D10905 Convert to local variables where Android Studio suggested Test Plan: Compiles Reviewers: #kde_connect, mtijink Reviewed By: #kde_connect, mtijink Subscribers: #kde_connect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D10911
This commit is contained in:
parent
1456026bfc
commit
93c19cbb76
@ -53,8 +53,8 @@ public class LanLink extends BaseLink {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public enum ConnectionStarted {
|
public enum ConnectionStarted {
|
||||||
Locally, Remotely;
|
Locally, Remotely
|
||||||
};
|
}
|
||||||
|
|
||||||
private ConnectionStarted connectionSource; // If the other device sent me a broadcast,
|
private ConnectionStarted connectionSource; // If the other device sent me a broadcast,
|
||||||
// I should not close the connection with it
|
// I should not close the connection with it
|
||||||
|
@ -62,9 +62,6 @@ public class RemoteKeyboardService
|
|||||||
public boolean visible = false;
|
public boolean visible = false;
|
||||||
|
|
||||||
KeyboardView inputView = null;
|
KeyboardView inputView = null;
|
||||||
private final int StatusKeyIdx = 3;
|
|
||||||
private final int connectedIcon = R.drawable.ic_phonelink_white_36dp;
|
|
||||||
private final int disconnectedIcon = R.drawable.ic_phonelink_off_white_36dp;
|
|
||||||
|
|
||||||
Handler handler;
|
Handler handler;
|
||||||
|
|
||||||
@ -75,8 +72,11 @@ public class RemoteKeyboardService
|
|||||||
List<Keyboard.Key> keys = currentKeyboard.getKeys();
|
List<Keyboard.Key> keys = currentKeyboard.getKeys();
|
||||||
boolean connected = RemoteKeyboardPlugin.isConnected();
|
boolean connected = RemoteKeyboardPlugin.isConnected();
|
||||||
// Log.d("RemoteKeyboardService", "Updating keyboard connection icon, connected=" + connected);
|
// Log.d("RemoteKeyboardService", "Updating keyboard connection icon, connected=" + connected);
|
||||||
keys.get(StatusKeyIdx).icon = getResources().getDrawable(connected ? connectedIcon : disconnectedIcon);
|
int disconnectedIcon = R.drawable.ic_phonelink_off_white_36dp;
|
||||||
inputView.invalidateKey(StatusKeyIdx);
|
int connectedIcon = R.drawable.ic_phonelink_white_36dp;
|
||||||
|
int statusKeyIdx = 3;
|
||||||
|
keys.get(statusKeyIdx).icon = getResources().getDrawable(connected ? connectedIcon : disconnectedIcon);
|
||||||
|
inputView.invalidateKey(statusKeyIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -39,8 +39,6 @@ public class SftpPlugin extends Plugin {
|
|||||||
|
|
||||||
private static final SimpleSftpServer server = new SimpleSftpServer();
|
private static final SimpleSftpServer server = new SimpleSftpServer();
|
||||||
|
|
||||||
private int sftpPermissionExplanation = R.string.sftp_permission_explanation;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
return context.getResources().getString(R.string.pref_plugin_sftp);
|
return context.getResources().getString(R.string.pref_plugin_sftp);
|
||||||
@ -54,7 +52,7 @@ public class SftpPlugin extends Plugin {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onCreate() {
|
public boolean onCreate() {
|
||||||
server.init(context, device);
|
server.init(context, device);
|
||||||
permissionExplanation = sftpPermissionExplanation;
|
permissionExplanation = R.string.sftp_permission_explanation;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,11 +66,9 @@ public class SharePlugin extends Plugin {
|
|||||||
|
|
||||||
final static boolean openUrlsDirectly = true;
|
final static boolean openUrlsDirectly = true;
|
||||||
|
|
||||||
private int sharePermissionExplanation = R.string.share_optional_permission_explanation;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreate() {
|
public boolean onCreate() {
|
||||||
optionalPermissionExplanation = sharePermissionExplanation;
|
optionalPermissionExplanation = R.string.share_optional_permission_explanation;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,6 @@ public class PairingFragment extends Fragment implements PairingDeviceItem.Callb
|
|||||||
private static final int RESULT_PAIRING_SUCCESFUL = Activity.RESULT_FIRST_USER;
|
private static final int RESULT_PAIRING_SUCCESFUL = Activity.RESULT_FIRST_USER;
|
||||||
|
|
||||||
private View rootView;
|
private View rootView;
|
||||||
private View listRootView;
|
|
||||||
private SwipeRefreshLayout mSwipeRefreshLayout;
|
private SwipeRefreshLayout mSwipeRefreshLayout;
|
||||||
private MaterialActivity mActivity;
|
private MaterialActivity mActivity;
|
||||||
|
|
||||||
@ -76,7 +75,7 @@ public class PairingFragment extends Fragment implements PairingDeviceItem.Callb
|
|||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
|
|
||||||
rootView = inflater.inflate(R.layout.activity_refresh_list, container, false);
|
rootView = inflater.inflate(R.layout.activity_refresh_list, container, false);
|
||||||
listRootView = rootView.findViewById(R.id.listView1);
|
View listRootView = rootView.findViewById(R.id.listView1);
|
||||||
mSwipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.refresh_list_layout);
|
mSwipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.refresh_list_layout);
|
||||||
mSwipeRefreshLayout.setOnRefreshListener(
|
mSwipeRefreshLayout.setOnRefreshListener(
|
||||||
new SwipeRefreshLayout.OnRefreshListener() {
|
new SwipeRefreshLayout.OnRefreshListener() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user