Skip to content

Commit

Permalink
Adds checkstyle FileTabCharacter (getodk#882)
Browse files Browse the repository at this point in the history
* Adds checkstyle FileTabCharacter

* Fixes AndroidManifest

* Fixes AppListActivity

* Fixes OSMWidget

* Fixes instance_uploader_list

* Fixes geopoint_layout

* Fixes checkstyle

* Fixes form_entry_end

* Fixes arrays.xml

* Fixes untranslated.xml

* Fixes splash_screen

* Fixes start_arrow.xml

* Fixes push_right_out

* Fixes push_right_in

* Fixes two_item_multiple_choice

* Fixes two_item_image

* Fixes theme.xml

* Fixes string.xml

* Fixes two_item

* Fixes thumb.xml

* Fixes push_out_left

* Fixes chooser_list_layout

* Fixes EncryptionUtils

* Fixes GeopointMapActivity

* Fixes GeoTraceOsmMapActivity

* Fixes ExStringWidget

* Fixes GeoPointOsmMapActivity

* Fixes MainMenuActivity

* Fixes WebUtils

* Fixes fade_in and fade_out

* Fixes geopoint_osm_layout

* Fixes google_preferences

* Fixes heirarchy_layout

* Fixes main_menu

* Fixes preferences.xml

* Fixes push_left_in

* Fixes list_view_filled
  • Loading branch information
shobhitagarwal1612 authored and lognaturel committed Apr 13, 2017
1 parent 78281ed commit 77e2ae9
Show file tree
Hide file tree
Showing 39 changed files with 972 additions and 918 deletions.
33 changes: 16 additions & 17 deletions collect_app/config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<?xml version="1.0"?><!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<!--
Checkstyle configuration that checks the Google coding conventions from Google Java Style
Expand All @@ -11,23 +10,23 @@
Source: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
-->

<module name = "Checker">
<property name="charset" value="UTF-8"/>
<module name="Checker">
<property name="charset" value="UTF-8" />

<property name="fileExtensions" value="java, properties, xml"/>
<property name="fileExtensions" value="java, properties, xml" />

<!-- <module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module> -->
<module name="FileTabCharacter">
<property name="eachLine" value="true" />
</module>

<module name="TreeWalker">
<!-- ODK-specific additions -->
<!-- ODK-specific additions -->
<module name="IllegalImport" />
<module name="RedundantImport" />
<module name="UnusedImports" />

<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="SimplifyBooleanExpression" />
<module name="SimplifyBooleanReturn" />

<module name="OuterTypeFilename"/>
<module name="IllegalTokenText">
Expand All @@ -44,14 +43,14 @@
<property name="max" value="100"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module> -->
<module name="AvoidStarImport"/>
<module name="AvoidStarImport" />
<!-- <module name="OneTopLevelClass"/> -->
<!-- <module name="NoLineWrap"/> -->
<!-- <module name="EmptyBlock">
<property name="option" value="TEXT"/>
<property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
</module> -->
<module name="NeedBraces"/>
<module name="NeedBraces" />
<!-- <module name="LeftCurly">
<property name="maxLineLength" value="100"/>
</module> -->
Expand All @@ -74,8 +73,8 @@
<message key="ws.notPreceded"
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
</module> -->
<module name="OneStatementPerLine"/>
<module name="MultipleVariableDeclarations"/>
<module name="OneStatementPerLine" />
<module name="MultipleVariableDeclarations" />
<!-- <module name="ArrayTypeStyle"/> -->
<!-- <module name="MissingSwitchDefault"/> -->
<!-- <module name="FallThrough"/> -->
Expand Down
135 changes: 71 additions & 64 deletions collect_app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2009 University of Washington Licensed under the Apache
License, Version 2.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the License.
<?xml version="1.0" encoding="utf-8"?><!--
Copyright (C) 2009 University of Washington Licensed under the Apache
License, Version 2.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.odk.collect.android"
>
package="org.odk.collect.android">

<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.location.network" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />

<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-feature android:name="android.hardware.wifi" android:required="false" />
<uses-feature
android:name="android.hardware.location"
android:required="false" />
<uses-feature
android:name="android.hardware.location.network"
android:required="false" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="false" />

<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
<uses-feature
android:name="android.hardware.wifi"
android:required="false" />


<uses-permission android:name="android.permission.READ_PHONE_STATE" />
Expand All @@ -37,57 +44,56 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
android:required="true" />
<!-- for Maps v2 functionality, want:
<uses-feature android:glEsVersion="0x00020000" android:required="false"/>
uses-feature android:glEsVersion="0x00020000" android:required="false"
BUT, the gl setting is not modified by the required parameter, so
do not declare anything here - detect capabilities at runtime.
uses-feature android:glEsVersion="0x00020000" android:required="false"
BUT, the gl setting is not modified by the required parameter, so
do not declare anything here - detect capabilities at runtime.
-->

<permission
android:name="org.odk.collect.android.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
android:name="org.odk.collect.android.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />

<uses-permission android:name="org.odk.collect.android.permission.MAPS_RECEIVE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

<supports-screens
android:anyDensity="true"
android:xlargeScreens="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true" />
android:smallScreens="true"
android:xlargeScreens="true" />

<application
android:name="org.odk.collect.android.application.Collect"
android:supportsRtl="true"
android:largeHeap="true"
android:installLocation="auto"
android:icon="@drawable/notes"
android:installLocation="auto"
android:label="@string/app_name"
android:theme="@style/Collect"
>
android:largeHeap="true"
android:supportsRtl="true"
android:theme="@style/Collect">

<provider
android:exported="true"
android:name="org.odk.collect.android.provider.FormsProvider"
android:authorities="org.odk.collect.android.provider.odk.forms" />
android:authorities="org.odk.collect.android.provider.odk.forms"
android:exported="true" />
<provider
android:exported="true"
android:name="org.odk.collect.android.provider.InstanceProvider"
android:authorities="org.odk.collect.android.provider.odk.instances" />
android:authorities="org.odk.collect.android.provider.odk.instances"
android:exported="true" />

<activity
android:name=".activities.MainMenuActivity"
android:configChanges="locale|orientation|screenSize"
android:label="@string/app_name" >
</activity>
android:label="@string/app_name"></activity>
<activity
android:name=".activities.FormEntryActivity"
android:configChanges="orientation"
android:label="@string/app_name"
android:windowSoftInputMode="adjustResize" >
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
Expand All @@ -98,13 +104,12 @@
<data android:mimeType="vnd.android.cursor.item/vnd.odk.instance" />
</intent-filter>
</activity>
<activity
<activity
android:name=".activities.NotificationActivity"
android:excludeFromRecents="true"
android:label="@string/app_name"
android:taskAffinity=""
android:launchMode="singleTask"
android:excludeFromRecents="true"
/>
android:taskAffinity="" />
<activity
android:name=".activities.DrawActivity"
android:label="@string/app_name" />
Expand All @@ -113,10 +118,9 @@
android:label="@string/all_open_source_licenses" />
<activity
android:name=".activities.GoogleDriveActivity"
android:label="@string/app_name"
android:configChanges="orientation|screenSize"
android:windowSoftInputMode="stateHidden"
/>
android:label="@string/app_name"
android:windowSoftInputMode="stateHidden" />
<activity
android:name=".activities.InstanceChooserList"
android:label="@string/app_name" />
Expand All @@ -132,7 +136,7 @@

<activity
android:name=".activities.FormChooserList"
android:label="@string/app_name" >
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
Expand All @@ -158,12 +162,12 @@
android:name=".activities.InstanceUploaderList"
android:configChanges="orientation|screenSize"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".activities.InstanceUploaderActivity"
Expand Down Expand Up @@ -195,12 +199,13 @@
<activity
android:name=".activities.GeoPointActivity"
android:label="@string/app_name" />
<activity android:name=".activities.GeoPointMapActivity"
<activity
android:name=".activities.GeoPointMapActivity"
android:configChanges="orientation"
android:label="@string/app_name" />
<!--<activity-->
<!--android:name=".activities.GeoPointMapActivitySdk7"-->
<!--android:label="@string/app_name" />-->
<!--android:name=".activities.GeoPointMapActivitySdk7"-->
<!--android:label="@string/app_name" />-->
<activity
android:name=".activities.GeoPointOsmMapActivity"
android:configChanges="orientation"
Expand Down Expand Up @@ -228,7 +233,7 @@
<activity
android:name=".activities.SplashScreenActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.Dialog" >
android:theme="@android:style/Theme.Dialog">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand All @@ -240,7 +245,7 @@
<activity
android:name=".activities.AndroidShortcuts"
android:label="ODK Form"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.CREATE_SHORTCUT" />

Expand All @@ -249,7 +254,7 @@
</activity>
<receiver
android:name=".receivers.NetworkReceiver"
android:enabled="true" >
android:enabled="true">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
Expand All @@ -259,30 +264,32 @@
</receiver>
<!-- Register AnalyticsReceiver and AnalyticsService to support background
dispatching on non-Google Play devices. -->
<receiver android:name="com.google.android.gms.analytics.AnalyticsReceiver"
<receiver
android:name="com.google.android.gms.analytics.AnalyticsReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
</intent-filter>
</receiver>
<service android:name="com.google.android.gms.analytics.AnalyticsService"
<service
android:name="com.google.android.gms.analytics.AnalyticsService"
android:enabled="true"
android:exported="false"/>
android:exported="false" />
<!-- ... -->

<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyBS-JQ-dnaZ_8qsbvSyr_I3rTPFd5fJsYI"/>
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyBS-JQ-dnaZ_8qsbvSyr_I3rTPFd5fJsYI" />

<meta-data
tools:replace="android:value"
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" /> <!-- integer/google_play_services_version -->
android:value="@integer/google_play_services_version"
tools:replace="android:value" /> <!-- integer/google_play_services_version -->

<uses-library
android:name="com.google.android.maps"
android:required="false" />

</application>
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public static void toggleButtonLabel(Button mToggleButton, ListView lv) {
mToggleButton.setText(R.string.clear_all);
}
}

@Override
public void onBackPressed() {
if (mDrawerLayout.isDrawerOpen(Gravity.END)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class GeoPointMapActivity extends FragmentActivity implements LocationLis
private int mLocationCount = 0;

private MapHelper mHelper;
// private KmlLayer kk;
//private KmlLayer kk;

private AlertDialog zoomDialog;
private View zoomDialogView;
Expand Down Expand Up @@ -335,8 +335,7 @@ public void onClick(View v) {

}
}

/*Zoom only if there's a previous location*/
/*Zoom only if there's a previous location*/
if (mLatLng != null) {
mlocationInfo.setVisibility(View.GONE);
mLocationStatus.setVisibility(View.GONE);
Expand Down Expand Up @@ -373,7 +372,7 @@ private void upMyLocationOverlayLayers() {
this);
}
}
// mShowLocation.setClickable(mMarker != null);
//mShowLocation.setClickable(mMarker != null);
if (!mGPSOn && !mNetworkOn) {
showGPSDisabledAlertToUser();
} else {
Expand Down Expand Up @@ -410,7 +409,7 @@ public void onLocationChanged(Location location) {
mReloadLocation.setEnabled(true);
}
if (!foundFirstLocation) {
// zoomToPoint();
//zoomToPoint();
showZoomDialog();
foundFirstLocation = true;
}
Expand Down
Loading

0 comments on commit 77e2ae9

Please sign in to comment.