Change deprecate to discouraged
This commit is contained in:
parent
9d545f8e41
commit
8f3bd49f94
|
|
@ -1,5 +1,6 @@
|
||||||
package io.github.libxposed.api;
|
package io.github.libxposed.api;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.ContextWrapper;
|
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.
|
* 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 {
|
public class XposedContextWrapper extends ContextWrapper implements XposedInterface {
|
||||||
|
|
||||||
XposedContextWrapper(@NonNull XposedContext base) {
|
XposedContextWrapper(@NonNull XposedContext base) {
|
||||||
|
|
@ -83,7 +85,6 @@ public class XposedContextWrapper extends ContextWrapper implements XposedInterf
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
final public Object featuredMethod(String name, Object... args) {
|
final public Object featuredMethod(String name, Object... args) {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import android.content.SharedPreferences;
|
||||||
import android.content.pm.ApplicationInfo;
|
import android.content.pm.ApplicationInfo;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
|
||||||
|
import androidx.annotation.Discouraged;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
|
@ -334,10 +335,8 @@ public interface XposedInterface {
|
||||||
* @param args Featured method arguments
|
* @param args Featured method arguments
|
||||||
* @return Featured method result
|
* @return Featured method result
|
||||||
* @throws UnsupportedOperationException If the framework does not provide a method with given name
|
* @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
|
@Nullable
|
||||||
Object featuredMethod(String name, Object... args);
|
Object featuredMethod(String name, Object... args);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue