summaryrefslogtreecommitdiff
path: root/packages/FakeOemFeatures/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/FakeOemFeatures/src')
-rw-r--r--packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeApp.java6
-rw-r--r--packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeBackgroundService.java12
2 files changed, 9 insertions, 9 deletions
diff --git a/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeApp.java b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeApp.java
index d4eb2a9c75d0..a2da23e918d2 100644
--- a/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeApp.java
+++ b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeApp.java
@@ -28,11 +28,11 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
+import android.graphics.Rect;
import android.hardware.display.DisplayManager;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
-import android.util.Size;
import android.util.Slog;
import android.view.Display;
import android.view.ViewGroup;
@@ -134,8 +134,8 @@ public class FakeApp extends Application {
}
lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
lp.height = ViewGroup.LayoutParams.MATCH_PARENT;
- Size maxWindowSize = wm.getMaximumWindowMetrics().getSize();
- int maxSize = Math.max(maxWindowSize.getWidth(), maxWindowSize.getHeight());
+ Rect maxWindowBounds = wm.getMaximumWindowMetrics().getBounds();
+ int maxSize = Math.max(maxWindowBounds.width(), maxWindowBounds.height());
maxSize *= 2;
lp.x = maxSize;
lp.y = maxSize;
diff --git a/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeBackgroundService.java b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeBackgroundService.java
index df00eee63b50..e2120f80f1c9 100644
--- a/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeBackgroundService.java
+++ b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeBackgroundService.java
@@ -19,22 +19,22 @@ package com.android.fakeoemfeatures;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
-import java.util.ArrayList;
-import java.util.Random;
-
import android.app.Dialog;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
+import android.graphics.Rect;
import android.hardware.display.DisplayManager;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
-import android.util.Size;
import android.view.Display;
import android.view.ViewGroup;
import android.view.WindowManager;
+import java.util.ArrayList;
+import java.util.Random;
+
public class FakeBackgroundService extends Service {
final ArrayList<int[]> mAllocs = new ArrayList<int[]>();
@@ -99,8 +99,8 @@ public class FakeBackgroundService extends Service {
// Create an instance of WindowManager that is adjusted to the area of the display dedicated
// for windows with type TYPE_APPLICATION_OVERLAY.
final WindowManager wm = windowContext.getSystemService(WindowManager.class);
- Size maxWindowSize = wm.getMaximumWindowMetrics().getSize();
- int maxSize = Math.max(maxWindowSize.getWidth(), maxWindowSize.getHeight());
+ Rect maxWindowBounds = wm.getMaximumWindowMetrics().getBounds();
+ int maxSize = Math.max(maxWindowBounds.width(), maxWindowBounds.height());
maxSize *= 2;
lp.x = maxSize;
lp.y = maxSize;