Threshold value calibration method of distance sensor and mobile terminal

The invention relates to the communication field, and discloses a threshold value calibration method of a distance sensor and a mobile terminal. The threshold value calibration method of the distance sensor includes that when the distance sensor of the mobile terminal starts to work, the mobile terminal obtains a light leakage value of the current distance sensor; the mobile terminal updates a low threshold of the current distance sensor into the sum of a first deviation value and the light leakage value of the current distance sensor and updates a high threshold of the current distance sensor into the sum of the second deviation value and the light leakage value of the current distance sensor according to the obtained light leakage value of the current distance sensor, and the first deviation value and a second deviation value which are preset in the mobile terminal. Compared with the prior art, when the distance sensor starts to work, the mobile terminal obtains the light leakage value of the current distance sensor in real time, and updates the high threshold and the low threshold of the current distance sensor according to the light leakage value of the current distance sensor by using the threshold value calibration method of the distance sensor, and then not only is accuracy of the high threshold and the low threshold of the current distance sensor improved, but also performance of a mobile phone is improved, and therefore good experience is brought to a user.