Merge branch 'fix-acra-crashes' into 'master'
Fix ACRA crashes See merge request fdroid/fdroidclient!845
This commit is contained in:
		
						commit
						8ee5fa75e4
					
				@ -1,3 +1,7 @@
 | 
				
			|||||||
 | 
					### 1.7.1 (2019-07-31)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* fix crashes from ACRA report emails
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### 1.7 (2019-07-06)
 | 
					### 1.7 (2019-07-06)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* fix crash in Panic Settings
 | 
					* fix crash in Panic Settings
 | 
				
			||||||
 | 
				
			|||||||
@ -223,7 +223,13 @@ public class StartSwapView extends SwapView {
 | 
				
			|||||||
            if (textWifiVisible != null) {
 | 
					            if (textWifiVisible != null) {
 | 
				
			||||||
                textWifiVisible.setText(R.string.swap_visible_hotspot);
 | 
					                textWifiVisible.setText(R.string.swap_visible_hotspot);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            viewWifiNetwork.setText(getContext().getString(R.string.swap_active_hotspot, config.SSID));
 | 
					            Context context = getContext();
 | 
				
			||||||
 | 
					            if (config == null) {
 | 
				
			||||||
 | 
					                viewWifiNetwork.setText(context.getString(R.string.swap_active_hotspot,
 | 
				
			||||||
 | 
					                        context.getString(R.string.swap_blank_wifi_ssid)));
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                viewWifiNetwork.setText(context.getString(R.string.swap_active_hotspot, config.SSID));
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        } else if (TextUtils.isEmpty(FDroidApp.ssid)) {
 | 
					        } else if (TextUtils.isEmpty(FDroidApp.ssid)) {
 | 
				
			||||||
            // not connected to or setup with any wifi network
 | 
					            // not connected to or setup with any wifi network
 | 
				
			||||||
            viewWifiNetwork.setText(R.string.swap_no_wifi_network);
 | 
					            viewWifiNetwork.setText(R.string.swap_no_wifi_network);
 | 
				
			||||||
 | 
				
			|||||||
@ -32,8 +32,19 @@ public class SwapView extends RelativeLayout {
 | 
				
			|||||||
        this(context, attrs, 0);
 | 
					        this(context, attrs, 0);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * In order to support Android < 21, this calls {@code super} rather than
 | 
				
			||||||
 | 
					     * {@code this}.  {@link RelativeLayout}'s methods just use a 0 for the
 | 
				
			||||||
 | 
					     * fourth argument, just like this used to.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    public SwapView(Context context, AttributeSet attrs, int defStyleAttr) {
 | 
					    public SwapView(Context context, AttributeSet attrs, int defStyleAttr) {
 | 
				
			||||||
        this(context, attrs, defStyleAttr, 0);
 | 
					        super(context, attrs, defStyleAttr);
 | 
				
			||||||
 | 
					        final TypedArray a = context.obtainStyledAttributes(
 | 
				
			||||||
 | 
					                attrs, R.styleable.SwapView, 0, 0);
 | 
				
			||||||
 | 
					        toolbarColor = a.getColor(R.styleable.SwapView_toolbarColor,
 | 
				
			||||||
 | 
					                getResources().getColor(R.color.swap_blue));
 | 
				
			||||||
 | 
					        toolbarTitle = a.getString(R.styleable.SwapView_toolbarTitle);
 | 
				
			||||||
 | 
					        a.recycle();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @TargetApi(21)
 | 
					    @TargetApi(21)
 | 
				
			||||||
 | 
				
			|||||||
@ -96,6 +96,9 @@ public class TreeUriScannerIntentService extends IntentService {
 | 
				
			|||||||
     * like an SD Card that can be directly accessed via the file system.
 | 
					     * like an SD Card that can be directly accessed via the file system.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public static void onActivityResult(Activity activity, Intent intent) {
 | 
					    public static void onActivityResult(Activity activity, Intent intent) {
 | 
				
			||||||
 | 
					        if (intent == null) {
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        Uri uri = intent.getData();
 | 
					        Uri uri = intent.getData();
 | 
				
			||||||
        if (uri != null) {
 | 
					        if (uri != null) {
 | 
				
			||||||
            if (Build.VERSION.SDK_INT >= 19) {
 | 
					            if (Build.VERSION.SDK_INT >= 19) {
 | 
				
			||||||
 | 
				
			|||||||
@ -257,7 +257,11 @@ public class WifiStateChangeService extends IntentService {
 | 
				
			|||||||
                Utils.debugLog(TAG, "WifiConfiguration: " + wifiConfiguration);
 | 
					                Utils.debugLog(TAG, "WifiConfiguration: " + wifiConfiguration);
 | 
				
			||||||
                if (wifiConfiguration == null) {
 | 
					                if (wifiConfiguration == null) {
 | 
				
			||||||
                    FDroidApp.ssid = getString(R.string.swap_active_hotspot, "");
 | 
					                    FDroidApp.ssid = getString(R.string.swap_active_hotspot, "");
 | 
				
			||||||
                } else if (wifiConfiguration.hiddenSSID) {
 | 
					                    FDroidApp.bssid = "";
 | 
				
			||||||
 | 
					                    return;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if (wifiConfiguration.hiddenSSID) {
 | 
				
			||||||
                    FDroidApp.ssid = getString(R.string.swap_hidden_wifi_ssid);
 | 
					                    FDroidApp.ssid = getString(R.string.swap_hidden_wifi_ssid);
 | 
				
			||||||
                } else {
 | 
					                } else {
 | 
				
			||||||
                    FDroidApp.ssid = wifiConfiguration.SSID;
 | 
					                    FDroidApp.ssid = wifiConfiguration.SSID;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user