summaryrefslogtreecommitdiffstats
path: root/tests/DpiTest
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-07-21 20:03:02 -0700
committerDianne Hackborn <hackbod@google.com>2009-07-22 11:58:31 -0700
commit11b822d2a91ea17c34c0cb1c11e80a9a30d72864 (patch)
tree7eec5218c6831641b406f1b969841314f452adbb /tests/DpiTest
parent59c25cbaf0dd690e503b881392510127441d9074 (diff)
downloadframeworks_base-11b822d2a91ea17c34c0cb1c11e80a9a30d72864.zip
frameworks_base-11b822d2a91ea17c34c0cb1c11e80a9a30d72864.tar.gz
frameworks_base-11b822d2a91ea17c34c0cb1c11e80a9a30d72864.tar.bz2
Simplify density compatibility to a boolean.
Instead of a list, we now just have a single boolean indicating whether an application is density aware, and this set set to true by default as of Donut.
Diffstat (limited to 'tests/DpiTest')
-rw-r--r--tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java b/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java
index 49fff57..dd4fae3 100644
--- a/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java
+++ b/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java
@@ -52,14 +52,13 @@ public class DpiTestActivity extends Activity {
// be doing it.
Application app = ActivityThread.currentActivityThread().getApplication();
ApplicationInfo ai = app.getPackageManager().getApplicationInfo(
- "com.google.android.test.dpi",
- PackageManager.GET_SUPPORTS_DENSITIES);
+ "com.google.android.test.dpi", 0);
if (noCompat) {
ai.flags |= ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS
| ApplicationInfo.FLAG_SUPPORTS_NORMAL_SCREENS
| ApplicationInfo.FLAG_SUPPORTS_SMALL_SCREENS
- | ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS;
- ai.supportsDensities = new int[] { ApplicationInfo.ANY_DENSITY };
+ | ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS
+ | ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES;
app.getResources().setCompatibilityInfo(new CompatibilityInfo(ai));
}
} catch (PackageManager.NameNotFoundException e) {