Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. public static void getTilesForIntent(Context context, UserHandle user, Intent intent,
  2. Map<Pair<String, String>, Tile> addedCache, String defaultCategory, List<Tile> outTiles,
  3. boolean usePriority, boolean checkCategory) {
  4. boolean showAudio = shouldShowAudio();
  5. ......
  6. Pair<String, String> key = new Pair<String, String>(activityInfo.packageName,
  7. activityInfo.name);
  8. Tile tile = addedCache.get(key);
  9. if (tile == null) {
  10. tile = new Tile();
  11. if (!showAudio && (activityInfo.name).equals("com.android.settings.Settings$AudioSettingsActivity")) {
  12. //Add method does not perform
  13. // not add this to menu
  14. } else {
  15. tile.intent = new Intent().setClassName(activityInfo.packageName, activityInfo.name);
  16. tile.category = categoryKey;
  17. tile.priority = usePriority ? resolved.priority : 0;
  18. tile.metaData = activityInfo.metaData;
  19. updateTileData(context, tile, activityInfo, activityInfo.applicationInfo, pm);
  20. if (DEBUG) Log.d(LOG_TAG, "Adding tile " + tile.title);
  21. addedCache.put(key, tile);
  22. }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement