summaryrefslogtreecommitdiffstats
path: root/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java')
-rw-r--r--android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
index 7161f1465242..888e5884a096 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
@@ -45,4 +45,13 @@ public class LOKitShell {
}
});
}
+
+ public static DisplayMetrics getDisplayMetrics() {
+ if (LibreOfficeMainActivity.mAppContext == null) {
+ return null;
+ }
+ DisplayMetrics metrics = new DisplayMetrics();
+ LibreOfficeMainActivity.mAppContext.getWindowManager().getDefaultDisplay().getMetrics(metrics);
+ return metrics;
+ }
}