diff --git a/src/biz/bokhorst/xprivacy/XEnvironment.java b/src/biz/bokhorst/xprivacy/XEnvironment.java index f742cdd44..f2170b785 100644 --- a/src/biz/bokhorst/xprivacy/XEnvironment.java +++ b/src/biz/bokhorst/xprivacy/XEnvironment.java @@ -6,7 +6,6 @@ import android.os.Build; import android.os.Environment; -import android.util.Log; import biz.bokhorst.xprivacy.XHook; @@ -43,7 +42,8 @@ protected void before(XParam param) throws Throwable { @Override protected void after(XParam param) throws Throwable { - if (mMethod == Methods.getExternalStorageState) { + switch (mMethod) { + case getExternalStorageState: if (param.getResult() != null) { String extra = null; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) @@ -53,8 +53,7 @@ protected void after(XParam param) throws Throwable { if (isRestrictedExtra(param, extra)) param.setResult(Environment.MEDIA_UNMOUNTED); } - - } else - Util.log(this, Log.WARN, "Unknown method=" + param.method.getName()); + break; + } } }