Use context instead of global

Change-Id: Ie0a28034fd21bbed1338828c34bdb50c747e926d
Merge "Use context instead of global"