Merge "Allow operator/manufacturer setting to use priority"
This commit is contained in:
@@ -123,9 +123,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);
|
||||||
}
|
}
|
||||||
getTilesForAction(context, user, EXTRA_SETTINGS_ACTION, cache, null, tiles, false);
|
getTilesForAction(context, user, EXTRA_SETTINGS_ACTION, cache, null, tiles, false);
|
||||||
}
|
}
|
||||||
@@ -177,12 +177,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