Ejemplo n.º 1
0
 /** @hide */
 public void doSelect(Context context) {
   // Set stream volumes
   AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
   for (StreamSettings sd : streams.values()) {
     if (sd.isOverride()) {
       am.setStreamVolume(sd.getStreamId(), sd.getValue(), 0);
     }
   }
   // Set connections
   for (ConnectionSettings cs : connections.values()) {
     if (cs.isOverride()) {
       cs.processOverride(context);
     }
   }
 }
Ejemplo n.º 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);
   }
 }
Ejemplo n.º 3
0
 /** @hide */
 public void setStreamSettings(StreamSettings descriptor) {
   streams.put(descriptor.getStreamId(), descriptor);
   mDirty = true;
 }