Merge "camera2: Update openCamera calls now that it is async" into klp-dev
diff --git a/tests/tests/content/src/android/content/res/cts/ConfigTest.java b/tests/tests/content/src/android/content/res/cts/ConfigTest.java
index b49f156..bcfabe1 100644
--- a/tests/tests/content/src/android/content/res/cts/ConfigTest.java
+++ b/tests/tests/content/src/android/content/res/cts/ConfigTest.java
@@ -116,13 +116,16 @@
break;
case WIDTH:
mMetrics.widthPixels = value;
+ mMetrics.noncompatWidthPixels = value;
break;
case HEIGHT:
mMetrics.heightPixels = value;
+ mMetrics.noncompatHeightPixels = value;
break;
case DENSITY:
// this is the ratio from the standard
mMetrics.density = (((float)value)/((float)DisplayMetrics.DENSITY_DEFAULT));
+ mMetrics.noncompatDensity = mMetrics.density;
mConfig.densityDpi = value;
break;
case SCREENLAYOUT:
@@ -172,21 +175,21 @@
public TotalConfig makeClassicConfig() {
TotalConfig config = new TotalConfig();
- config.mConfig.locale = new Locale("en", "US");
- config.mConfig.mcc = 310;
- config.mConfig.mnc = 001; // unused
- config.mConfig.touchscreen = Configuration.TOUCHSCREEN_FINGER;
- config.mConfig.keyboard = Configuration.KEYBOARD_QWERTY;
- config.mConfig.keyboardHidden = Configuration.KEYBOARDHIDDEN_YES;
- config.mConfig.navigation = Configuration.NAVIGATION_TRACKBALL;
- config.mConfig.orientation = Configuration.ORIENTATION_PORTRAIT;
- config.mConfig.smallestScreenWidthDp = 320;
- config.mConfig.screenWidthDp = 320;
- config.mConfig.screenHeightDp = 480;
- config.mConfig.densityDpi = 160;
- config.mMetrics.widthPixels = 200;
- config.mMetrics.heightPixels = 320;
- config.mMetrics.density = 1;
+ config.setProperty(Properties.LANGUAGE, "en");
+ config.setProperty(Properties.COUNTRY, "US");
+ config.setProperty(Properties.MCC, 310);
+ config.setProperty(Properties.MNC, 001); // unused
+ config.setProperty(Properties.TOUCHSCREEN, Configuration.TOUCHSCREEN_FINGER);
+ config.setProperty(Properties.KEYBOARD, Configuration.KEYBOARD_QWERTY);
+ config.setProperty(Properties.KEYBOARDHIDDEN, Configuration.KEYBOARDHIDDEN_YES);
+ config.setProperty(Properties.NAVIGATION, Configuration.NAVIGATION_TRACKBALL);
+ config.setProperty(Properties.ORIENTATION, Configuration.ORIENTATION_PORTRAIT);
+ config.setProperty(Properties.SWIDTH_DP, 320);
+ config.setProperty(Properties.WIDTH_DP, 320);
+ config.setProperty(Properties.HEIGHT_DP, 480);
+ config.setProperty(Properties.DENSITY, 160);
+ config.setProperty(Properties.WIDTH, 200);
+ config.setProperty(Properties.HEIGHT, 320);
return config;
}
diff --git a/tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeaders.java b/tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeaders.java
index 1059700..1bb5637 100644
--- a/tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeaders.java
+++ b/tests/tests/preference2/src/android/preference2/cts/PreferenceWithHeaders.java
@@ -40,6 +40,14 @@
}
}
+ /*
+ * Validate the fragment loaded into this activity. Required for apps built for API 19 and
+ * above.
+ */
+ protected boolean isValidFragment(String fragment) {
+ return PrefsOneFragment.class.getName().equals(fragment);
+ }
+
/**
* Populate the activity with the top-level headers.
*/
diff --git a/tests/tests/provider/src/android/provider/cts/TelephonyProviderTest.java b/tests/tests/provider/src/android/provider/cts/TelephonyProviderTest.java
index e352252..a37ef4b 100644
--- a/tests/tests/provider/src/android/provider/cts/TelephonyProviderTest.java
+++ b/tests/tests/provider/src/android/provider/cts/TelephonyProviderTest.java
@@ -27,7 +27,7 @@
import java.io.FileDescriptor;
// To run the tests in this file w/o running all the cts tests:
-// build cts
+// make cts
// cts-tradefed
// run cts -c android.provider.cts.TelephonyProviderTest
@@ -37,7 +37,7 @@
@Override
protected void setUp() throws Exception {
super.setUp();
- mContentResolver = getInstrumentation().getTargetContext().getContentResolver();
+ mContentResolver = getInstrumentation().getContext().getContentResolver();
}
// Test that the TelephonyProvider doesn't allow clients to update _data column data and