Remove obsolete try catch am: ebdcc80ac2
am: 29e8071d2e
* commit '29e8071d2e9f3a8171624fd63b849f5c14360b21':
Remove obsolete try catch
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java
index a833ebe..4e4fcd0 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java
@@ -380,23 +380,17 @@
config.orientation = Configuration.ORIENTATION_UNDEFINED;
}
- try {
- ScreenRound roundness = hardwareConfig.getScreenRoundness();
- if (roundness != null) {
- switch (roundness) {
- case ROUND:
- config.screenLayout |= Configuration.SCREENLAYOUT_ROUND_YES;
- break;
- case NOTROUND:
- config.screenLayout |= Configuration.SCREENLAYOUT_ROUND_NO;
- }
- } else {
- config.screenLayout |= Configuration.SCREENLAYOUT_ROUND_UNDEFINED;
+ ScreenRound roundness = hardwareConfig.getScreenRoundness();
+ if (roundness != null) {
+ switch (roundness) {
+ case ROUND:
+ config.screenLayout |= Configuration.SCREENLAYOUT_ROUND_YES;
+ break;
+ case NOTROUND:
+ config.screenLayout |= Configuration.SCREENLAYOUT_ROUND_NO;
}
- } catch (NoSuchMethodError ignored) {
- // getScreenRoundness was added in later stages of API 15. So, it's not present on some
- // preview releases of API 15.
- // TODO: Remove the try catch around Oct 2015.
+ } else {
+ config.screenLayout |= Configuration.SCREENLAYOUT_ROUND_UNDEFINED;
}
String locale = getParams().getLocale();
if (locale != null && !locale.isEmpty()) config.locale = new Locale(locale);