From 9b70e2df78d0558c38cd023f342804d82abe5ac2 Mon Sep 17 00:00:00 2001 From: CYZ <2782394648@qq.com> Date: Mon, 19 Jun 2023 16:08:34 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E7=B2=BE=E5=8C=96=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E5=8E=BB=E8=80=A6=E5=90=88"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 3bd30f91bc971c9d6cef91b13700f5a3d8dcad84. --- .../.idea/deploymentTargetDropDown.xml | 17 ---- .../2ab0711d9aa5839cecbb6cf0ed96f5a3f6470de5 | 0 .../7c120b7216f76ce98d1573d90803ab36f481640c | 84 +++++++++++++++++++ .../8c55c3ccc257e5907959013f99656e4c8ec3903e | 0 .../.idea/sonarlint/issuestore/index.pb | 8 +- .../com/example/sixaunyi/LoginActivity.java | 12 +-- 6 files changed, 93 insertions(+), 28 deletions(-) delete mode 100644 src/sixaunyi/.idea/deploymentTargetDropDown.xml create mode 100644 src/sixaunyi/.idea/sonarlint/issuestore/2/a/2ab0711d9aa5839cecbb6cf0ed96f5a3f6470de5 create mode 100644 src/sixaunyi/.idea/sonarlint/issuestore/7/c/7c120b7216f76ce98d1573d90803ab36f481640c create mode 100644 src/sixaunyi/.idea/sonarlint/issuestore/8/c/8c55c3ccc257e5907959013f99656e4c8ec3903e diff --git a/src/sixaunyi/.idea/deploymentTargetDropDown.xml b/src/sixaunyi/.idea/deploymentTargetDropDown.xml deleted file mode 100644 index a9167c3..0000000 --- a/src/sixaunyi/.idea/deploymentTargetDropDown.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/2/a/2ab0711d9aa5839cecbb6cf0ed96f5a3f6470de5 b/src/sixaunyi/.idea/sonarlint/issuestore/2/a/2ab0711d9aa5839cecbb6cf0ed96f5a3f6470de5 new file mode 100644 index 0000000..e69de29 diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/7/c/7c120b7216f76ce98d1573d90803ab36f481640c b/src/sixaunyi/.idea/sonarlint/issuestore/7/c/7c120b7216f76ce98d1573d90803ab36f481640c new file mode 100644 index 0000000..01d0bae --- /dev/null +++ b/src/sixaunyi/.idea/sonarlint/issuestore/7/c/7c120b7216f76ce98d1573d90803ab36f481640c @@ -0,0 +1,84 @@ + +l java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +p +java:S1104D"[Make mLocationClient a static final constant or non-public and provide accessors if needed.(L +q +java:S1104F"[Make mLocationOption a static final constant or non-public and provide accessors if needed.( +d +java:S2259"MA "NullPointerException" could be thrown; "mLocationClient" is nullable here.(Թ +c +java:S2095"LUse try-with-resources or close this "DatagramSocket" in a "finally" clause.( +o java:S115d"ZRename this constant name to match the regular expression '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.(뿧 +s java:S116I"YRename this field "Current_latlng" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +o java:S116["ZRename this field "ClearMarker_btn" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +r java:S116]"XRename this field "ChangeAct_btn" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +d java:S116i"PRename this field "Angle" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(D +q java:S116j"WRename this field "MonitorAngle" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(Ԁ +o java:S116l"ZRename this field "MonitorDistance" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( + +java:S1186"Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.( +i +java:S1450i"TRemove the "Angle" field and declare it as a local variable in the relevant methods.(D +w +java:S1450]"\Remove the "ChangeAct_btn" field and declare it as a local variable in the relevant methods.( +i +java:S1450H"SRemove the "city" field and declare it as a local variable in the relevant methods.( +m +java:S1450W"WRemove the "cityCode" field and declare it as a local variable in the relevant methods.( +r +java:S1450k"WRemove the "distance" field and declare it as a local variable in the relevant methods.(׾ +G +java:S1874S"1Remove this use of "PoiSearch"; it is deprecated.( +L +java:S1874U"1Remove this use of "PoiSearch"; it is deprecated.( +[ +java:S1124d"EReorder the modifiers to comply with the Java Language Specification.(뿧 +` +java:S1124e"EReorder the modifiers to comply with the Java Language Specification.( +Q java:S125h"Use isEmpty() to check whether the collection is empty or not.( +G +java:S1172"+Remove this unused method parameter "view".(ɑ +Q java:S125" +java:S1068H"(Remove this unused "city" private field.( +? +java:S1068S")Remove this unused "query" private field.( +H +java:S1068U"-Remove this unused "poiSearch" private field.( +B +java:S1068W",Remove this unused "cityCode" private field.( +I +java:S1068c".Remove this unused "reveSocket" private field.( +K +java:S1068e"0Remove this unused "RECEIVE_PORT" private field.( +K +java:S1068f"0Remove this unused "listenStatus" private field.(㋸ +I +java:S1068g".Remove this unused "serverAddr" private field.( +E +java:S1068".Remove this unused "mReceiveIp" private field.( \ No newline at end of file diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/8/c/8c55c3ccc257e5907959013f99656e4c8ec3903e b/src/sixaunyi/.idea/sonarlint/issuestore/8/c/8c55c3ccc257e5907959013f99656e4c8ec3903e new file mode 100644 index 0000000..e69de29 diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/index.pb b/src/sixaunyi/.idea/sonarlint/issuestore/index.pb index 4b261e2..30ab46f 100644 --- a/src/sixaunyi/.idea/sonarlint/issuestore/index.pb +++ b/src/sixaunyi/.idea/sonarlint/issuestore/index.pb @@ -19,5 +19,11 @@ k ;app/src/main/java/com/example/sixaunyi/ControlActivity.java,c\9\c99a584c2117ed2df42496451bb97ac1147f5ea0 j :app/src/main/java/com/example/sixaunyi/SecondFragment.java,1\2\12963d86ac5c2888cc2a9ae459de5665bc06b01f +k +;app/src/main/java/com/example/sixaunyi/SettingActivity.java,2\a\2ab0711d9aa5839cecbb6cf0ed96f5a3f6470de5 i -9app/src/main/java/com/example/sixaunyi/VideoActivity.java,7\1\71fd1993763df2214bbdad8cfee650733993fe44 \ No newline at end of file +9app/src/main/java/com/example/sixaunyi/VideoActivity.java,7\1\71fd1993763df2214bbdad8cfee650733993fe44 +P + app/src/main/AndroidManifest.xml,8\c\8c55c3ccc257e5907959013f99656e4c8ec3903e +h +8app/src/main/java/com/example/sixaunyi/MainActivity.java,7\c\7c120b7216f76ce98d1573d90803ab36f481640c \ No newline at end of file diff --git a/src/sixaunyi/app/src/main/java/com/example/sixaunyi/LoginActivity.java b/src/sixaunyi/app/src/main/java/com/example/sixaunyi/LoginActivity.java index 7531f91..8b3ba6a 100644 --- a/src/sixaunyi/app/src/main/java/com/example/sixaunyi/LoginActivity.java +++ b/src/sixaunyi/app/src/main/java/com/example/sixaunyi/LoginActivity.java @@ -36,8 +36,8 @@ public class LoginActivity extends AppCompatActivity { private void attemptLogin() { String username = mUsername.getText().toString(); String password = mPassword.getText().toString(); - boolean if_correct = verifyUser(username,password); - if (if_correct) { + + if (mUsers.containsKey(username) && mUsers.get(username).equals(password)) { Toast.makeText(this, "登录成功", Toast.LENGTH_SHORT).show(); Intent intent = new Intent(LoginActivity.this, MainActivity.class); startActivity(intent); @@ -46,12 +46,4 @@ public class LoginActivity extends AppCompatActivity { Toast.makeText(this, "用户名或密码错误", Toast.LENGTH_SHORT).show(); } } - - private boolean verifyUser(String username, String password){ - if (mUsers.containsKey(username) && mUsers.get(username).equals(password)) { - return true; - } else { - return false; - } - } }