다음을 통해 공유


LauncherApps.ShouldHideFromSuggestions(String, UserHandle) Method

Definition

Returns whether a package should be hidden from suggestions to the user.

[Android.Runtime.Register("shouldHideFromSuggestions", "(Ljava/lang/String;Landroid/os/UserHandle;)Z", "GetShouldHideFromSuggestions_Ljava_lang_String_Landroid_os_UserHandle_Handler", ApiSince=29)]
public virtual bool ShouldHideFromSuggestions (string packageName, Android.OS.UserHandle user);
[<Android.Runtime.Register("shouldHideFromSuggestions", "(Ljava/lang/String;Landroid/os/UserHandle;)Z", "GetShouldHideFromSuggestions_Ljava_lang_String_Landroid_os_UserHandle_Handler", ApiSince=29)>]
abstract member ShouldHideFromSuggestions : string * Android.OS.UserHandle -> bool
override this.ShouldHideFromSuggestions : string * Android.OS.UserHandle -> bool

Parameters

packageName
String

The package for which to check.

user
UserHandle

the UserHandle of the profile.

Returns

Attributes

Remarks

Returns whether a package should be hidden from suggestions to the user. Currently, this could be done because the package was marked as distracting to the user via PackageManager.setDistractingPackageRestrictions(String[], int).

Java documentation for android.content.pm.LauncherApps.shouldHideFromSuggestions(java.lang.String, android.os.UserHandle).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to