1 package com.netease.nimlib.sdk.sync;
3 import android.os.Parcel;
4 import android.os.Parcelable;
5 import java.io.Serializable;
10 public class SyncConfig implements Serializable, Parcelable
16 private boolean enableSyncTeamMember =
true;
20 private boolean enableSyncTeamMemberUserInfo =
true;
24 private boolean enableSyncSuperTeamMember =
true;
28 private boolean enableSyncSuperTeamMemberUserInfo =
true;
35 this.enableSyncTeamMember = builder.enableSyncTeamMember;
36 this.enableSyncTeamMemberUserInfo = builder.enableSyncTeamMemberUserInfo;
37 this.enableSyncSuperTeamMember = builder.enableSyncSuperTeamMember;
38 this.enableSyncSuperTeamMemberUserInfo = builder.enableSyncSuperTeamMemberUserInfo;
47 return enableSyncTeamMember;
56 return enableSyncSuperTeamMember;
64 return enableSyncTeamMemberUserInfo;
72 return enableSyncSuperTeamMemberUserInfo;
75 public static class Builder
80 private boolean enableSyncTeamMember =
true;
84 private boolean enableSyncTeamMemberUserInfo =
true;
88 private boolean enableSyncSuperTeamMember =
true;
92 private boolean enableSyncSuperTeamMemberUserInfo =
true;
99 public Builder setEnableSyncTeamMember(
boolean enableSyncTeamMember)
101 this.enableSyncTeamMember = enableSyncTeamMember;
110 public Builder setEnableSyncTeamMemberUserInfo(
boolean enableSyncTeamMemberUserInfo) {
111 this.enableSyncTeamMemberUserInfo = enableSyncTeamMemberUserInfo;
120 public Builder setEnableSyncSuperTeamMember(
boolean enableSyncSuperTeamMember)
122 this.enableSyncSuperTeamMember = enableSyncSuperTeamMember;
131 public Builder setEnableSyncSuperTeamMemberUserInfo(
boolean enableSyncSuperTeamMemberUserInfo) {
132 this.enableSyncSuperTeamMemberUserInfo = enableSyncSuperTeamMemberUserInfo;
150 dest.writeByte(this.enableSyncTeamMember ? (byte) 1 : (byte) 0);
151 dest.writeByte(this.enableSyncTeamMemberUserInfo ? (byte) 1 : (byte) 0);
152 dest.writeByte(this.enableSyncSuperTeamMember ? (byte) 1 : (byte) 0);
153 dest.writeByte(this.enableSyncSuperTeamMemberUserInfo ? (byte) 1 : (byte) 0);
157 this.enableSyncTeamMember = source.readByte() != 0;
158 this.enableSyncTeamMemberUserInfo = source.readByte() != 0;
159 this.enableSyncSuperTeamMember = source.readByte() != 0;
160 this.enableSyncSuperTeamMemberUserInfo = source.readByte() != 0;
164 this.enableSyncTeamMember = in.readByte() != 0;
165 this.enableSyncTeamMemberUserInfo = in.readByte() != 0;
166 this.enableSyncSuperTeamMember = in.readByte() != 0;
167 this.enableSyncSuperTeamMemberUserInfo = in.readByte() != 0;
170 public static final Creator<SyncConfig>
CREATOR =
new Creator<SyncConfig>() {
172 public SyncConfig createFromParcel(Parcel source) {
boolean isEnableSyncSuperTeamMember()
是否同步超大群成员,默认为true
boolean isEnableSyncTeamMember()
是否同步群成员,默认为true
boolean isEnableSyncSuperTeamMemberUserInfo()
是否同步超大群成员用户信息,enableSyncSuperTeamMember为true时有效,默认为true
static final Creator< SyncConfig > CREATOR
void readFromParcel(Parcel source)
void writeToParcel(Parcel dest, int flags)
SyncConfig(Builder builder)
boolean isEnableSyncTeamMemberUserInfo()
是否同步群成员用户信息,enableSyncTeamMember为true时有效,默认为true