Merge "Use context only after it is available." am: 1432364e3e
am: a623ed78c0

Change-Id: I09ae67d4ca12eb13f9f7ee46edb92248835f6b90