Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into issue/985-make-sfa…
Browse files Browse the repository at this point in the history
…ctory-private

Conflicts:
	WordPress/src/androidTest/java/org/wordpress/android/ActivityRobotiumTestCase.java
  • Loading branch information
maxme committed Dec 2, 2014
2 parents fe44802 + 2624b92 commit 1ad0a91
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 311 deletions.
6 changes: 2 additions & 4 deletions WordPressUtils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ repositories {
dependencies {
compile 'commons-lang:commons-lang:2.6'
compile 'com.mcxiaoke.volley:library:1.0.+'
compile 'com.github.castorflex.smoothprogressbar:library:0.4.0'
compile 'org.wordpress:pulltorefresh-main:0.9.7@aar' // org.wordpress version includes some fixes
compile 'com.android.support:support-v13:19.1.0'
compile 'com.android.support:support-v13:21.0.2'
}

android {
publishNonDefault true

compileSdkVersion 19
buildToolsVersion "19.1.0"
buildToolsVersion "21.1.1"

defaultConfig {
applicationId "org.wordpress.android.util"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.wordpress.android.util;

import android.app.Activity;
import android.content.Context;
import android.view.inputmethod.InputMethodManager;

public class ActivityUtils {
public static void hideKeyboard(Activity activity) {
if (activity != null && activity.getCurrentFocus() != null) {
InputMethodManager inputManager = (InputMethodManager) activity.getSystemService(
Context.INPUT_METHOD_SERVICE);
inputManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -232,25 +232,4 @@ public static JSONObject getJSONChild(final JSONObject jsonParent, final String
}
return jsonChild;
}

// Returns a copy of the passed JSONObject
@SuppressWarnings("unchecked")
public static JSONObject copyJSONObject(JSONObject object) {
JSONObject objectCopy = new JSONObject();

if (object == null) return objectCopy;

Iterator<String> iterator = object.keys();
while (iterator.hasNext()) {
try {
String key = iterator.next();
Object value = object.get(key);
objectCopy.put(key, value);
} catch (JSONException e) {
AppLog.e(T.UTILS, e);
}
}

return objectCopy;
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1ad0a91

Please sign in to comment.