Skip to content

Commit

Permalink
update apk
Browse files Browse the repository at this point in the history
  • Loading branch information
uberspot committed Jan 10, 2016
1 parent 7217b28 commit 1c49211
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Binary file modified 2048-android-release.apk
Binary file not shown.
6 changes: 3 additions & 3 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.uberspot.a2048"
android:versionCode="19"
android:versionName="1.96" >
android:versionCode="20"
android:versionName="2.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="22" />
android:targetSdkVersion="23" />

<application
android:allowBackup="true"
Expand Down
10 changes: 7 additions & 3 deletions src/com/uberspot/a2048/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.util.Log;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.View;
Expand All @@ -25,6 +26,8 @@

public class MainActivity extends Activity {

private static final String MAIN_ACTIVITY_TAG = "2048_MainActivity";

private WebView mWebView;
private long mLastBackPress;
private static final long mBackPressThreshold = 3500;
Expand Down Expand Up @@ -56,7 +59,9 @@ protected void onCreate(Bundle savedInstanceState) {
try {
isOrientationEnabled = Settings.System.getInt(getContentResolver(),
Settings.System.ACCELEROMETER_ROTATION) == 1;
} catch (SettingNotFoundException e) { }
} catch (SettingNotFoundException e) {
Log.d(MAIN_ACTIVITY_TAG, "Settings could not be loaded");
}

// If rotation isn't locked and it's a LARGE screen then add orientation changes based on sensor
int screenLayout = getResources().getConfiguration().screenLayout
Expand All @@ -72,12 +77,11 @@ protected void onCreate(Bundle savedInstanceState) {
// Load webview with game
mWebView = (WebView) findViewById(R.id.mainWebView);
WebSettings settings = mWebView.getSettings();
String packageName = getPackageName();
settings.setJavaScriptEnabled(true);
settings.setDomStorageEnabled(true);
settings.setDatabaseEnabled(true);
settings.setRenderPriority(RenderPriority.HIGH);
settings.setDatabasePath("/data/data/" + packageName + "/databases");
settings.setDatabasePath(getFilesDir().getParentFile().getPath() + "/databases");

// If there is a previous instance restore it in the webview
if (savedInstanceState != null) {
Expand Down

0 comments on commit 1c49211

Please sign in to comment.