India is considering new smartphone security rules that would require companies to share parts of their source code.