diff --git a/src/sixaunyi/.idea/deploymentTargetDropDown.xml b/src/sixaunyi/.idea/deploymentTargetDropDown.xml
new file mode 100644
index 0000000..a9167c3
--- /dev/null
+++ b/src/sixaunyi/.idea/deploymentTargetDropDown.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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
deleted file mode 100644
index e69de29..0000000
diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/7/c/7c120b7216f76ce98d1573d90803ab36f481640c b/src/sixaunyi/.idea/sonarlint/issuestore/7/c/7c120b7216f76ce98d1573d90803ab36f481640c
deleted file mode 100644
index 01d0bae..0000000
--- a/src/sixaunyi/.idea/sonarlint/issuestore/7/c/7c120b7216f76ce98d1573d90803ab36f481640c
+++ /dev/null
@@ -1,84 +0,0 @@
-
-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
deleted file mode 100644
index e69de29..0000000
diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/index.pb b/src/sixaunyi/.idea/sonarlint/issuestore/index.pb
index 30ab46f..4b261e2 100644
--- a/src/sixaunyi/.idea/sonarlint/issuestore/index.pb
+++ b/src/sixaunyi/.idea/sonarlint/issuestore/index.pb
@@ -19,11 +19,5 @@ 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
-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
+9app/src/main/java/com/example/sixaunyi/VideoActivity.java,7\1\71fd1993763df2214bbdad8cfee650733993fe44
\ 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 8b3ba6a..7531f91 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();
-
- if (mUsers.containsKey(username) && mUsers.get(username).equals(password)) {
+ boolean if_correct = verifyUser(username,password);
+ if (if_correct) {
Toast.makeText(this, "登录成功", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(LoginActivity.this, MainActivity.class);
startActivity(intent);
@@ -46,4 +46,12 @@ 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;
+ }
+ }
}