grafting code about displays from 5.0 into SD