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 {
|
||||
Locally, Remotely;
|
||||
};
|
||||
Locally, Remotely
|
||||
}
|
||||
|
||||
private ConnectionStarted connectionSource; // If the other device sent me a broadcast,
|
||||
// I should not close the connection with it
|
||||
|
@ -62,9 +62,6 @@ public class RemoteKeyboardService
|
||||
public boolean visible = false;
|
||||
|
||||
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;
|
||||
|
||||
@ -75,8 +72,11 @@ public class RemoteKeyboardService
|
||||
List<Keyboard.Key> keys = currentKeyboard.getKeys();
|
||||
boolean connected = RemoteKeyboardPlugin.isConnected();
|
||||
// Log.d("RemoteKeyboardService", "Updating keyboard connection icon, connected=" + connected);
|
||||
keys.get(StatusKeyIdx).icon = getResources().getDrawable(connected ? connectedIcon : disconnectedIcon);
|
||||
inputView.invalidateKey(StatusKeyIdx);
|
||||
int disconnectedIcon = R.drawable.ic_phonelink_off_white_36dp;
|
||||
int connectedIcon = R.drawable.ic_phonelink_white_36dp;
|
||||
int statusKeyIdx = 3;
|
||||
keys.get(statusKeyIdx).icon = getResources().getDrawable(connected ? connectedIcon : disconnectedIcon);
|
||||
inputView.invalidateKey(statusKeyIdx);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -39,8 +39,6 @@ public class SftpPlugin extends Plugin {
|
||||
|
||||
private static final SimpleSftpServer server = new SimpleSftpServer();
|
||||
|
||||
private int sftpPermissionExplanation = R.string.sftp_permission_explanation;
|
||||
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return context.getResources().getString(R.string.pref_plugin_sftp);
|
||||
@ -54,7 +52,7 @@ public class SftpPlugin extends Plugin {
|
||||
@Override
|
||||
public boolean onCreate() {
|
||||
server.init(context, device);
|
||||
permissionExplanation = sftpPermissionExplanation;
|
||||
permissionExplanation = R.string.sftp_permission_explanation;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -66,11 +66,9 @@ public class SharePlugin extends Plugin {
|
||||
|
||||
final static boolean openUrlsDirectly = true;
|
||||
|
||||
private int sharePermissionExplanation = R.string.share_optional_permission_explanation;
|
||||
|
||||
@Override
|
||||
public boolean onCreate() {
|
||||
optionalPermissionExplanation = sharePermissionExplanation;
|
||||
optionalPermissionExplanation = R.string.share_optional_permission_explanation;
|
||||
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 View rootView;
|
||||
private View listRootView;
|
||||
private SwipeRefreshLayout mSwipeRefreshLayout;
|
||||
private MaterialActivity mActivity;
|
||||
|
||||
@ -76,7 +75,7 @@ public class PairingFragment extends Fragment implements PairingDeviceItem.Callb
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
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.setOnRefreshListener(
|
||||
new SwipeRefreshLayout.OnRefreshListener() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user