Skip to content

Commit

Permalink
Improved iPad 2 detection
Browse files Browse the repository at this point in the history
  • Loading branch information
thpryrchn committed Jan 30, 2012
1 parent 100da10 commit 630ae63
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions lib/siriproxy/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,27 @@ def receive_line(line) #Process header
line["iPhone3,3"] = "iPhone4,1"
puts "[Info - SiriProxy] Changed header to iphone4s] "
puts "[Info - SiriProxy] Original Header: " + line if $LOG_LEVEL > 2
elsif line.match(/iPad2,2;/)
elsif line.match(/iPad2,1;/)
self.is_4S = false
puts "[Info - SiriProxy] iPad 2nd generation connected"
puts "[Info - SiriProxy] iPad2 Wifi Only connected"
puts "[Info - SiriProxy] Original Header: " + line if $LOG_LEVEL > 2
line["iPad/iPad2,1"] = "iPhone/iPhone4,1"
puts "[Info - SiriProxy] Changed header to iphone4s] "
puts "[Info - SiriProxy] Original Header: " + line if $LOG_LEVEL > 2
elsif line.match(/iPad2,2;/)
self.is_4S = false
puts "[Info - SiriProxy] iPad2 GSM connected"
puts "[Info - SiriProxy] Original Header: " + line if $LOG_LEVEL > 2
line["iPad/iPad2,2"] = "iPhone/iPhone4,1"
puts "[Info - SiriProxy] Changed header to iphone4s] "
puts "[Info - SiriProxy] Original Header: " + line if $LOG_LEVEL > 2
elsif line.match(/iPad2,3;/)
self.is_4S = false
puts "[Info - SiriProxy] iPad2 CDMA connected"
puts "[Info - SiriProxy] Original Header: " + line if $LOG_LEVEL > 2
line["iPad/iPad2,3"] = "iPhone/iPhone4,1"
puts "[Info - SiriProxy] Changed header to iphone4s] "
puts "[Info - SiriProxy] Original Header: " + line if $LOG_LEVEL > 2
elsif line.match(/iPad1,1;/)
self.is_4S = false
puts "[Info - SiriProxy] iPad 1st generation connected"
Expand Down

0 comments on commit 630ae63

Please sign in to comment.