ChannelHelper.java 946 B

123456789101112131415161718192021222324252627282930
  1. package com.datarecovery.master.data.consts;
  2. import com.atmob.user.AtmobUser;
  3. public class ChannelHelper {
  4. public static boolean isTargetSDChannel(String targetChannel) {
  5. if (AtmobUser.getAtmobTgPlatformId() != ChannelId.SD) {
  6. return false;
  7. }
  8. String atmobChannel = AtmobUser.getAtmobChannel();
  9. if (atmobChannel == null || targetChannel == null) {
  10. return false;
  11. }
  12. int index = atmobChannel.indexOf(targetChannel, atmobChannel.length() - targetChannel.length());
  13. return index != -1;
  14. }
  15. public static boolean isTargetSuffixChannel(String targetChannel) {
  16. String atmobChannel = AtmobUser.getAtmobChannel();
  17. if (atmobChannel == null || targetChannel == null) {
  18. return false;
  19. }
  20. int index = atmobChannel.indexOf(targetChannel, atmobChannel.length() - targetChannel.length());
  21. return index != -1;
  22. }
  23. }