Commit 806b8276 authored by Scott Zeid's avatar Scott Zeid

hackishly fix package separation

parent fa6fcd89
main/com/amirunninglinux/common
\ No newline at end of file
......@@ -26,7 +26,7 @@
*
*/
package com.amirunninglinux;
package com.amirunninglinux.common;
import java.util.regex.Pattern;
......@@ -41,7 +41,9 @@ import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class AmIRunningLinux extends Activity {
import com.amirunninglinux.R;
public class CommonActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
......@@ -52,7 +54,7 @@ public class AmIRunningLinux extends Activity {
WebView webView = (WebView) this.findViewById(R.id.webview);
WebSettings webSettings = webView.getSettings();
String ua = webSettings.getUserAgentString()
String ua = webSettings.getUserAgentString() + " "
+ String.format(this.getString(R.string.webview_ua_base), this.getVersion());
// Regex for *accurately* checking the hostname to see if it's ours or a subdomain
......@@ -74,7 +76,7 @@ public class AmIRunningLinux extends Activity {
if (host.matches(re))
return false;
AmIRunningLinux.this.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
CommonActivity.this.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
return true;
}
});
......
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.amirunninglinux.gnu"
android:versionCode="1"
android:versionName="1.0-gnu">
android:versionCode="2"
android:versionName="1.0.1-gnu">
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
<activity android:name="AmIRunningGNULinux"
android:label="@string/app_name">
......
<?xml version="1.0" encoding="UTF-8"?>
<project name="amirunninglinux" default="help">
<project name="amirunninglinux.gnu" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
......
../common/src
\ No newline at end of file
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.amirunninglinux;
public final class R {
public static final class attr {
}
public static final class drawable {
public static final int ic_launcher=com.amirunninglinux.gnu.R.drawable.ic_launcher;
}
public static final class id {
public static final int webview=com.amirunninglinux.gnu.R.id.webview;
}
public static final class layout {
public static final int main=com.amirunninglinux.gnu.R.layout.main;
}
public static final class string {
public static final int app_name=com.amirunninglinux.gnu.R.string.app_name;
public static final int webview_ua_base=com.amirunninglinux.gnu.R.string.webview_ua_base;
public static final int webview_url=com.amirunninglinux.gnu.R.string.webview_url;
}
}
../../../../../common/src/main/com/amirunninglinux/common
\ No newline at end of file
/*
* Copyright (c) 2014 Scott Zeid.
* http://code.s.zeid.me/amirunninglinux.apk
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Except as contained in this notice, the name(s) of the above copyright holders
* shall not be used in advertising or otherwise to promote the sale, use or
* other dealings in this Software without prior written authorization.
*
*/
package com.amirunninglinux.gnu;
import com.amirunninglinux.common.CommonActivity;
public class AmIRunningGNULinux extends CommonActivity {}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.amirunninglinux"
android:versionCode="1"
android:versionName="1.0">
android:versionCode="2"
android:versionName="1.0.1">
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
<activity android:name="AmIRunningLinux"
android:label="@string/app_name">
......
../common/src
\ No newline at end of file
main/com/amirunninglinux
\ No newline at end of file
/*
* Copyright (c) 2014 Scott Zeid.
* http://code.s.zeid.me/amirunninglinux.apk
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Except as contained in this notice, the name(s) of the above copyright holders
* shall not be used in advertising or otherwise to promote the sale, use or
* other dealings in this Software without prior written authorization.
*
*/
package com.amirunninglinux;
import com.amirunninglinux.common.CommonActivity;
public class AmIRunningLinux extends CommonActivity {}
../../../../../common/src/main/com/amirunninglinux/common
\ No newline at end of file
......@@ -28,6 +28,4 @@
package com.amirunninglinux.gnu;
import com.amirunninglinux.AmIRunningLinux;
public class AmIRunningGNULinux extends AmIRunningLinux {}
public class R {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment