Ejemplo n.º 1
0
 public UploadTask(
     long rid, String descriptor, String fileName, ActorRef manager, ModuleContext context) {
   super(context);
   this.LOG = context.getConfiguration().isEnableFilesLogging();
   this.rid = rid;
   this.fileName = fileName;
   this.descriptor = descriptor;
   this.manager = manager;
   this.TAG = "UploadTask{" + rid + "}";
 }
Ejemplo n.º 2
0
  public SettingsModule(ModuleContext context) {
    super(context);

    String platformType;
    switch (context.getConfiguration().getPlatformType()) {
      case ANDROID:
        platformType = "android";
        break;
      case IOS:
        platformType = "ios";
        break;
      case WEB:
        platformType = "web";
        break;
      default:
      case GENERIC:
        platformType = "generic";
        break;
    }

    String deviceType;
    switch (context.getConfiguration().getDeviceCategory()) {
      case TABLET:
        deviceType = "tablet";
        break;
      case DESKTOP:
        deviceType = "desktop";
        break;
      case MOBILE:
        deviceType = "mobile";
        break;
      default:
        deviceType = "generic";
        break;
    }

    // Platform+Device specific settings
    KEY_SOUND_EFFECTS = "app." + platformType + "" + deviceType + ".tones_enabled";
    KEY_CHAT_SEND_BY_ENTER = "app." + platformType + "" + deviceType + ".send_by_enter";
    KEY_MARKDOWN_ENABLED = "app." + platformType + "" + deviceType + ".use_markdown";
    KEY_CHAT_TEXT_SIZE = "app." + platformType + "." + deviceType + ".text_size";

    // Device-type notification settings
    KEY_NOTIFICATION_ENABLED = "category." + deviceType + ".notification.enabled";
    KEY_NOTIFICATION_SOUND_ENABLED = "category." + deviceType + ".notification.sound.enabled";
    KEY_NOTIFICATION_VIBRATION = "category." + deviceType + ".notification.vibration.enabled";
    KEY_NOTIFICATION_TEXT = "category." + deviceType + ".notification.show_text";
    KEY_NOTIFICATION_CHAT_PREFIX = "category." + deviceType + ".notification.chat.";

    KEY_NOTIFICATION_IN_APP_ENABLED = "category." + deviceType + ".in_app.enabled";
    KEY_NOTIFICATION_IN_APP_SOUND = "category." + deviceType + ".in_app.sound.enabled";
    KEY_NOTIFICATION_IN_APP_VIBRATION = "category." + deviceType + ".in_app.vibration.enabled";

    // Account-wide notification settings
    KEY_NOTIFICATION_SOUND = "account.notification.sound";
    KEY_NOTIFICATION_GROUP_ENABLED = "account.notifications.group.enabled";
    KEY_NOTIFICATION_GROUP_ONLY_MENTIONS = "account.notifications.group.mentions";

    // Hints
    KEY_RENAME_HINT_SHOWN = "hint.contact.rename";

    KEY_WALLPAPPER = "wallpaper.uri";
    KEY_PRIVACY = "privacy.last_seen";
  }