title: Java equals() seemingly returns wrong bool value
body: <p>So my app is saving the names of Bluetooth devices the user has connected to previously in SharedPreferences which is than compared to all of the names of currently paired devices so on opening the app can instantly connect to the said device. This is done by this piece of code:</p>
  
  <pre><code>sharedPreferences = getApplicationContext().getSharedPreferences("BtNames", MODE_PRIVATE);
  keys = sharedPreferences.getAll();
  for(BluetoothDevice device : pairedDevices) {
                  try {
                      for (Map.Entry&lt;String, ?&gt; entry : keys.entrySet()) {...}
  </code></pre>
  
  <p>This loops through the paired devices and the entries of SharedPreferences whose value than is accessed by this code:</p>
  
  <pre><code>String device_name = device.getName();
  String name = entry.getValue().toString();
  </code></pre>
  
  <p>Now both of these work well and entry.getValue()... returns the exact names of the previously connected devices. The problem occurs when trying to compare the two Strings by:</p>
  
  <pre><code>device_name.equals(name)
  </code></pre>
  
  <p>This returns false even though both of the Strings appear to be exact same when logged:</p>
  
  <pre><code>E/FaceTracker: EV3LO
  E/FaceTracker: EV3LO
  </code></pre>
  
  <p>I have already tried to replace all spaces with nothing but that didn't work either. Maybe I overlooked something but at the moment I don't really have a clue what's going wrong.
  Thanks in advance for answers.</p>