Preparations for setting devices to inactive and changing device token