Merge "Allow operator/manufacturer setting to use priority" am: aef1a557aa am: 4244d53c3e
am: 0be36ac0d1
Change-Id: I24b4d5ef74540cba4c90a134615eadd82b1c4a62
This commit is contained in:
@@ -126,9 +126,9 @@ public class TileUtils {
|
|||||||
// Only add Settings for this user.
|
// Only add Settings for this user.
|
||||||
getTilesForAction(context, user, SETTINGS_ACTION, cache, null, tiles, true);
|
getTilesForAction(context, user, SETTINGS_ACTION, cache, null, tiles, true);
|
||||||
getTilesForAction(context, user, OPERATOR_SETTINGS, cache,
|
getTilesForAction(context, user, OPERATOR_SETTINGS, cache,
|
||||||
OPERATOR_DEFAULT_CATEGORY, tiles, false);
|
OPERATOR_DEFAULT_CATEGORY, tiles, false, true);
|
||||||
getTilesForAction(context, user, MANUFACTURER_SETTINGS, cache,
|
getTilesForAction(context, user, MANUFACTURER_SETTINGS, cache,
|
||||||
MANUFACTURER_DEFAULT_CATEGORY, tiles, false);
|
MANUFACTURER_DEFAULT_CATEGORY, tiles, false, true);
|
||||||
}
|
}
|
||||||
if (setup) {
|
if (setup) {
|
||||||
getTilesForAction(context, user, EXTRA_SETTINGS_ACTION, cache, null, tiles, false);
|
getTilesForAction(context, user, EXTRA_SETTINGS_ACTION, cache, null, tiles, false);
|
||||||
@@ -182,12 +182,20 @@ public class TileUtils {
|
|||||||
private static void getTilesForAction(Context context,
|
private static void getTilesForAction(Context context,
|
||||||
UserHandle user, String action, Map<Pair<String, String>, Tile> addedCache,
|
UserHandle user, String action, Map<Pair<String, String>, Tile> addedCache,
|
||||||
String defaultCategory, ArrayList<Tile> outTiles, boolean requireSettings) {
|
String defaultCategory, ArrayList<Tile> outTiles, boolean requireSettings) {
|
||||||
|
getTilesForAction(context, user, action, addedCache, defaultCategory, outTiles,
|
||||||
|
requireSettings, requireSettings);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void getTilesForAction(Context context,
|
||||||
|
UserHandle user, String action, Map<Pair<String, String>, Tile> addedCache,
|
||||||
|
String defaultCategory, ArrayList<Tile> outTiles, boolean requireSettings,
|
||||||
|
boolean usePriority) {
|
||||||
Intent intent = new Intent(action);
|
Intent intent = new Intent(action);
|
||||||
if (requireSettings) {
|
if (requireSettings) {
|
||||||
intent.setPackage(SETTING_PKG);
|
intent.setPackage(SETTING_PKG);
|
||||||
}
|
}
|
||||||
getTilesForIntent(context, user, intent, addedCache, defaultCategory, outTiles,
|
getTilesForIntent(context, user, intent, addedCache, defaultCategory, outTiles,
|
||||||
requireSettings, true);
|
usePriority, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void getTilesForIntent(Context context, UserHandle user, Intent intent,
|
public static void getTilesForIntent(Context context, UserHandle user, Intent intent,
|
||||||
|
|||||||
Reference in New Issue
Block a user