Skip to content

Commit

Permalink
Further directory structure standardization
Browse files Browse the repository at this point in the history
Remove unused libs
Created module 'app'
Root module is now a super project for :app
Remove autogenerated gradle/
Fix libpng warning (iCCP: Not recognizing known sRGB profile that has been edited)
    -Fixed via ImageMagick (convert  -strip
    -Fixes CVE-2014-9495[1]

Add settings.gradle
  • Loading branch information
JBirdVegas committed Feb 19, 2015
1 parent a90f2c8 commit 9d48d5f
Show file tree
Hide file tree
Showing 392 changed files with 300 additions and 288 deletions.
10 changes: 5 additions & 5 deletions PRIVACY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ We will NEVER collect any personally identifiable information (this is
Information collected and how it is used
----------------------------------------
- The Current ROM being used:
Agregate data may be collected on what ROM is being used by the
Aggregate data may be collected on what ROM is being used by the
user. This will be used to determine what ROMs people who are
most active on Gerrit use and to change the Gerrit instances which
mGerrit officially supports.
- The current Gerrit that is being used
Agregate data used in a similar way to the data collected on the
Aggregate data used in a similar way to the data collected on the
current ROM being used. If one Gerrit instance that is not officially
supported is regularly used, officially supporting it may be considered
even if the server Gerrit version does not meet the minimum standard.
- Data transfer statistics:
Statistics on how long the server takes to respond to requests, time
taken to process the responses and error rates can be collected. This
data can then be used to assist implementing data and batery optimisation
strategies such as reducing the data transfered when using mobile data
data can then be used to assist implementing data and battery optimisation
strategies such as reducing the data transferred when using mobile data
compared to a WiFi connection.
- Decoding failures
Collecting data on failures processing server responses, particularly change
diffs will help improve the decoding algorithms used to decode similar
server respones.
server responses.
- Search queries and the number of results returned:
Collecting data on the way users write search queries will allow optimisation
of search processing in mGerrit, adding support for more keywords and aliasing
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Simplified Chinese translations by YULIANGMAX and Czech translation by Petr Rezn

## Change List Searching
Searching the change lists, either the 'Review', 'Merged' or 'Abandoned' tabs is designed to mimic the functionality in the Gerrit
web interface. As each change contains alot of different data, Gerrit uses what are known as operators. To avoid confusing these
web interface. As each change contains a lot of different data, Gerrit uses what are known as operators. To avoid confusing these
with what they call boolean operators we will call these "keywords".

**Keywords**: Act as restrictions on the search. As more keywords are added to the same query string, they further restrict the returned
Expand Down
36 changes: 0 additions & 36 deletions ant.properties

This file was deleted.

1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
90 changes: 90 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0-rc3'
classpath 'com.jakewharton.hugo:hugo-plugin:1.1.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'hugo'
apply plugin: 'checkstyle'

repositories {
mavenCentral()
}

dependencies {
compile files('libs/android-support-v4.jar')
compile files('libs/libGoogleAnalyticsServices.jar')
compile files('libs/annotations.jar')
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.mcxiaoke.volley:library:1.0.10'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'joda-time:joda-time:2.7'
compile 'com.nhaarman.listviewanimations:lib-core:3.1.0@aar'
compile 'com.nhaarman.listviewanimations:lib-core-slh:3.1.0@aar'
compile 'se.emilsjolander:stickylistheaders:2.5.2'
}

android {
compileSdkVersion 21
buildToolsVersion '21.1.2'
// compile Using Java 7
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
sourceSets {
main {
// accept defaut file structure of android plugin
}
}
signingConfigs {
release {}
}
buildTypes {
release {
minifyEnabled false
proguardFile 'proguard-project.txt'
signingConfig signingConfigs.release
lintOptions {
abortOnError false
}
}
}
defaultConfig {}
productFlavors {
}
}

// config the style checks to run during the testing phase
check.dependsOn 'checkstyle'

task checkstyle(type: Checkstyle) {
configFile file("${project.rootDir}/config/checkstyle/checkstyle.xml")
source 'src'
include "**/*.java"
exclude "**/gen/**"
classpath = files()
}

def Properties props = new Properties()
def File signingFile = new File('signing.properties')

if (signingFile.exists()) {
props.load(new FileInputStream(signingFile))
}
if (props.containsKey('storeFile') &&
props.containsKey('storePassword') &&
props.containsKey('keyAlias') &&
props.containsKey('keyPassword')) {
android.signingConfigs.release.storeFile = file(props['storeFile'])
android.signingConfigs.release.storePassword = props['storePassword']
android.signingConfigs.release.keyAlias = props['keyAlias']
android.signingConfigs.release.keyPassword = props['keyPassword']
} else {
android.buildTypes.release.signingConfig = null
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/jonathan.stanford/bin/android-sdk-macosx/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.jbirdvegas.mgerrit;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
26 changes: 13 additions & 13 deletions src/main/AndroidManifest.xml → app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
android:theme="@style/Theme.Light"
android:allowBackup="true">
<activity
android:name=".GerritControllerActivity"
android:name=".activities.GerritControllerActivity"
android:label="@string/app_name"
android:launchMode="singleTop">
<intent-filter>
Expand All @@ -44,13 +44,13 @@
<meta-data android:name="android.app.searchable"
android:resource="@xml/changes_searchable"/>
</activity>
<activity android:name=".PatchSetViewerActivity"
android:parentActivityName=".GerritControllerActivity"/>
<activity android:name=".PrefsActivity"
android:parentActivityName=".GerritControllerActivity"/>
<activity android:name=".AOKPChangelog"
<activity android:name=".activities.PatchSetViewerActivity"
android:parentActivityName=".activities.GerritControllerActivity"/>
<activity android:name=".activities.PrefsActivity"
android:parentActivityName=".activities.GerritControllerActivity"/>
<activity android:name=".activities.AOKPChangelog"
android:allowTaskReparenting="true"
android:parentActivityName=".GerritControllerActivity"
android:parentActivityName=".activities.GerritControllerActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
Expand All @@ -59,19 +59,19 @@
<meta-data android:name="android.app.searchable"
android:resource="@xml/changes_searchable"/>
</activity>
<activity android:name=".ProjectsList"
android:parentActivityName=".GerritControllerActivity"
<activity android:name=".activities.ProjectsList"
android:parentActivityName=".activities.GerritControllerActivity"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data android:name="android.app.searchable"
android:resource="@xml/projects_searchable"/>
</activity>
<activity android:name=".DiffViewer"
android:parentActivityName=".GerritControllerActivity"/>
<activity android:name=".GerritSwitcher"
android:parentActivityName=".PrefsActivity"
<activity android:name=".activities.DiffViewer"
android:parentActivityName=".activities.GerritControllerActivity"/>
<activity android:name=".activities.GerritSwitcher"
android:parentActivityName=".activities.PrefsActivity"
android:windowSoftInputMode="adjustPan"/>
<service android:name=".tasks.GerritService" />
<provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import android.preference.PreferenceManager;

import com.jbirdvegas.mgerrit.database.DatabaseFactory;
import com.jbirdvegas.mgerrit.fragments.PrefsFragment;
import com.jbirdvegas.mgerrit.message.GerritChanged;
import com.jbirdvegas.mgerrit.objects.GerritURL;
import com.jbirdvegas.mgerrit.tasks.GerritService;
Expand Down Expand Up @@ -61,8 +62,8 @@ public void onGerritChanged(String newGerrit) {
DatabaseFactory.changeGerrit(this, newGerrit);

// Unset the project - we don't track these across Gerrit instances
Prefs.setCurrentProject(this, null);
Prefs.clearTrackingUser(this);
PrefsFragment.setCurrentProject(this, null);
PrefsFragment.clearTrackingUser(this);

EventBus.getDefault().post(new GerritChanged(newGerrit));

Expand All @@ -71,9 +72,9 @@ public void onGerritChanged(String newGerrit) {

@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
if (key.equals(Prefs.GERRIT_KEY)) onGerritChanged(Prefs.getCurrentGerrit(this));
if (key.equals(Prefs.APP_THEME)) {
this.setTheme(Prefs.getCurrentThemeID(this));
if (key.equals(PrefsFragment.GERRIT_KEY)) onGerritChanged(PrefsFragment.getCurrentGerrit(this));
if (key.equals(PrefsFragment.APP_THEME)) {
this.setTheme(PrefsFragment.getCurrentThemeID(this));
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.jbirdvegas.mgerrit;
package com.jbirdvegas.mgerrit.activities;

/*
* Copyright (C) 2013 Android Open Kang Project (AOKP)
Expand Down Expand Up @@ -28,6 +28,9 @@
import android.view.MenuInflater;
import android.view.MenuItem;

import com.jbirdvegas.mgerrit.fragments.PrefsFragment;
import com.jbirdvegas.mgerrit.R;
import com.jbirdvegas.mgerrit.fragments.ChangelogFragment;
import com.jbirdvegas.mgerrit.objects.GooFileObject;
import com.jbirdvegas.mgerrit.search.AgeSearch;
import com.jbirdvegas.mgerrit.search.SearchKeyword;
Expand All @@ -43,15 +46,15 @@ public class AOKPChangelog extends FragmentActivity implements ChangelogActivity

@Override
protected void onCreate(Bundle savedInstanceState) {
this.setTheme(Prefs.getCurrentThemeID(this));
this.setTheme(PrefsFragment.getCurrentThemeID(this));
super.onCreate(savedInstanceState);

setContentView(R.layout.aokp_changelog);

// Action bar Up affordance
getActionBar().setDisplayHomeAsUpEnabled(true);

Prefs.setGerritInstanceByName(this, "AOKP");
PrefsFragment.setGerritInstanceByName(this, "AOKP");

ChangelogFragment frag;
frag = (ChangelogFragment) getSupportFragmentManager().findFragmentById(R.id.changelog_fragment);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.jbirdvegas.mgerrit;
package com.jbirdvegas.mgerrit.activities;

/*
* Copyright (C) 2013 Android Open Kang Project (AOKP)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.jbirdvegas.mgerrit;
package com.jbirdvegas.mgerrit.activities;

/*
* Copyright (C) 2013 Android Open Kang Project (AOKP)
Expand Down Expand Up @@ -35,6 +35,8 @@
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.Volley;
import com.jbirdvegas.mgerrit.fragments.PrefsFragment;
import com.jbirdvegas.mgerrit.R;
import com.jbirdvegas.mgerrit.adapters.FileAdapter;
import com.jbirdvegas.mgerrit.database.FileChanges;
import com.jbirdvegas.mgerrit.helpers.Tools;
Expand Down Expand Up @@ -104,7 +106,7 @@ private enum DiffType { Loading, Text, Image }

@Override
protected void onCreate(Bundle savedInstanceState) {
this.setTheme(Prefs.getCurrentThemeID(this));
this.setTheme(PrefsFragment.getCurrentThemeID(this));
super.onCreate(savedInstanceState);

setContentView(R.layout.diff_viewer);
Expand Down
Loading

0 comments on commit 9d48d5f

Please sign in to comment.