external/koush/Superuser
Revision | b48c45b73b672246255ec4d3f1e9766d61d483e5 (tree) |
---|---|
Time | 2018-03-01 15:46:46 |
Author | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Remove the usage of junit.framework.Assert
It's not buildable in Android 8.0.
@@ -61,7 +61,7 @@ | ||
61 | 61 | <string name="superuser_granted">Superuser granted to %s</string> |
62 | 62 | <string name="superuser_denied">Superuser denied to %s</string> |
63 | 63 | <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> | |
65 | 65 | <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> |
66 | 66 | <string name="declared_permission">Declared Permission</string> |
67 | 67 | <string name="declared_permission_summary">Only allow requests from apps that declare android.permission.ACCESS_SUPERUSER</string> |
@@ -20,7 +20,6 @@ import java.io.DataInputStream; | ||
20 | 20 | import java.io.File; |
21 | 21 | import java.util.HashMap; |
22 | 22 | |
23 | -import junit.framework.Assert; | |
24 | 23 | import android.annotation.SuppressLint; |
25 | 24 | import android.content.ContentValues; |
26 | 25 | import android.content.Intent; |
@@ -98,7 +97,9 @@ public class MultitaskSuRequestActivity extends FragmentActivity { | ||
98 | 97 | } |
99 | 98 | |
100 | 99 | void handleAction(boolean action, Integer until) { |
101 | - Assert.assertTrue(!mHandled); | |
100 | + if (mHandled) { | |
101 | + throw new RuntimeException("mHandled is true"); | |
102 | + } | |
102 | 103 | mHandled = true; |
103 | 104 | try { |
104 | 105 | mSocket.getOutputStream().write((action ? "socket:ALLOW" : "socket:DENY").getBytes()); |