Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void getTilesForIntent(Context context, UserHandle user, Intent intent,
- Map<Pair<String, String>, Tile> addedCache, String defaultCategory, List<Tile> outTiles,
- boolean usePriority, boolean checkCategory) {
- boolean showAudio = shouldShowAudio();
- ......
- Pair<String, String> key = new Pair<String, String>(activityInfo.packageName,
- activityInfo.name);
- Tile tile = addedCache.get(key);
- if (tile == null) {
- tile = new Tile();
- if (!showAudio && (activityInfo.name).equals("com.android.settings.Settings$AudioSettingsActivity")) {
- //Add method does not perform
- // not add this to menu
- } else {
- tile.intent = new Intent().setClassName(activityInfo.packageName, activityInfo.name);
- tile.category = categoryKey;
- tile.priority = usePriority ? resolved.priority : 0;
- tile.metaData = activityInfo.metaData;
- updateTileData(context, tile, activityInfo, activityInfo.applicationInfo, pm);
- if (DEBUG) Log.d(LOG_TAG, "Adding tile " + tile.title);
- addedCache.put(key, tile);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement