Remove obsolete try catch
The try catch was to prevent crashing on preview releases of Android Studio. We don't support them anymore. Change-Id: I8e33cae98117c0034aea1b56903b623fcb64435e
This commit is contained in:
@@ -382,23 +382,17 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso
|
|||||||
config.orientation = Configuration.ORIENTATION_UNDEFINED;
|
config.orientation = Configuration.ORIENTATION_UNDEFINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
ScreenRound roundness = hardwareConfig.getScreenRoundness();
|
||||||
ScreenRound roundness = hardwareConfig.getScreenRoundness();
|
if (roundness != null) {
|
||||||
if (roundness != null) {
|
switch (roundness) {
|
||||||
switch (roundness) {
|
case ROUND:
|
||||||
case ROUND:
|
config.screenLayout |= Configuration.SCREENLAYOUT_ROUND_YES;
|
||||||
config.screenLayout |= Configuration.SCREENLAYOUT_ROUND_YES;
|
break;
|
||||||
break;
|
case NOTROUND:
|
||||||
case NOTROUND:
|
config.screenLayout |= Configuration.SCREENLAYOUT_ROUND_NO;
|
||||||
config.screenLayout |= Configuration.SCREENLAYOUT_ROUND_NO;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
config.screenLayout |= Configuration.SCREENLAYOUT_ROUND_UNDEFINED;
|
|
||||||
}
|
}
|
||||||
} catch (NoSuchMethodError ignored) {
|
} else {
|
||||||
// getScreenRoundness was added in later stages of API 15. So, it's not present on some
|
config.screenLayout |= Configuration.SCREENLAYOUT_ROUND_UNDEFINED;
|
||||||
// preview releases of API 15.
|
|
||||||
// TODO: Remove the try catch around Oct 2015.
|
|
||||||
}
|
}
|
||||||
String locale = getParams().getLocale();
|
String locale = getParams().getLocale();
|
||||||
if (locale != null && !locale.isEmpty()) config.locale = new Locale(locale);
|
if (locale != null && !locale.isEmpty()) config.locale = new Locale(locale);
|
||||||
|
|||||||
Reference in New Issue
Block a user