Default apps setting for managed profile
1. Print settings already support managed profile. Follow the UI of that. ProfileSettingsPreferenceFragment is created to act as the base class for per-profile setting. 2. Only show browser and dialer default setting in managed profile. BUG=26707733 Change-Id: I20d00203e14db58ec03638f692dd83a1bd50c59c
This commit is contained in:
@@ -25,6 +25,7 @@ import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.content.pm.ServiceInfo;
|
||||
import android.os.UserManager;
|
||||
import android.provider.Settings;
|
||||
import android.service.notification.NotificationAssistantService;
|
||||
import android.util.AttributeSet;
|
||||
@@ -34,6 +35,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.notification.ManagedServiceSettings;
|
||||
|
||||
public class DefaultNotificationAssistantPreference extends AppListPreference {
|
||||
@@ -108,4 +110,8 @@ public class DefaultNotificationAssistantPreference extends AppListPreference {
|
||||
c.emptyText = R.string.no_notification_listeners;
|
||||
return c;
|
||||
}
|
||||
|
||||
public static boolean isAvailable(Context context) {
|
||||
return !Utils.isManagedProfile(UserManager.get(context));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user