DALLAS (AP) — Shares of AT&T Inc. rose Tuesday after the company’s second-quarter profit and revenue beat industry analysts’ projections.

The Dallas phone and video company also said that it still expects its $85 billion Time Warner deal to close this year. AT&T bought DirecTV in 2015 and wants the owner of the CNN, TBS and HBO networks and a movie studio so that it can expand beyond its traditional business lines as the wireless phone industry becomes more competitive.

READ MORE: Mesquite Police Identify Officer Killed In Shooting, Vigil To Be Held Sunday

AT&T said Tuesday that it added 127,000 wireless customers — users of cellphones and tablets — who pay a bill at the end of the month, the more lucrative kind of customer. That’s compared with a gain of 257,000 customers in the April-June quarter last year. It also added fewer prepaid customers.

Revenue from the wireless business declined 2 percent, to $17.5 billion, and customers paid AT&T less, on average. This year’s shift to unlimited plans has cut into the fees charged by phone companies when customers go over their data caps on some limited-data plans.

In its TV business, video customers fell by 199,000, a deeper loss than a year ago, to 25.2 million. More Americans are cutting traditional TV service as online video gets more popular. That trend led AT&T to launch its DirecTV Now online cable replacement service, which streams live TV over the internet, last year. Those customers grew by 152,000 to 491,000 in the second quarter.

READ MORE: 1 Killed, 3 Injured In Arlington Car Accident

Net income rose 15 percent to $3.92 billion, or 63 cents per share. Earnings, adjusted for one-time gains and costs, were 79 cents per share, beating the 74-cent estimate of the 20 analysts surveyed by Zacks Investment Research.

Revenue fell 1.7 percent to $39.84 billion, roughly in line with Wall Street’s forecast.

AT&T shares rose 2.6 percent to $37.15 in after-hours trading following the release of the earnings report. The stock closed Tuesday at $36.22, down 15 percent in 2017. The Standard & Poor’s 500 index has increased 11 percent.

MORE NEWS: No. 3 Cincinnati Claims AAC Crown, Possible Playoff Spot

(© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)