parent
971bcc6946
commit
59b59ab69d
|
|
@ -675,15 +675,18 @@ public class LSPManagerService extends ILSPManagerService.Stub {
|
||||||
try {
|
try {
|
||||||
var contentProvider = ActivityManagerService.getContentProvider("settings", 0);
|
var contentProvider = ActivityManagerService.getContentProvider("settings", 0);
|
||||||
if (contentProvider != null) {
|
if (contentProvider != null) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
try {
|
||||||
try {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
contentProvider.call(new AttributionSource.Builder(1000).setPackageName("android").build(),
|
contentProvider.call(new AttributionSource.Builder(1000).setPackageName("android").build(),
|
||||||
"settings", "PUT_global", "show_hidden_icon_apps_enabled", args);
|
"settings", "PUT_global", "show_hidden_icon_apps_enabled", args);
|
||||||
return;
|
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||||
} catch (NoSuchMethodError ignored) {
|
contentProvider.call("android", null, "settings", "PUT_global", "show_hidden_icon_apps_enabled", args);
|
||||||
|
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||||
|
contentProvider.call("android", "settings", "PUT_global", "show_hidden_icon_apps_enabled", args);
|
||||||
}
|
}
|
||||||
|
} catch (NoSuchMethodError e) {
|
||||||
|
Log.w(TAG, "setHiddenIcon: ", e);
|
||||||
}
|
}
|
||||||
contentProvider.call("android", null, "settings", "PUT_global", "show_hidden_icon_apps_enabled", args);
|
|
||||||
}
|
}
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
Log.w(TAG, "setHiddenIcon: ", e);
|
Log.w(TAG, "setHiddenIcon: ", e);
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,11 @@ import android.os.RemoteException;
|
||||||
import androidx.annotation.RequiresApi;
|
import androidx.annotation.RequiresApi;
|
||||||
|
|
||||||
public interface IContentProvider extends IInterface {
|
public interface IContentProvider extends IInterface {
|
||||||
|
@RequiresApi(29)
|
||||||
|
Bundle call(String callingPkg, String authority, String method,
|
||||||
|
String arg, Bundle extras) throws RemoteException;
|
||||||
|
|
||||||
|
@RequiresApi(30)
|
||||||
Bundle call(String callingPkg, String attributionTag, String authority,
|
Bundle call(String callingPkg, String attributionTag, String authority,
|
||||||
String method, String arg, Bundle extras) throws RemoteException;
|
String method, String arg, Bundle extras) throws RemoteException;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue