Revert "Revert "ril: adapt for an upstream update""

This reverts commit ce2139c59e9c3836b4fccbbf5c4925b8c038da69.