frameworks/base
Revision | f505df2e1b7cf9f9df7a34ba1583e38af75e7db4 (tree) |
---|---|
Time | 2015-12-22 13:13:50 |
Author | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
camera: fix NullPointerException
@@ -4108,6 +4108,8 @@ public class Camera { | ||
4108 | 4108 | return Float.parseFloat(mMap.get(key)); |
4109 | 4109 | } catch (NumberFormatException ex) { |
4110 | 4110 | return defaultValue; |
4111 | + } catch (NullPointerException ex) { | |
4112 | + return defaultValue; | |
4111 | 4113 | } |
4112 | 4114 | } |
4113 | 4115 |
@@ -4117,6 +4119,8 @@ public class Camera { | ||
4117 | 4119 | return Integer.parseInt(mMap.get(key)); |
4118 | 4120 | } catch (NumberFormatException ex) { |
4119 | 4121 | return defaultValue; |
4122 | + } catch (NullPointerException ex) { | |
4123 | + return defaultValue; | |
4120 | 4124 | } |
4121 | 4125 | } |
4122 | 4126 |