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

Commit ac83757c authored by Dinesh K Garg's avatar Dinesh K Garg Committed by Steve Kondik
Browse files

Browser crash when GPS provider not available

Google websites using GPS were causing Browser crash because Browser
was not handling the case where GPS functionality is not available
on the device. In this case starting of GpslocationService raises the
unhandled exception. Addded the case to handle the exception so that
Browser does not crash when there is problem in GPS service.

Change-Id: If95fbe4fd40dd52696773966054f176eca52f855
CR-Fixes: 269624
parent 6995921b
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2009 The Android Open Source Project
 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -165,6 +166,12 @@ final class GeolocationService implements LocationListener {
        } catch(SecurityException e) {
            Log.e(TAG, "Caught security exception registering for location updates from system. " +
                "This should only happen in DumpRenderTree.");
        } catch(IllegalArgumentException e) {
            Log.e(TAG, "Caught IllegalArugument Exception: Either provider or listener is null");
            e.printStackTrace();
        } catch (RuntimeException e) {
            Log.e(TAG, "Caught RuntimeException");
            e.printStackTrace();
        }
    }