Riley, 28, played all 16 games, including three starts, for the Raiders last year. He made 34 tackles, one pass breakup and a forced fumble.
Riley started every game for the Giants in 2018, seeing action on 96 percent of the defensive snaps.
He also played 11 games for Tennessee over the 2016-17 seasons.
Riley originally signed with the Titans in 2015.