Skip to content

Commit

Permalink
reorganized files
Browse files Browse the repository at this point in the history
  • Loading branch information
vavali08 committed Oct 27, 2024
1 parent f4bf2aa commit 69afdac
Show file tree
Hide file tree
Showing 177 changed files with 524 additions and 405 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
android:resource="@array/preloaded_fonts" />

<receiver
android:name="com.pennapps.labs.pennmobile.LaundryBroadcastReceiver"
android:name="com.pennapps.labs.pennmobile.laundry.LaundryBroadcastReceiver"
android:enabled="true"
android:exported="true" /> <!-- receiver for laundry -->
<uses-library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
android:resource="@array/preloaded_fonts" />

<receiver
android:name="com.pennapps.labs.pennmobile.LaundryBroadcastReceiver"
android:name="com.pennapps.labs.pennmobile.laundry.LaundryBroadcastReceiver"
android:enabled="true"
android:exported="true" /> <!-- receiver for laundry -->
<uses-library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
65
66 <receiver
66-->/Users/lumumba/Desktop/penn-mobile-android/PennMobile/src/main/AndroidManifest.xml:39:7-42:39
67 android:name="com.pennapps.labs.pennmobile.LaundryBroadcastReceiver"
67 android:name="com.pennapps.labs.pennmobile.laundry.LaundryBroadcastReceiver"
67-->/Users/lumumba/Desktop/penn-mobile-android/PennMobile/src/main/AndroidManifest.xml:40:13-53
68 android:enabled="true"
68-->/Users/lumumba/Desktop/penn-mobile-android/PennMobile/src/main/AndroidManifest.xml:41:13-35
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
android:resource="@array/preloaded_fonts" />

<receiver
android:name="com.pennapps.labs.pennmobile.LaundryBroadcastReceiver"
android:name="com.pennapps.labs.pennmobile.laundry.LaundryBroadcastReceiver"
android:enabled="true"
android:exported="true" /> <!-- receiver for laundry -->
<uses-library
Expand Down
6 changes: 3 additions & 3 deletions PennMobile/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:usesCleartextTraffic="true"
tools:targetApi="m">
<receiver
android:name="com.pennapps.labs.pennmobile.DiningHallWidget"
android:name="com.pennapps.labs.pennmobile.dining.widget.DiningHallWidget"
android:exported="false">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
Expand All @@ -53,7 +53,7 @@
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
<service android:name=".adapters.DiningHallWidgetAdapter"
<service android:name=".dining.widget.DiningHallWidgetAdapter"
android:permission="android.permission.BIND_REMOTEVIEWS" />

<meta-data
Expand All @@ -67,7 +67,7 @@
android:resource="@array/preloaded_fonts" />

<receiver
android:name=".LaundryBroadcastReceiver"
android:name=".laundry.LaundryBroadcastReceiver"
android:enabled="true"
android:exported="true" /> <!-- receiver for laundry -->
<uses-library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,24 @@ import com.google.android.material.tabs.TabLayout
import com.google.firebase.analytics.FirebaseAnalytics
import com.google.gson.GsonBuilder
import com.google.gson.reflect.TypeToken
import com.pennapps.labs.pennmobile.adapters.MainPagerAdapter
import com.pennapps.labs.pennmobile.api.CampusExpress
import com.pennapps.labs.pennmobile.api.OAuth2NetworkManager
import com.pennapps.labs.pennmobile.api.Platform
import com.pennapps.labs.pennmobile.api.Serializer
import com.pennapps.labs.pennmobile.api.StudentLife
import com.pennapps.labs.pennmobile.classes.Account
import com.pennapps.labs.pennmobile.classes.Contact
import com.pennapps.labs.pennmobile.classes.DiningHall
import com.pennapps.labs.pennmobile.classes.FlingEvent
import com.pennapps.labs.pennmobile.classes.GSRLocation
import com.pennapps.labs.pennmobile.classes.GSRReservation
import com.pennapps.labs.pennmobile.classes.LaundryRoom
import com.pennapps.labs.pennmobile.classes.Post
import com.pennapps.labs.pennmobile.classes.Venue
import com.pennapps.labs.pennmobile.api.classes.Account
import com.pennapps.labs.pennmobile.api.fragments.LoginFragment
import com.pennapps.labs.pennmobile.more.classes.Contact
import com.pennapps.labs.pennmobile.dining.classes.DiningHall
import com.pennapps.labs.pennmobile.fling.classes.FlingEvent
import com.pennapps.labs.pennmobile.gsr.classes.GSRLocation
import com.pennapps.labs.pennmobile.gsr.classes.GSRReservation
import com.pennapps.labs.pennmobile.laundry.classes.LaundryRoom
import com.pennapps.labs.pennmobile.home.classes.Post
import com.pennapps.labs.pennmobile.dining.classes.Venue
import com.pennapps.labs.pennmobile.components.sneaker.Sneaker
import com.pennapps.labs.pennmobile.databinding.ActivityMainBinding
import com.pennapps.labs.pennmobile.more.fragments.SaveContactsFragment
import com.pennapps.labs.pennmobile.utils.Utils
import eightbitlab.com.blurview.BlurView
import kotlinx.coroutines.sync.Mutex
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.pennapps.labs.pennmobile.adapters
package com.pennapps.labs.pennmobile

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.lifecycle.Lifecycle
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.pennapps.labs.pennmobile.DiningHolderFragment
import com.pennapps.labs.pennmobile.GsrTabbedFragment
import com.pennapps.labs.pennmobile.HomeFragment
import com.pennapps.labs.pennmobile.LaundryFragment
import com.pennapps.labs.pennmobile.morefragments.MoreFragment
import com.pennapps.labs.pennmobile.dining.fragments.DiningHolderFragment
import com.pennapps.labs.pennmobile.gsr.fragments.GsrTabbedFragment
import com.pennapps.labs.pennmobile.home.fragments.HomeFragment
import com.pennapps.labs.pennmobile.laundry.fragments.LaundryFragment
import com.pennapps.labs.pennmobile.more.fragments.MoreFragment

class MainPagerAdapter(
fragmentManager: FragmentManager,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.pennapps.labs.pennmobile.api

import com.pennapps.labs.pennmobile.classes.CampusExpressAccessTokenResponse
import com.pennapps.labs.pennmobile.classes.DiningBalances
import com.pennapps.labs.pennmobile.classes.DiningBalancesList
import com.pennapps.labs.pennmobile.api.classes.CampusExpressAccessTokenResponse
import com.pennapps.labs.pennmobile.dining.classes.DiningBalances
import com.pennapps.labs.pennmobile.dining.classes.DiningBalancesList
import retrofit.Callback
import retrofit.http.GET
import retrofit.http.Header
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.pennapps.labs.pennmobile.api;

import com.pennapps.labs.pennmobile.classes.Venue;
import com.pennapps.labs.pennmobile.dining.classes.Venue;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.pennapps.labs.pennmobile
package com.pennapps.labs.pennmobile.api

import android.os.Bundle
import android.util.Log
Expand All @@ -12,9 +12,11 @@ import android.widget.Toast
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentTransaction
import androidx.preference.PreferenceManager
import com.pennapps.labs.pennmobile.api.StudentLife
import com.pennapps.labs.pennmobile.classes.GSRBookingResult
import com.pennapps.labs.pennmobile.MainActivity
import com.pennapps.labs.pennmobile.R
import com.pennapps.labs.pennmobile.gsr.classes.GSRBookingResult
import com.pennapps.labs.pennmobile.databinding.FragmentHuntsmanGsrloginBinding
import com.pennapps.labs.pennmobile.gsr.fragments.GsrTabbedFragment
import retrofit.Callback
import retrofit.RetrofitError
import retrofit.client.Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import com.google.firebase.crashlytics.FirebaseCrashlytics
import com.pennapps.labs.pennmobile.BuildConfig
import com.pennapps.labs.pennmobile.MainActivity
import com.pennapps.labs.pennmobile.R
import com.pennapps.labs.pennmobile.classes.AccessTokenResponse
import com.pennapps.labs.pennmobile.api.classes.AccessTokenResponse
import kotlinx.coroutines.launch
import retrofit.Callback
import retrofit.RetrofitError
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.pennapps.labs.pennmobile.api

import com.pennapps.labs.pennmobile.classes.Course
import com.pennapps.labs.pennmobile.classes.PCARegistrationBody
import com.pennapps.labs.pennmobile.classes.PennCourseAlertRegistration
import com.pennapps.labs.pennmobile.classes.PennCourseAlertUpdateBody
import com.pennapps.labs.pennmobile.classes.Profile
import com.pennapps.labs.pennmobile.classes.Section
import com.pennapps.labs.pennmobile.classes.UserInfo
import com.pennapps.labs.pennmobile.coursealert.classes.Course
import com.pennapps.labs.pennmobile.coursealert.classes.PCARegistrationBody
import com.pennapps.labs.pennmobile.coursealert.classes.PennCourseAlertRegistration
import com.pennapps.labs.pennmobile.coursealert.classes.PennCourseAlertUpdateBody
import com.pennapps.labs.pennmobile.coursealert.classes.Profile
import com.pennapps.labs.pennmobile.coursealert.classes.Section
import com.pennapps.labs.pennmobile.coursealert.classes.UserInfo
import okhttp3.OkHttpClient
import retrofit2.Call
import retrofit2.Retrofit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.pennapps.labs.pennmobile.api;

import com.pennapps.labs.pennmobile.classes.AccessTokenResponse;
import com.pennapps.labs.pennmobile.classes.GetUserResponse;
import com.pennapps.labs.pennmobile.api.classes.GetUserResponse;

import retrofit.Callback;
import retrofit.http.Field;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.reflect.TypeToken;
import com.pennapps.labs.pennmobile.classes.Account;
import com.pennapps.labs.pennmobile.classes.DiningHall;
import com.pennapps.labs.pennmobile.classes.FlingEvent;
import com.pennapps.labs.pennmobile.classes.GSRLocation;
import com.pennapps.labs.pennmobile.classes.GSRReservation;
import com.pennapps.labs.pennmobile.classes.LaundryRoom;
import com.pennapps.labs.pennmobile.classes.Post;
import com.pennapps.labs.pennmobile.classes.Venue;
import com.pennapps.labs.pennmobile.classes.VenueInterval;
import com.pennapps.labs.pennmobile.api.classes.Account;
import com.pennapps.labs.pennmobile.dining.classes.DiningHall;
import com.pennapps.labs.pennmobile.fling.classes.FlingEvent;
import com.pennapps.labs.pennmobile.gsr.classes.GSRLocation;
import com.pennapps.labs.pennmobile.gsr.classes.GSRReservation;
import com.pennapps.labs.pennmobile.laundry.classes.LaundryRoom;
import com.pennapps.labs.pennmobile.home.classes.Post;
import com.pennapps.labs.pennmobile.dining.classes.Venue;
import com.pennapps.labs.pennmobile.dining.classes.VenueInterval;

import java.lang.reflect.Type;
import java.text.Format;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
package com.pennapps.labs.pennmobile.api;

import com.pennapps.labs.pennmobile.classes.AccessTokenResponse;
import com.pennapps.labs.pennmobile.classes.Account;
import com.pennapps.labs.pennmobile.classes.Article;
import com.pennapps.labs.pennmobile.classes.CalendarEvent;
import com.pennapps.labs.pennmobile.classes.DiningHall;
import com.pennapps.labs.pennmobile.classes.DiningPreferences;
import com.pennapps.labs.pennmobile.classes.DiningRequest;
import com.pennapps.labs.pennmobile.classes.FitnessRequest;
import com.pennapps.labs.pennmobile.classes.FitnessRoom;
import com.pennapps.labs.pennmobile.classes.FitnessRoomUsage;
import com.pennapps.labs.pennmobile.classes.FlingEvent;
import com.pennapps.labs.pennmobile.classes.GSR;
import com.pennapps.labs.pennmobile.classes.GSRBookingResult;
import com.pennapps.labs.pennmobile.classes.GSRLocation;
import com.pennapps.labs.pennmobile.classes.GSRReservation;
import com.pennapps.labs.pennmobile.classes.LaundryRoom;
import com.pennapps.labs.pennmobile.classes.Poll;
import com.pennapps.labs.pennmobile.classes.Post;
import com.pennapps.labs.pennmobile.classes.SaveAccountResponse;
import com.pennapps.labs.pennmobile.classes.Venue;
import com.pennapps.labs.pennmobile.classes.WhartonStatus;
import com.pennapps.labs.pennmobile.api.classes.AccessTokenResponse;
import com.pennapps.labs.pennmobile.api.classes.Account;
import com.pennapps.labs.pennmobile.home.classes.Article;
import com.pennapps.labs.pennmobile.home.classes.CalendarEvent;
import com.pennapps.labs.pennmobile.dining.classes.DiningHall;
import com.pennapps.labs.pennmobile.dining.classes.DiningPreferences;
import com.pennapps.labs.pennmobile.dining.classes.DiningRequest;
import com.pennapps.labs.pennmobile.fitness.classes.FitnessRequest;
import com.pennapps.labs.pennmobile.fitness.classes.FitnessRoom;
import com.pennapps.labs.pennmobile.fitness.classes.FitnessRoomUsage;
import com.pennapps.labs.pennmobile.fling.classes.FlingEvent;
import com.pennapps.labs.pennmobile.gsr.classes.GSR;
import com.pennapps.labs.pennmobile.gsr.classes.GSRBookingResult;
import com.pennapps.labs.pennmobile.gsr.classes.GSRLocation;
import com.pennapps.labs.pennmobile.gsr.classes.GSRReservation;
import com.pennapps.labs.pennmobile.laundry.classes.LaundryRoom;
import com.pennapps.labs.pennmobile.home.classes.Poll;
import com.pennapps.labs.pennmobile.home.classes.Post;
import com.pennapps.labs.pennmobile.api.classes.SaveAccountResponse;
import com.pennapps.labs.pennmobile.dining.classes.Venue;
import com.pennapps.labs.pennmobile.gsr.classes.WhartonStatus;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import com.pennapps.labs.pennmobile.classes.LaundryPreferences
import com.pennapps.labs.pennmobile.classes.LaundryRequest
import com.pennapps.labs.pennmobile.classes.LaundryRoom
import com.pennapps.labs.pennmobile.classes.LaundryRoomSimple
import com.pennapps.labs.pennmobile.classes.LaundryUsage
import com.pennapps.labs.pennmobile.laundry.classes.LaundryPreferences
import com.pennapps.labs.pennmobile.laundry.classes.LaundryRequest
import com.pennapps.labs.pennmobile.laundry.classes.LaundryRoom
import com.pennapps.labs.pennmobile.laundry.classes.LaundryRoomSimple
import com.pennapps.labs.pennmobile.laundry.classes.LaundryUsage
import okhttp3.ResponseBody
import retrofit2.Response
import retrofit2.http.Body
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.pennapps.labs.pennmobile.classes
package com.pennapps.labs.pennmobile.api.classes

import com.google.gson.annotations.Expose
import com.google.gson.annotations.SerializedName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.pennapps.labs.pennmobile.classes
package com.pennapps.labs.pennmobile.api.classes

class Account(
firstName: String?,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.pennapps.labs.pennmobile.classes
package com.pennapps.labs.pennmobile.api.classes

import com.google.gson.annotations.Expose
import com.google.gson.annotations.SerializedName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.pennapps.labs.pennmobile.classes
package com.pennapps.labs.pennmobile.api.classes

import com.google.gson.annotations.Expose
import com.google.gson.annotations.SerializedName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.pennapps.labs.pennmobile.classes
package com.pennapps.labs.pennmobile.api.classes

import com.google.gson.annotations.Expose
import com.google.gson.annotations.SerializedName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.pennapps.labs.pennmobile.classes
package com.pennapps.labs.pennmobile.api.classes

import com.google.gson.annotations.Expose
import com.google.gson.annotations.SerializedName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.pennapps.labs.pennmobile
package com.pennapps.labs.pennmobile.api.fragments

import android.content.SharedPreferences
import android.net.Uri
Expand All @@ -17,9 +17,12 @@ import android.widget.Toast
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentTransaction
import androidx.preference.PreferenceManager
import com.pennapps.labs.pennmobile.MainActivity
import com.pennapps.labs.pennmobile.R
import com.pennapps.labs.pennmobile.api.CampusExpress
import com.pennapps.labs.pennmobile.classes.Account
import com.pennapps.labs.pennmobile.classes.CampusExpressAccessTokenResponse
import com.pennapps.labs.pennmobile.api.classes.Account
import com.pennapps.labs.pennmobile.api.classes.CampusExpressAccessTokenResponse
import com.pennapps.labs.pennmobile.dining.fragments.DiningInsightsFragment
import org.apache.commons.lang3.RandomStringUtils
import retrofit.Callback
import retrofit.RetrofitError
Expand All @@ -28,11 +31,6 @@ import java.security.MessageDigest
import java.util.Base64
import java.util.Date

// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"

/**
* A simple [Fragment] subclass.
* Use the [CampusExpressLoginFragment.newInstance] factory method to
Expand Down Expand Up @@ -84,8 +82,7 @@ class CampusExpressLoginFragment : Fragment() {
headerLayout = view.findViewById(R.id.linear_layout)
cancelButton = view.findViewById(R.id.cancel_button)
val uri =
Uri
.parse(campusExpressAuthUrl)
Uri.parse(campusExpressAuthUrl)
.buildUpon()
.appendQueryParameter("response_type", "code")
.appendQueryParameter("client_id", clientID)
Expand Down Expand Up @@ -177,7 +174,11 @@ class CampusExpressLoginFragment : Fragment() {

override fun failure(error: RetrofitError) {
Log.e("Campus Webview", "Error fetching access token $error")
Toast.makeText(context, "Error getting campus express authorization", Toast.LENGTH_SHORT).show()
Toast.makeText(
context,
"Error getting campus express authorization",
Toast.LENGTH_SHORT
).show()
goToDiningInsights(false)
}
},
Expand Down Expand Up @@ -211,4 +212,4 @@ class CampusExpressLoginFragment : Fragment() {

return stateString
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.pennapps.labs.pennmobile
package com.pennapps.labs.pennmobile.api.fragments

import android.os.Bundle
import android.view.LayoutInflater
Expand All @@ -12,6 +12,8 @@ import com.bumptech.glide.load.DataSource
import com.bumptech.glide.load.engine.GlideException
import com.bumptech.glide.load.resource.gif.GifDrawable
import com.bumptech.glide.request.RequestListener
import com.pennapps.labs.pennmobile.MainActivity
import com.pennapps.labs.pennmobile.R
import com.pennapps.labs.pennmobile.databinding.FragmentLoginBinding

class LoginFragment : Fragment() {
Expand Down
Loading

0 comments on commit 69afdac

Please sign in to comment.