Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/1.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Katie committed Aug 3, 2022
2 parents e12ac10 + 460f992 commit 6de2162
Show file tree
Hide file tree
Showing 37 changed files with 193 additions and 274 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ captures/
.idea/caches/
.idea/assetWizardSettings.xml

# Android Studio
.idea/deploymentTargetDropDown.xml

# Keystore files
*.jks
*.keystore
Expand All @@ -68,3 +71,6 @@ google-services.json
freeline.py
freeline/
freeline_project_description.json

# macos
.DS_Store
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 18 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

22 changes: 10 additions & 12 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,19 @@ apply plugin: 'com.google.android.gms.oss-licenses-plugin'
apply plugin: 'com.google.firebase.crashlytics'

android {
lintOptions {
abortOnError false
}
signingConfigs {
release
}
buildFeatures {
dataBinding = true
}
compileSdkVersion 29
compileSdkVersion 30
defaultConfig {
applicationId "org.gophillygo.app"
minSdkVersion 19
targetSdkVersion 29
versionCode 24
versionName "1.3.0"
minSdkVersion 21
targetSdkVersion 30
versionCode 25
versionName "1.4.0"
vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -57,6 +54,7 @@ android {
shrinkResources false
}
release {
crunchPngs false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
Expand All @@ -67,11 +65,11 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
aaptOptions {
cruncherEnabled = false
}
productFlavors {
}
lint {
abortOnError false
}
}

dependencies {
Expand Down Expand Up @@ -134,7 +132,7 @@ dependencies {
implementation 'com.squareup.okhttp3:logging-interceptor:4.7.2'

// Dagger 2
def daggerVersion = '2.28'
def daggerVersion = '2.35.1'
implementation "com.google.dagger:dagger:$daggerVersion"
annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
implementation "com.google.dagger:dagger-android:$daggerVersion"
Expand Down
4 changes: 0 additions & 4 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@

# Top-level functions that can only be used by Kotlin.
-dontwarn retrofit2.KotlinExtensions
-dontwarn retrofit2.KotlinExtensions$*

# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
# and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
Expand Down Expand Up @@ -104,6 +103,3 @@
# Crashlytics
-keep class com.google.android.gms.** { *; }
-keep class com.crashlytics.android.** { *; }

# Search
-keep class android.support.v7.widget.SearchView { *; }
20 changes: 12 additions & 8 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,10 @@
-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- Disable Crashlytics reporting here so it can be enabled in code as an opt-in -->
<meta-data
android:name="firebase_crashlytics_collection_enabled"
android:value="false" />

<!-- Remove phone state and external storage permissions added by library import -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" tools:node="remove"
tools:ignore="ScopedStorage" />

<supports-screens android:smallScreens="true"
android:normalScreens="true"
Expand All @@ -40,6 +36,7 @@
android:name=".activities.SearchActivity"
android:label="@string/title_activity_search"
android:launchMode="singleTop"
android:exported="false"
android:theme="@style/GpgAppTheme">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
Expand All @@ -51,7 +48,8 @@
android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
<activity android:name=".activities.HomeActivity">
<activity android:name=".activities.HomeActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down Expand Up @@ -131,7 +129,8 @@
</activity>
<activity
android:name="com.google.android.gms.oss.licenses.OssLicensesMenuActivity"
android:theme="@style/GpgDarkTextTheme">
android:theme="@style/GpgDarkTextTheme"
android:exported="true">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.gophillygo.app.activities.GpgPreferenceActivity" />
Expand Down Expand Up @@ -183,6 +182,11 @@
android:authorities="org.gophillygo.app.provider"
android:enabled="true"
android:exported="false" />

<!-- Disable Crashlytics reporting here so it can be enabled in code as an opt-in -->
<meta-data
android:name="firebase_crashlytics_collection_enabled"
android:value="false" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ public Location getCurrentLocation() {
*/
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (requestCode == GpgLocationUtils.PERMISSION_REQUEST_ID) {
if (grantResults.length > 0) {
if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ public void addToCalendar(View view) {
.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, startTime)
.putExtra(CalendarContract.EXTRA_EVENT_END_TIME, endTime)
.putExtra(CalendarContract.EXTRA_EVENT_ALL_DAY, !event.isSingleDayEvent());
if (intent.resolveActivity(getPackageManager()) != null) {
try {
startActivity(intent);
} else {
} catch(Exception ex) {
Toast.makeText(this, R.string.event_detail_no_calendar, Toast.LENGTH_SHORT).show();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,26 +136,22 @@ public boolean onCreateOptionsMenu(Menu menu) {
public boolean onOptionsItemSelected(MenuItem item) {
int itemId = item.getItemId();
Intent intent;
switch (itemId) {
case R.id.action_event_place:
Log.d(LOG_LABEL, "Selected event place menu item");
intent = new Intent(this, PlacesListActivity.class);
intent.putExtra(FILTER_KEY, filter);
startActivity(intent);
break;
case R.id.action_event_map:
Log.d(LOG_LABEL, "Selected map menu item");
intent = new Intent(this, EventsMapsActivity.class);
intent.putExtra(FILTER_KEY, filter);
startActivity(intent);
break;
case R.id.action_event_search:
Log.d(LOG_LABEL, "Selected search menu item");
super.onSearchRequested();
break;
default:
Log.w(LOG_LABEL, "Unrecognized menu item selected: " + itemId);
return super.onOptionsItemSelected(item);
if (itemId == R.id.action_event_place) {
Log.d(LOG_LABEL, "Selected event place menu item");
intent = new Intent(this, PlacesListActivity.class);
intent.putExtra(FILTER_KEY, filter);
startActivity(intent);
} else if (itemId == R.id.action_event_map) {
Log.d(LOG_LABEL, "Selected map menu item");
intent = new Intent(this, EventsMapsActivity.class);
intent.putExtra(FILTER_KEY, filter);
startActivity(intent);
} else if (itemId == R.id.action_event_search) {
Log.d(LOG_LABEL, "Selected search menu item");
super.onSearchRequested();
} else {
Log.w(LOG_LABEL, "Unrecognized menu item selected: " + itemId);
return super.onOptionsItemSelected(item);
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,21 @@ public boolean onCreateOptionsMenu(Menu menu) {
public boolean onOptionsItemSelected(MenuItem item) {
Intent intent;
int itemId = item.getItemId();
switch (itemId) {
case R.id.events_map_action_view_places:
Log.d(LOG_LABEL, "Selected map events menu item");
intent = new Intent(this, PlacesMapsActivity.class);
intent.putExtra(FILTER_KEY, filter);
startActivity(intent);
break;
case R.id.events_map_action_map_search:
Log.d(LOG_LABEL, "Selected map search menu item");
break;
case R.id.events_map_action_view_list:
Log.d(LOG_LABEL, "Selected to go back to list view from map");
intent = new Intent(this, EventsListActivity.class);
intent.putExtra(FILTER_KEY, filter);
startActivity(intent);
break;
default:
Log.w(LOG_LABEL, "Unrecognized menu item selected: " + itemId);
return super.onOptionsItemSelected(item);
if (itemId == R.id.events_map_action_view_places) {
Log.d(LOG_LABEL, "Selected map events menu item");
intent = new Intent(this, PlacesMapsActivity.class);
intent.putExtra(FILTER_KEY, filter);
startActivity(intent);
} else if (itemId == R.id.events_map_action_map_search) {
Log.d(LOG_LABEL, "Selected map search menu item");
} else if (itemId == R.id.events_map_action_view_list) {
Log.d(LOG_LABEL, "Selected to go back to list view from map");
intent = new Intent(this, EventsListActivity.class);
intent.putExtra(FILTER_KEY, filter);
startActivity(intent);
} else {
Log.w(LOG_LABEL, "Unrecognized menu item selected: " + itemId);
return super.onOptionsItemSelected(item);
}
return true;
}
Expand Down
24 changes: 10 additions & 14 deletions app/src/main/java/org/gophillygo/app/activities/HomeActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public Destination getDestinationAt(int position) {
Log.d(LOG_LABEL, "Clicked item at " + position);
Destination destination = getNearestDestination(position);
if (destination != null) {
goToPlace((long)destination.getId());
goToPlace(destination.getId());
}
});
}
Expand All @@ -153,19 +153,15 @@ public boolean onCreateOptionsMenu(Menu menu) {
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int itemId = item.getItemId();

switch (itemId) {
case R.id.action_settings:
Log.d(LOG_LABEL, "Clicked settings action");
Intent intent = new Intent(this, GpgPreferenceActivity.class);
startActivity(intent);
break;
case R.id.action_home_search:
Log.d(LOG_LABEL, "searching from home view");
break;
default:
Log.w(LOG_LABEL, "Unrecognized menu option selected: " + itemId);
return super.onOptionsItemSelected(item);
if (itemId == R.id.action_settings) {
Log.d(LOG_LABEL, "Clicked settings action");
Intent intent = new Intent(this, GpgPreferenceActivity.class);
startActivity(intent);
} else if (itemId == R.id.action_home_search) {
Log.d(LOG_LABEL, "searching from home view");
} else {
Log.w(LOG_LABEL, "Unrecognized menu option selected: " + itemId);
return super.onOptionsItemSelected(item);
}

return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,26 +163,22 @@ public boolean onCreateOptionsMenu(Menu menu) {
public boolean onOptionsItemSelected(MenuItem item) {
int itemId = item.getItemId();
Intent intent;
switch (itemId) {
case R.id.action_place_list_events:
Log.d(LOG_LABEL, "Selected events menu item");
intent = new Intent(this, EventsListActivity.class);
intent.putExtra(FILTER_KEY, filter);
startActivity(intent);
break;
case R.id.action_place_list_map:
Log.d(LOG_LABEL, "Selected map menu item");
intent = new Intent(this, PlacesMapsActivity.class);
intent.putExtra(FILTER_KEY, filter);
startActivity(intent);
break;
case R.id.action_place_list_search:
Log.d(LOG_LABEL, "Selected search menu item");
super.onSearchRequested();
break;
default:
Log.w(LOG_LABEL, "Unrecognized menu item selected: " + itemId);
return super.onOptionsItemSelected(item);
if (itemId == R.id.action_place_list_events) {
Log.d(LOG_LABEL, "Selected events menu item");
intent = new Intent(this, EventsListActivity.class);
intent.putExtra(FILTER_KEY, filter);
startActivity(intent);
} else if (itemId == R.id.action_place_list_map) {
Log.d(LOG_LABEL, "Selected map menu item");
intent = new Intent(this, PlacesMapsActivity.class);
intent.putExtra(FILTER_KEY, filter);
startActivity(intent);
} else if(itemId == R.id.action_place_list_search) {
Log.d(LOG_LABEL, "Selected search menu item");
super.onSearchRequested();
} else {
Log.w(LOG_LABEL, "Unrecognized menu item selected: " + itemId);
return super.onOptionsItemSelected(item);
}
return true;
}
Expand Down
Loading

0 comments on commit 6de2162

Please sign in to comment.