Android-x86
Fork
Spenden

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-koush-Superuser: Commit

external/koush/Superuser


Commit MetaInfo

Revisionb48c45b73b672246255ec4d3f1e9766d61d483e5 (tree)
Zeit2018-03-01 15:46:46
AutorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

Remove the usage of junit.framework.Assert

It's not buildable in Android 8.0.

Ändern Zusammenfassung

Diff

--- a/Superuser/res/values/strings.xml
+++ b/Superuser/res/values/strings.xml
@@ -61,7 +61,7 @@
6161 <string name="superuser_granted">Superuser granted to %s</string>
6262 <string name="superuser_denied">Superuser denied to %s</string>
6363 <string name="developer_warning">Developer Warning:\nandroid.permission.ACCESS_SUPERUSER\nnot declared in manifest.</string>
64- <string name="superuser_description">full permissions to all device features and storage</string>
64+ <string name="superuser_description">Full permissions to all device features and storage</string>
6565 <string name="superuser_description_more">Superuser grants full access to all device features and storage, including the secure and sensitive hardware elements of your device. This permission is potentially dangerous.</string>
6666 <string name="declared_permission">Declared Permission</string>
6767 <string name="declared_permission_summary">Only allow requests from apps that declare android.permission.ACCESS_SUPERUSER</string>
--- a/Superuser/src/com/koushikdutta/superuser/MultitaskSuRequestActivity.java
+++ b/Superuser/src/com/koushikdutta/superuser/MultitaskSuRequestActivity.java
@@ -20,7 +20,6 @@ import java.io.DataInputStream;
2020 import java.io.File;
2121 import java.util.HashMap;
2222
23-import junit.framework.Assert;
2423 import android.annotation.SuppressLint;
2524 import android.content.ContentValues;
2625 import android.content.Intent;
@@ -98,7 +97,9 @@ public class MultitaskSuRequestActivity extends FragmentActivity {
9897 }
9998
10099 void handleAction(boolean action, Integer until) {
101- Assert.assertTrue(!mHandled);
100+ if (mHandled) {
101+ throw new RuntimeException("mHandled is true");
102+ }
102103 mHandled = true;
103104 try {
104105 mSocket.getOutputStream().write((action ? "socket:ALLOW" : "socket:DENY").getBytes());
Show on old repository browser