Snap for 6640159 from 5ff637fb1c
to mainline-release
Change-Id: I0ace46f8f5875951aefe5a9886946d3f4b58cacc
This commit is contained in:
@@ -104,10 +104,10 @@
|
||||
<string-array name="dark_ui_scheduler_preference_titles">
|
||||
<!-- 0: None -->
|
||||
<item>@string/dark_ui_auto_mode_never</item>
|
||||
<!-- 1: Auto -->
|
||||
<item>@string/dark_ui_auto_mode_auto</item>
|
||||
<!-- 2: Custom -->
|
||||
<!-- 1: Custom -->
|
||||
<item>@string/dark_ui_auto_mode_custom</item>
|
||||
<!-- 2: Auto -->
|
||||
<item>@string/dark_ui_auto_mode_auto</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Security settings. The delay after screen is turned off until device locks.
|
||||
|
@@ -631,21 +631,23 @@ public class WifiDetailPreferenceController2 extends AbstractPreferenceControlle
|
||||
}
|
||||
|
||||
private void refreshMacAddress() {
|
||||
String macAddress = mWifiEntry.getMacAddress();
|
||||
if (macAddress == null) {
|
||||
final String macAddress = mWifiEntry.getMacAddress();
|
||||
if (TextUtils.isEmpty(macAddress)) {
|
||||
mMacAddressPref.setVisible(false);
|
||||
return;
|
||||
}
|
||||
|
||||
mMacAddressPref.setVisible(true);
|
||||
|
||||
mMacAddressPref.setTitle((mWifiEntry.getPrivacy() == WifiEntry.PRIVACY_RANDOMIZED_MAC)
|
||||
? R.string.wifi_advanced_randomized_mac_address_title
|
||||
: R.string.wifi_advanced_device_mac_address_title);
|
||||
|
||||
if (macAddress.equals(WifiInfo.DEFAULT_MAC_ADDRESS)) {
|
||||
mMacAddressPref.setSummary(R.string.device_info_not_available);
|
||||
} else {
|
||||
mMacAddressPref.setSummary(macAddress);
|
||||
}
|
||||
|
||||
// MAC Address Pref Title
|
||||
refreshMacTitle();
|
||||
}
|
||||
|
||||
private void updatePreference(Preference pref, String detailText) {
|
||||
@@ -930,24 +932,6 @@ public class WifiDetailPreferenceController2 extends AbstractPreferenceControlle
|
||||
}
|
||||
}
|
||||
|
||||
private void refreshMacTitle() {
|
||||
if (!mWifiEntry.isSaved()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// For saved Passpoint network, framework doesn't have the field to keep the MAC choice
|
||||
// persistently, so Passpoint network will always use the default value so far, which is
|
||||
// randomized MAC address, so don't need to modify title.
|
||||
if (mWifiEntry.isSubscription()) {
|
||||
return;
|
||||
}
|
||||
|
||||
mMacAddressPref.setTitle(
|
||||
(mWifiEntry.getPrivacy() == WifiEntry.PRIVACY_RANDOMIZED_MAC)
|
||||
? R.string.wifi_advanced_randomized_mac_address_title
|
||||
: R.string.wifi_advanced_device_mac_address_title);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates the state of the WifiEntry has changed and clients may retrieve updates through
|
||||
* the WifiEntry getter methods.
|
||||
|
@@ -299,6 +299,13 @@ public class QrCamera extends Handler {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (mCamera == null && numberOfCameras > 0) {
|
||||
Log.i(TAG, "Can't find back camera. Opening a different camera");
|
||||
Camera.getCameraInfo(0, cameraInfo);
|
||||
releaseCamera();
|
||||
mCamera = Camera.open(0);
|
||||
mCameraOrientation = cameraInfo.orientation;
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
Log.e(TAG, "Fail to open camera: " + e);
|
||||
mCamera = null;
|
||||
@@ -308,7 +315,7 @@ public class QrCamera extends Handler {
|
||||
|
||||
try {
|
||||
if (mCamera == null) {
|
||||
throw new IOException("Cannot find available back camera");
|
||||
throw new IOException("Cannot find available camera");
|
||||
}
|
||||
mCamera.setPreviewTexture(surface);
|
||||
setCameraParameter();
|
||||
|
Reference in New Issue
Block a user