예제 #1
0
    @Override
    public void onClick(View v) {
      String description =
          getString(
              R.string.search_title,
              getString(R.string.message_list_title, account.getDescription(), displayName),
              getString(searchModifier.resId));

      SearchSpecification searchSpec =
          new SearchSpecification() {
            @Override
            public String[] getAccountUuids() {
              return new String[] {account.getUuid()};
            }

            @Override
            public Flag[] getForbiddenFlags() {
              return searchModifier.forbiddenFlags;
            }

            @Override
            public String getQuery() {
              return "";
            }

            @Override
            public Flag[] getRequiredFlags() {
              return searchModifier.requiredFlags;
            }

            @Override
            public boolean isIntegrate() {
              return false;
            }

            @Override
            public String[] getFolderNames() {
              return new String[] {folderName};
            }
          };
      MessageList.actionHandle(FolderList.this, description, searchSpec);
    }
예제 #2
0
  private void openUnreadSearch(Context context, final Account account) {
    String description =
        getString(
            R.string.search_title, mAccount.getDescription(), getString(R.string.unread_modifier));

    SearchSpecification searchSpec =
        new SearchSpecification() {
          // interface has no override            @Override
          public String[] getAccountUuids() {
            return new String[] {account.getUuid()};
          }

          // interface has no override            @Override
          public Flag[] getForbiddenFlags() {
            return UNREAD_FLAG_ARRAY;
          }

          // interface has no override            @Override
          public String getQuery() {
            return "";
          }

          @Override
          public Flag[] getRequiredFlags() {
            return null;
          }

          @Override
          public boolean isIntegrate() {
            return false;
          }

          @Override
          public String[] getFolderNames() {
            return null;
          }
        };
    MessageList.actionHandle(context, description, searchSpec);
  }