Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebbfce0b authored by Jack He's avatar Jack He
Browse files

Fix a crash when an app requests Bluetooth to be discoverable

* When an app requests Bluetooth to be discoverable with a timeout and a
  non null EXTRA_PACKAGE_NAME, Settings app should put in the correct
  timeout values in the dialog string

Bug: 36870303
Test: make, try making Bluetooth discoverable via
      ACTION_REQUEST_DISCOVERABLE intent

Change-Id: I0cebc2f20371c9de5f28feb26425422c0777aa45
parent b59337c0
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -180,8 +180,8 @@ public class RequestPermissionActivity extends Activity implements
                builder.setMessage(message);
                builder.setMessage(message);
            } else {
            } else {
                CharSequence message = mAppLabel != null
                CharSequence message = mAppLabel != null
                        ? getString(R.string.bluetooth_ask_discovery, mAppLabel)
                        ? getString(R.string.bluetooth_ask_discovery, mAppLabel, mTimeout)
                        : getString(R.string.bluetooth_ask_discovery_no_name);
                        : getString(R.string.bluetooth_ask_discovery_no_name, mTimeout);
                builder.setMessage(message);
                builder.setMessage(message);
            }
            }
            builder.setPositiveButton(getString(R.string.allow), this);
            builder.setPositiveButton(getString(R.string.allow), this);