remove some redundant code
change min sdk to 8
only run scaletype logic if scaletype changed