Merge "Do not allow apps to cause Bluetooth to be discoverable forever"

This commit is contained in:
Treehugger Robot
2016-08-18 22:23:05 +00:00
committed by Gerrit Code Review

View File

@@ -267,7 +267,7 @@ public class RequestPermissionActivity extends Activity implements
Log.d(TAG, "Setting Bluetooth Discoverable Timeout = " + mTimeout);
if (mTimeout < 0 || mTimeout > MAX_DISCOVERABLE_TIMEOUT) {
if (mTimeout < 1 || mTimeout > MAX_DISCOVERABLE_TIMEOUT) {
mTimeout = BluetoothDiscoverableEnabler.DEFAULT_DISCOVERABLE_TIMEOUT;
}
} else {