Backed out changeset 288b6ba19e64 (bug 1257304) because it caused merge conflicts with m-c/fx-team

MozReview-Commit-ID: HuO0AUpagld
This commit is contained in:
Wes Kocher 2016-04-01 16:04:48 -07:00
parent 9825c57bc3
commit 4eeb180418
2 changed files with 11 additions and 21 deletions

View File

@ -302,7 +302,6 @@ public class GeckoAppShell
public static native void onFullScreenPluginHidden(View view);
private static LayerView sLayerView;
private static Rect sScreenSize;
public static void setLayerView(LayerView lv) {
if (sLayerView == lv) {
@ -1268,7 +1267,7 @@ public class GeckoAppShell
if (action.equalsIgnoreCase(Intent.ACTION_SEND)) {
Intent shareIntent = getShareIntent(context, targetURI, mimeType, title);
return Intent.createChooser(shareIntent,
context.getResources().getString(R.string.share_title));
context.getResources().getString(R.string.share_title));
}
Uri uri = normalizeUriScheme(targetURI.indexOf(':') >= 0 ? Uri.parse(targetURI) : new Uri.Builder().scheme(targetURI).build());
@ -1734,7 +1733,7 @@ public class GeckoAppShell
return true;
}
};
EnumerateGeckoProcesses(visitor);
}
@ -1756,7 +1755,7 @@ public class GeckoAppShell
// figure out the column offsets. We only care about the pid and user fields
StringTokenizer st = new StringTokenizer(headerOutput);
int tokenSoFar = 0;
while (st.hasMoreTokens()) {
String next = st.nextToken();
@ -1889,7 +1888,7 @@ public class GeckoAppShell
final MimeTypeMap mtm = MimeTypeMap.getSingleton();
return mtm.getMimeTypeFromExtension(ext);
}
private static Drawable getDrawableForExtension(PackageManager pm, String aExt) {
Intent intent = new Intent(Intent.ACTION_VIEW);
final String mimeType = getMimeTypeFromExtension(aExt);
@ -2613,7 +2612,7 @@ public class GeckoAppShell
if (Proxy.NO_PROXY.equals(proxy)) {
return "DIRECT";
}
switch (proxy.type()) {
case HTTP:
return "PROXY " + proxy.address().toString();
@ -2856,18 +2855,11 @@ public class GeckoAppShell
return 0;
}
public static synchronized Rect getScreenSize(final boolean update) {
if (update || sScreenSize == null) {
final WindowManager wm = (WindowManager)
getApplicationContext().getSystemService(Context.WINDOW_SERVICE);
final Display disp = wm.getDefaultDisplay();
sScreenSize = new Rect(0, 0, disp.getWidth(), disp.getHeight());
}
return sScreenSize;
}
@WrapForJNI
public static Rect getScreenSize() {
return getScreenSize(/* update */ false);
static Rect getScreenSize() {
final WindowManager wm = (WindowManager)
getApplicationContext().getSystemService(Context.WINDOW_SERVICE);
final Display disp = wm.getDefaultDisplay();
return new Rect(0, 0, disp.getWidth(), disp.getHeight());
}
}

View File

@ -40,7 +40,7 @@ public class GeckoScreenOrientation {
this.value = (short)value;
}
private final static ScreenOrientation[] sValues = ScreenOrientation.values();
private final static ScreenOrientation[] sValues = ScreenOrientation.values();
public static ScreenOrientation get(int value) {
for (ScreenOrientation orient: sValues) {
@ -156,8 +156,6 @@ public class GeckoScreenOrientation {
GeckoEvent.createScreenOrientationEvent(aScreenOrientation.value,
getAngle()));
}
// Update screen size.
GeckoAppShell.getScreenSize(/* update */ true);
return true;
}