1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-30 08:11:17 +00:00

Only copy device ID when finger lifts

This commit is contained in:
Lode Hoste 2015-04-13 22:13:29 +02:00
parent 7ddee2f953
commit 499309fcc1

View file

@ -184,10 +184,12 @@ public class DrawerFragment extends Fragment implements RestApi.OnReceiveSystemI
mDeviceId.setOnTouchListener(new View.OnTouchListener() { mDeviceId.setOnTouchListener(new View.OnTouchListener() {
@Override @Override
public boolean onTouch(View view, MotionEvent motionEvent) { public boolean onTouch(View view, MotionEvent motionEvent) {
if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
mActivity.getApi().copyDeviceId(mDeviceId.getText().toString()); mActivity.getApi().copyDeviceId(mDeviceId.getText().toString());
view.performClick();
return true; return true;
} }
return false;
}
}); });
mCpuUsage.setText(new DecimalFormat("0.00").format(info.cpuPercent) + "%"); mCpuUsage.setText(new DecimalFormat("0.00").format(info.cpuPercent) + "%");
mRamUsage.setText(RestApi.readableFileSize(mActivity, info.sys)); mRamUsage.setText(RestApi.readableFileSize(mActivity, info.sys));