コード例 #1
0
 /** @hide */
 public void addProfileGroup(ProfileGroup value) {
   if (value.isDefaultGroup()) {
     /* we must not have more than one default group */
     if (mDefaultGroup != null) {
       return;
     }
     mDefaultGroup = value;
   }
   profileGroups.put(value.getUuid(), value);
   mDirty = true;
 }
コード例 #2
0
 /** @hide */
 public void readFromParcel(Parcel in) {
   mName = in.readString();
   mNameResId = in.readInt();
   mUuid = ParcelUuid.CREATOR.createFromParcel(in).getUuid();
   mStatusBarIndicator = (in.readInt() == 1);
   mDirty = (in.readInt() == 1);
   for (Parcelable group : in.readParcelableArray(null)) {
     ProfileGroup grp = (ProfileGroup) group;
     profileGroups.put(grp.getUuid(), grp);
     if (grp.isDefaultGroup()) {
       mDefaultGroup = grp;
     }
   }
   for (Parcelable parcel : in.readParcelableArray(null)) {
     StreamSettings stream = (StreamSettings) parcel;
     streams.put(stream.getStreamId(), stream);
   }
   for (Parcelable parcel : in.readParcelableArray(null)) {
     ConnectionSettings connection = (ConnectionSettings) parcel;
     connections.put(connection.getConnectionId(), connection);
   }
 }