3 // Apple TVs and watches have no UI to enable or disable this status.
4 // So, help them out by ignoring all efforts.
5 extension TPPBPeerStableInfo_UserControllableViewStatus {
6 func sanitizeForPlatform(permanentInfo: TPPeerPermanentInfo) -> TPPBPeerStableInfo_UserControllableViewStatus {
7 // Unknown is the unknown for any platform
12 if permanentInfo.modelID.hasPrefix("AppleTV") ||
13 permanentInfo.modelID.hasPrefix("AudioAccessory") {
14 // Apple TVs, and HomePods don't have UI to set this bit. So, they should always sync the
15 // user-controlled views to which they have access.
17 // Some watches don't have UI to set the bit, but some do.
19 // Note that we want this sanitization behavior to be baked into the local OS, which is what owns
20 // the UI software, and not in the Policy, which can change.
23 // All other platforms can choose their own fate
29 extension StableChanges {
30 static func change(viewStatus: TPPBPeerStableInfo_UserControllableViewStatus?) -> StableChanges? {
31 if viewStatus == nil {
34 return StableChanges(deviceName: nil,
39 setSyncUserControllableViews: viewStatus)