Commit bd766b59 authored by s7_reinva_p's avatar s7_reinva_p
Browse files

Made some small changes

parent c335d566
Pipeline #1246 failed with stages
......@@ -34,18 +34,10 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.github.niqdev:mjpeg-view:1.7.0'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.github.niqdev:mjpeg-view:1.7.0'
//noinspection GradleCompatible
implementation 'com.android.support:recyclerview-v7:28.0.0'
//noinspection GradleCompatible
implementation 'com.android.support:support-v4:23.4.0'
implementation "com.github.skydoves:balloon:1.1.5"
implementation "androidx.room:room-runtime:2.2.5"
annotationProcessor "androidx.room:room-compiler:2.2.5"
//noinspection GradleCompatible
implementation 'com.android.support:cardview-v7:25.0.0'
implementation 'com.android.support:appcompat-v7:25.0.0'
debugImplementation 'com.amitshekhar.android:debug-db:1.0.6'
}
......@@ -8,10 +8,10 @@
<application
android:usesCleartextTraffic="true"
android:icon="@drawable/app_freepik_icon"
android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MenuPopUp"/>
<activity android:name=".addwindows.AddTimestamp"/>
<activity android:name=".addwindows.AddCourse" />
<activity android:name=".addwindows.AddLecture" />
......
......@@ -43,7 +43,7 @@ public class CameraControlWindow extends AppCompatActivity implements CameraPosi
CameraPositionAdapter cameraPositionAdapter;
private static final int TIMEOUT = 5;
private static final int NEW_POSITION_ACTIVITY_REQUEST_CODE = 3;
CameraPositionAdapter.CameraPositionAdapterListener cameraPositionAdapterListener = this;
final CameraPositionAdapter.CameraPositionAdapterListener cameraPositionAdapterListener = this;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -143,8 +143,8 @@ public class CameraControlWindow extends AppCompatActivity implements CameraPosi
LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
View popupView = inflater.inflate(R.layout.camera_control_popup_window, null);
ImageButton editButton = (ImageButton) popupView.findViewById(R.id.cameraPositionEditButton);
ImageButton deleteButton = (ImageButton) popupView.findViewById(R.id.cameraPositionDeleteButton);
ImageButton editButton = popupView.findViewById(R.id.cameraPositionEditButton);
ImageButton deleteButton = popupView.findViewById(R.id.cameraPositionDeleteButton);
// Padod esošo kameras pozīcijas nosaukumu, pogas pozīciju un loga izsaukšanas mērķi, kā mainīgos un
// sāk jaunu aktivitāti ar mērķi iegūt rezultātu, kas izlabos esošo pozīciju (tiek izmanta tā pati pievienošanas aktivitāte)
......@@ -211,8 +211,7 @@ public class CameraControlWindow extends AppCompatActivity implements CameraPosi
@Override
protected List<CameraPosition> doInBackground(Void... voids) {
List<CameraPosition> positionList = VideoLectureDatabase.getDatabase(getApplicationContext()).cameraPositionDao().getCameraPositionListById(cameraId);
return positionList;
return VideoLectureDatabase.getDatabase(getApplicationContext()).cameraPositionDao().getCameraPositionListById(cameraId);
}
@Override
......
......@@ -28,7 +28,7 @@ public class CameraMainWindow extends AppCompatActivity implements CameraAdapter
CameraAdapter camerasAdapter;
RecyclerView recyclerView;
int roomIdNumber;
CameraAdapter.CameraAdapterListeners listener = this;
final CameraAdapter.CameraAdapterListeners listener = this;
private static final int NEW_CAMERA_ACTIVITY_REQUEST_CODE = 2;
@Override
......@@ -212,8 +212,7 @@ public class CameraMainWindow extends AppCompatActivity implements CameraAdapter
@Override
protected List<Camera> doInBackground(Void... voids) {
List<Camera> camerasList = VideoLectureDatabase.getDatabase(getApplicationContext()).cameraDao().getCameraListById(roomId);
return camerasList;
return VideoLectureDatabase.getDatabase(getApplicationContext()).cameraDao().getCameraListById(roomId);
}
@Override
......
......@@ -26,7 +26,7 @@ public class CourseWindow extends AppCompatActivity implements CourseAdapter.Cou
CourseAdapter coursesAdapter;
Intent intentBundle;
RecyclerView recyclerView;
CourseAdapter.CoursesAdapterListeners listener = this;
final CourseAdapter.CoursesAdapterListeners listener = this;
private static final int NEW_COURSE_ACTIVITY_REQUEST_CODE = 4;
@Override
......@@ -144,8 +144,7 @@ public class CourseWindow extends AppCompatActivity implements CourseAdapter.Cou
@Override
protected List<Courses> doInBackground(Void... voids) {
List<Courses> courseList = VideoLectureDatabase.getDatabase(getApplicationContext()).coursesDao().getCourseListById(roomId);
return courseList;
return VideoLectureDatabase.getDatabase(getApplicationContext()).coursesDao().getCourseListById(roomId);
}
@Override
......
......@@ -37,8 +37,7 @@ public class LecturesPlanWindow extends AppCompatActivity implements PlanAdapter
private TextView timestampNow;
private TextView timestampNext;
private TextView timerTime;
private Intent intentBundle;
private PlanAdapter.PlanAdapterListener planAdapterListener = this;
private final PlanAdapter.PlanAdapterListener planAdapterListener = this;
private PlanAdapter planAdapter;
private int timerTimestamp;
private RecyclerView recyclerView;
......@@ -69,18 +68,18 @@ public class LecturesPlanWindow extends AppCompatActivity implements PlanAdapter
recyclerView.setItemAnimator(new DefaultItemAnimator());
// Izgūst nepieciešamo mainīgo no iepriekšējā kameras loga, kurš saņēma telpas id
intentBundle = getIntent();
Intent intentBundle = getIntent();
// Izgūst tēmas (Timestamps) noteiktajai telpai no datu bāzes
getTimestamps(intentBundle.getIntExtra("roomIdNumber", 0));
// Tiek definēti teksta komponenetes, kas atrodas lekcijas plāna logā, lai ar tiem varētu manipulēt
timestampNow = (TextView) findViewById(R.id.lecturesPlanNowTimestamp);
timestampNext = (TextView) findViewById(R.id.lecturesPlanNextTimestamp);
timerTime = (TextView) findViewById(R.id.lecturesPlanTimerTime);
timestampNow = findViewById(R.id.lecturesPlanNowTimestamp);
timestampNext = findViewById(R.id.lecturesPlanNextTimestamp);
timerTime = findViewById(R.id.lecturesPlanTimerTime);
// Tiek definētas attēla pogas, kas atrodas lekcijas plāna logā, lai ar tām varētu manipulēt
ImageButton backButton = (ImageButton) findViewById(R.id.lecturesPlanBackButton);
ImageButton lectureStartButton = (ImageButton) findViewById(R.id.lecturesPlanTimerButton);
ImageButton backButton = findViewById(R.id.lecturesPlanBackButton);
ImageButton lectureStartButton = findViewById(R.id.lecturesPlanTimerButton);
// Kontrolē atpakaļ atgriešanās pogu, kas pēc nospiešanas aizver šo aktivitāti un
// atgriežas iepriekšējā aktivitātē, kas ir kameras logs
......@@ -234,8 +233,8 @@ public class LecturesPlanWindow extends AppCompatActivity implements PlanAdapter
View popupView = inflater.inflate(R.layout.activity_plan_popup_window, null);
// Tiek definētas teksta komponentes, kas atrodas uzlecošajā logā XML failā, lai ar tiem varētu manipulēt
TextView timestampsName = (TextView) popupView.findViewById(R.id.planPopupWindowTimestampName);
TextView timestampMinutes = (TextView) popupView.findViewById(R.id.planPopupWindowTimestampMinutes);
TextView timestampsName = popupView.findViewById(R.id.planPopupWindowTimestampName);
TextView timestampMinutes = popupView.findViewById(R.id.planPopupWindowTimestampMinutes);
// Piešķir nospiestās tēmas nosaukumu un minūtes uzlecošā logā teksta komponentēm
int popUpTextId = position + 1;
......@@ -262,8 +261,7 @@ public class LecturesPlanWindow extends AppCompatActivity implements PlanAdapter
@Override
protected List<Timestamps> doInBackground(Void... voids) {
List<Timestamps> timestampsList = VideoLectureDatabase.getDatabase(getApplicationContext()).timestampsDao().getTimestampsList(roomId);
return timestampsList;
return VideoLectureDatabase.getDatabase(getApplicationContext()).timestampsDao().getTimestampsList(roomId);
}
@Override
......
......@@ -27,7 +27,7 @@ public class LecturesWindow extends AppCompatActivity implements LectureAdapter.
RecyclerView recyclerView;
Intent intentBundle;
private static final int NEW_LECTURE_ACTIVITY_REQUEST_CODE = 5;
LectureAdapter.LecturesAdapterListeners lecturesAdapterListeners = this;
final LectureAdapter.LecturesAdapterListeners lecturesAdapterListeners = this;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -140,8 +140,7 @@ public class LecturesWindow extends AppCompatActivity implements LectureAdapter.
@Override
protected List<Lectures> doInBackground(Void... voids) {
List<Lectures> lectureList = VideoLectureDatabase.getDatabase(getApplicationContext()).lecturesDao().getLecturesListById(courseId);
return lectureList;
return VideoLectureDatabase.getDatabase(getApplicationContext()).lecturesDao().getLecturesListById(courseId);
}
@Override
......
......@@ -27,7 +27,7 @@ public class RoomWindow extends AppCompatActivity implements RoomAdapter.RoomsAd
ImageButton clearButton;
List<Rooms> roomsList;
RecyclerView recyclerView;
RoomAdapter.RoomsAdapterListener listener = this;
final RoomAdapter.RoomsAdapterListener listener = this;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -129,8 +129,7 @@ public class RoomWindow extends AppCompatActivity implements RoomAdapter.RoomsAd
@Override
protected List<Rooms> doInBackground(Void... voids) {
List<Rooms> roomList = VideoLectureDatabase.getDatabase(getApplicationContext()).roomsDao().getRoomsList();
return roomList;
return VideoLectureDatabase.getDatabase(getApplicationContext()).roomsDao().getRoomsList();
}
@Override
......
......@@ -25,7 +25,7 @@ public class TimestampsWindow extends AppCompatActivity implements TimestampsAda
private static final int NEW_TIMESTAMPS_ACTIVITY_REQUEST_CODE = 1;
List<Timestamps> timestampsList;
TimestampsAdapter timestampsAdapter;
TimestampsAdapter.TimestampsAdapterListeners listener = this;
final TimestampsAdapter.TimestampsAdapterListeners listener = this;
RecyclerView recyclerView;
Intent intentBundle;
......@@ -119,8 +119,7 @@ public class TimestampsWindow extends AppCompatActivity implements TimestampsAda
@Override
protected List<Timestamps> doInBackground(Void... voids) {
List<Timestamps> timestampsList = VideoLectureDatabase.getDatabase(getApplicationContext()).timestampsDao().getTimestampsList(intentBundle.getIntExtra("roomIdNumber", 0));
return timestampsList;
return VideoLectureDatabase.getDatabase(getApplicationContext()).timestampsDao().getTimestampsList(intentBundle.getIntExtra("roomIdNumber", 0));
}
@Override
......
......@@ -23,8 +23,8 @@ public class CameraAdapter extends RecyclerView.Adapter {
private static final int TIMEOUT = 5;
private static final int TYPE_ITEM = 1;
private static final int TYPE_FOOTER = 2;
private List<Camera> camerasList;
public CameraAdapterListeners onClickListener;
private final List<Camera> camerasList;
public final CameraAdapterListeners onClickListener;
private MjpegView videoStream;
// private boolean isCameraStreaming = true;
......@@ -44,7 +44,7 @@ public class CameraAdapter extends RecyclerView.Adapter {
return new CameraAdapter.ListViewHolder(view);
} else if (viewType == TYPE_FOOTER) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.listview_camera_footer, parent, false);
return new CameraAdapter.FooterViewHolder(view);
return new FooterViewHolder(view);
}
return null;
}
......@@ -118,8 +118,8 @@ public class CameraAdapter extends RecyclerView.Adapter {
}
// Tiek izveidots kameras pievienošanas pogas adaptera komponenšu turētājs, kurā glabājas pievienošanas pogas elementi
public class FooterViewHolder extends RecyclerView.ViewHolder {
ImageButton addCameraButton;
public static class FooterViewHolder extends RecyclerView.ViewHolder {
final ImageButton addCameraButton;
public FooterViewHolder(@NonNull View view) {
super(view);
......@@ -129,10 +129,10 @@ public class CameraAdapter extends RecyclerView.Adapter {
// Tiek izveidots kameras saraksta elementu adaptera komponenšu turētājs, kurā glabājas saraksta elementu elementi
public class ListViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
TextView cameraName;
MjpegView mjpegView;
ImageButton deleteListButton;
View deleteButtonBackground;
final TextView cameraName;
final MjpegView mjpegView;
final ImageButton deleteListButton;
final View deleteButtonBackground;
public ListViewHolder(@NonNull View view){
super(view);
......@@ -162,6 +162,8 @@ public class CameraAdapter extends RecyclerView.Adapter {
// Aptur kameras straumēšanu
public void stopCameraStream(){
videoStream.stopPlayback();
if(videoStream != null){
videoStream.stopPlayback();
}
}
}
......@@ -17,14 +17,14 @@ import java.util.List;
public class CameraPositionAdapter extends RecyclerView.Adapter<CameraPositionAdapter.MyViewHolder> {
public CameraPositionAdapterListener onClickListener;
private List<CameraPosition> cameraPositionList;
public final CameraPositionAdapterListener onClickListener;
private final List<CameraPosition> cameraPositionList;
// Tiek izveidots kameras pozīcijas saraksta elementu adaptera komponenšu turētājs, kurā glabājas saraksta elementu elementi
class MyViewHolder extends RecyclerView.ViewHolder{
ImageButton cameraPositionIcon;
TextView cameraPositionName;
final ImageButton cameraPositionIcon;
final TextView cameraPositionName;
MyViewHolder(View view){
super(view);
......
......@@ -18,8 +18,8 @@ public class CourseAdapter extends RecyclerView.Adapter {
private static final int TYPE_ITEM = 1;
private static final int TYPE_FOOTER= 2;
private List<Courses> coursesList;
public CoursesAdapterListeners onClickListener;
private final List<Courses> coursesList;
public final CoursesAdapterListeners onClickListener;
public CourseAdapter(List<Courses> coursesList, CoursesAdapterListeners coursesAdapterListeners){
this.coursesList = coursesList;
......@@ -37,7 +37,7 @@ public class CourseAdapter extends RecyclerView.Adapter {
return new CourseAdapter.ListViewHolder(view);
} else if (viewType == TYPE_FOOTER) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.listview_courses_footer, parent, false);
return new CourseAdapter.FooterViewHolder(view);
return new FooterViewHolder(view);
}
return null;
}
......@@ -93,8 +93,8 @@ public class CourseAdapter extends RecyclerView.Adapter {
}
// Tiek izveidots kursa pievienošanas pogas adaptera komponenšu turētājs, kurā glabājas pievienošanas pogas elementi
public class FooterViewHolder extends RecyclerView.ViewHolder {
ImageButton addCourseButton;
public static class FooterViewHolder extends RecyclerView.ViewHolder {
final ImageButton addCourseButton;
public FooterViewHolder(@NonNull View view) {
super(view);
......@@ -104,9 +104,9 @@ public class CourseAdapter extends RecyclerView.Adapter {
// Tiek izveidots kursa saraksta elementu adaptera komponenšu turētājs, kurā glabājas saraksta elementu elementi
public class ListViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{
TextView courseId;
TextView courseName;
ImageButton deleteListButton;
final TextView courseId;
final TextView courseName;
final ImageButton deleteListButton;
public ListViewHolder(@NonNull View view){
super(view);
......
......@@ -18,8 +18,8 @@ public class LectureAdapter extends RecyclerView.Adapter {
private static final int TYPE_ITEM = 1;
private static final int TYPE_FOOTER = 2;
private List<Lectures> lecturesList;
public LecturesAdapterListeners onClickListener;
private final List<Lectures> lecturesList;
public final LecturesAdapterListeners onClickListener;
public LectureAdapter(List<Lectures> lecturesList, LecturesAdapterListeners lecturesAdapterListeners){
this.lecturesList = lecturesList;
......@@ -37,7 +37,7 @@ public class LectureAdapter extends RecyclerView.Adapter {
return new LectureAdapter.ListViewHolder(view);
} else if (viewType == TYPE_FOOTER) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.listview_lectures_footer, parent, false);
return new LectureAdapter.FooterViewHolder(view);
return new FooterViewHolder(view);
}
return null;
}
......@@ -94,8 +94,8 @@ public class LectureAdapter extends RecyclerView.Adapter {
}
// Tiek izveidota lekcijas pievienošanas pogas adaptera komponenšu turētājs, kurā glabājas pievienošanas pogas elementi
public class FooterViewHolder extends RecyclerView.ViewHolder {
ImageButton addLectureButton;
public static class FooterViewHolder extends RecyclerView.ViewHolder {
final ImageButton addLectureButton;
public FooterViewHolder(@NonNull View view) {
super(view);
......@@ -105,9 +105,9 @@ public class LectureAdapter extends RecyclerView.Adapter {
// Tiek izveidots lekcijas saraksta elementu adaptera komponenšu turētājs, kurā glabājas saraksta elementu elementi
public class ListViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
TextView lectureId;
TextView lectureName;
ImageButton deleteListButton;
final TextView lectureId;
final TextView lectureName;
final ImageButton deleteListButton;
public ListViewHolder(@NonNull View view){
super(view);
......
......@@ -18,13 +18,13 @@ import java.util.List;
public class PlanAdapter extends RecyclerView.Adapter<PlanAdapter.MyViewHolder> {
private List<Timestamps> timestampsList;
public PlanAdapterListener onClickListener;
private final List<Timestamps> timestampsList;
public final PlanAdapterListener onClickListener;
// Tiek izveidots lekcijas plāna saraksta elementu adaptera komponenšu turētājs, kurā glabājas saraksta elementu elementi
class MyViewHolder extends RecyclerView.ViewHolder{
Button colorButton;
final Button colorButton;
ObjectAnimator anim = null;
MyViewHolder(View view){
super(view);
......
......@@ -18,8 +18,8 @@ public class RoomAdapter extends RecyclerView.Adapter{
private static final int TYPE_ITEM = 1;
private static final int TYPE_FOOTER= 2;
public List<Rooms> roomsList;
public RoomsAdapterListener onClickListener;
public final List<Rooms> roomsList;
public final RoomsAdapterListener onClickListener;
public RoomAdapter(List<Rooms> roomsList, RoomsAdapterListener roomsAdapterListener){
this.roomsList = roomsList;
......@@ -95,8 +95,8 @@ public class RoomAdapter extends RecyclerView.Adapter{
// Tiek izveidots telpas pievienošanas pogas adaptera komponenšu turētājs, kurā glabājas pievienošanas pogas elementi
public class FooterViewHolder extends RecyclerView.ViewHolder {
ImageButton addRoomButton;
public static class FooterViewHolder extends RecyclerView.ViewHolder {
final ImageButton addRoomButton;
public FooterViewHolder(@NonNull View view) {
super(view);
......@@ -106,9 +106,9 @@ public class RoomAdapter extends RecyclerView.Adapter{
// Tiek izveidots telpas saraksta elementu adaptera komponenšu turētājs, kurā glabājas saraksta elementu elementi
public class ListViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{
TextView roomId;
TextView roomName;
ImageButton deleteListButton;
final TextView roomId;
final TextView roomName;
final ImageButton deleteListButton;
public ListViewHolder(@NonNull View view){
super(view);
......
......@@ -18,8 +18,8 @@ public class TimestampsAdapter extends RecyclerView.Adapter {
private static final int TYPE_ITEM = 1;
private static final int TYPE_FOOTER = 2;
private List<Timestamps> timestampsList;
public TimestampsAdapterListeners onClickListener;
private final List<Timestamps> timestampsList;
public final TimestampsAdapterListeners onClickListener;
public TimestampsAdapter(List<Timestamps> timestampsList, TimestampsAdapterListeners timestampsAdapterListeners){
this.timestampsList = timestampsList;
......@@ -38,7 +38,7 @@ public class TimestampsAdapter extends RecyclerView.Adapter {
return new TimestampsAdapter.ListViewHolder(view);
} else if (viewType == TYPE_FOOTER) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.listview_timestamps_footer, parent, false);
return new TimestampsAdapter.FooterViewHolder(view);
return new FooterViewHolder(view);
}
return null;
}
......@@ -82,8 +82,8 @@ public class TimestampsAdapter extends RecyclerView.Adapter {
}
// Tiek izveidots timestamps pievienošanas pogas adaptera komponenšu turētājs, kurā glabājas pievienošanas pogas elementi
public class FooterViewHolder extends RecyclerView.ViewHolder {
ImageButton addTimestampsButton;
public static class FooterViewHolder extends RecyclerView.ViewHolder {
final ImageButton addTimestampsButton;
public FooterViewHolder(@NonNull View view) {
super(view);
......@@ -93,9 +93,9 @@ public class TimestampsAdapter extends RecyclerView.Adapter {
// Tiek izveidots timestamps saraksta elementu adaptera komponenšu turētājs, kurā glabājas saraksta elementu elementi
public class ListViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
TextView timestampsId;
TextView timestampsName;
TextView timestampsMinutes;
final TextView timestampsId;
final TextView timestampsName;
final TextView timestampsMinutes;
public ListViewHolder(@NonNull View view){
super(view);
......
......@@ -17,8 +17,6 @@ import com.example.videolecturecapture.R;
public class AddCamera extends AppCompatActivity implements View.OnClickListener{
private Intent resultIntent;
@Override
protected void onCreate(Bundle savedInstanceState) {
// Aktivitātes logam padara statusa joslas fonu neredzamu
......@@ -78,7 +76,7 @@ public class AddCamera extends AppCompatActivity implements View.OnClickListener
tempCameraLink = cameraLink;
}
resultIntent = new Intent();
Intent resultIntent = new Intent();
resultIntent.putExtra("cameraName", cameraName);
resultIntent.putExtra("cameraUsername", cameraUsername);
resultIntent.putExtra("cameraPassword", cameraPassword);
......
......@@ -17,7 +17,6 @@ import com.example.videolecturecapture.R;
public class AddCameraPosition extends AppCompatActivity implements View.OnClickListener {
private Intent resultIntent;
private EditText positionNameEditText;
String windowType;
int cameraPosition;
......@@ -75,7 +74,7 @@ public class AddCameraPosition extends AppCompatActivity implements View.OnClick
if (positionName.matches("")) {
Toast.makeText(AddCameraPosition.this, "You did not enter position name", Toast.LENGTH_SHORT).show();
} else {
resultIntent = new Intent();
Intent resultIntent = new Intent();
resultIntent.putExtra("cameraPositionName", positionName);
if(windowType.equals("Add")){
......
......@@ -17,8 +17,6 @@ import com.example.videolecturecapture.R;
public class AddRoomActivity extends AppCompatActivity implements View.OnClickListener {
private Intent resultIntent;
@Override
protected void onCreate(Bundle savedInstanceState) {
// Aktivitātes logam padara statusa joslas fonu neredzamu
......@@ -58,7 +56,7 @@ public class AddRoomActivity extends AppCompatActivity implements View.OnClickLi
if (roomName.matches("")) {
Toast.makeText(AddRoomActivity.this, "You did not enter room name", Toast.LENGTH_SHORT).show();
} else {
resultIntent = new Intent();
Intent resultIntent = new Intent();
resultIntent.putExtra("roomAdded", roomName);
setResult(RESULT_OK, resultIntent);
finish();
......
......@@ -37,7 +37,7 @@ public class AddTimestamp extends AppCompatActivity {
List<Lectures> lecturesList;
String bundleWindowTitle;
private Intent resultIntent;
Context windowContext = this;
final Context windowContext = this;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -174,8 +174,7 @@ public class AddTimestamp extends AppCompatActivity {
@Override
protected List<Courses> doInBackground(Void... voids) {
List<Courses> courseList = VideoLectureDatabase.getDatabase(getApplicationContext()).coursesDao().getCourseListById(roomId);
return courseList;
return VideoLectureDatabase.getDatabase(getApplicationContext()).coursesDao().getCourseListById(roomId);
}
@Override
......@@ -203,8 +202,7 @@ public class AddTimestamp extends AppCompatActivity {
@Override
protected List<Lectures> doInBackground(Void... voids) {
List<Lectures> lectureList = VideoLectureDatabase.getDatabase(getApplicationContext()).lecturesDao().getLecturesListById(courseId);
return lectureList;
return VideoLectureDatabase.getDatabase(getApplicationContext()).lecturesDao().getLecturesListById(courseId);
}
@Override
......
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