Revert "Copied code from samsung"

This reverts commit 443b15c1cfb8d346fb138a02bff408054d2b10db.