Change deprecate to discouraged

This commit is contained in:
LoveSy 2023-01-29 19:27:05 +08:00
parent 9d545f8e41
commit 8f3bd49f94
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,6 @@
package io.github.libxposed.api;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.ContextWrapper;
@ -17,7 +18,8 @@ import io.github.libxposed.api.utils.DexParser;
/**
* Wrap of {@link XposedContext} used by the modules for the purpose of shielding framework implementation details.
*/
@SuppressWarnings({"deprecation", "unused"})
@SuppressWarnings({"unused"})
@SuppressLint("DiscouragedApi")
public class XposedContextWrapper extends ContextWrapper implements XposedInterface {
XposedContextWrapper(@NonNull XposedContext base) {
@ -83,7 +85,6 @@ public class XposedContextWrapper extends ContextWrapper implements XposedInterf
/**
* {@inheritDoc}
*/
@Deprecated
@Nullable
@Override
final public Object featuredMethod(String name, Object... args) {

View File

@ -4,6 +4,7 @@ import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.content.res.Resources;
import androidx.annotation.Discouraged;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@ -334,10 +335,8 @@ public interface XposedInterface {
* @param args Featured method arguments
* @return Featured method result
* @throws UnsupportedOperationException If the framework does not provide a method with given name
* @deprecated Normally, modules should never rely on implementation details about the Xposed framework,
* but if really necessary, this method can be used to acquire such information
*/
@Deprecated
@Discouraged(message = "Normally, modules should never rely on specific implementation of the Xposed framework. But if really necessary, this method can be used to acquire such information.")
@Nullable
Object featuredMethod(String name, Object... args);