Rename ApplicationActivity -> LaunchActivity

Don’t want to lose app shortcut (who knew about it)
This commit is contained in:
DrKLO 2014-03-05 00:04:57 +04:00
parent ba726700a1
commit 2518d0e91f
24 changed files with 119 additions and 119 deletions

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.telegram.messenger" package="org.telegram.messenger"
android:versionCode="181" android:versionCode="182"
android:versionName="1.3.26"> android:versionName="1.3.26">
<supports-screens android:anyDensity="true" <supports-screens android:anyDensity="true"
@ -71,25 +71,7 @@
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<activity <activity
android:name="org.telegram.ui.LoginActivity" android:name="org.telegram.ui.LaunchActivity"
android:windowSoftInputMode="adjustResize"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait">
</activity>
<activity
android:name="org.telegram.ui.CountrySelectActivity"
android:windowSoftInputMode="adjustResize"
android:theme="@style/Theme.TMessages"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait">
</activity>
<activity
android:name="org.telegram.ui.IntroActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait">
</activity>
<activity
android:name="org.telegram.ui.ApplicationActivity"
android:windowSoftInputMode="adjustResize" android:windowSoftInputMode="adjustResize"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:launchMode="singleTask" android:launchMode="singleTask"
@ -134,6 +116,24 @@
<data android:mimeType="vnd.android.cursor.item/vnd.org.telegram.messenger.android.profile"/> <data android:mimeType="vnd.android.cursor.item/vnd.org.telegram.messenger.android.profile"/>
</intent-filter> </intent-filter>
</activity> </activity>
<activity
android:name="org.telegram.ui.LoginActivity"
android:windowSoftInputMode="adjustResize"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait">
</activity>
<activity
android:name="org.telegram.ui.CountrySelectActivity"
android:windowSoftInputMode="adjustResize"
android:theme="@style/Theme.TMessages"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait">
</activity>
<activity
android:name="org.telegram.ui.IntroActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait">
</activity>
<activity <activity
android:name="org.telegram.ui.GalleryImageViewer" android:name="org.telegram.ui.GalleryImageViewer"
android:theme="@style/Theme.TMessages.Gallery" android:theme="@style/Theme.TMessages.Gallery"

View file

@ -34,7 +34,7 @@ import android.util.SparseArray;
import org.telegram.objects.MessageObject; import org.telegram.objects.MessageObject;
import org.telegram.objects.PhotoObject; import org.telegram.objects.PhotoObject;
import org.telegram.ui.ApplicationActivity; import org.telegram.ui.LaunchActivity;
import org.telegram.ui.ApplicationLoader; import org.telegram.ui.ApplicationLoader;
import java.io.File; import java.io.File;
@ -4188,7 +4188,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
String chatSoundPath = null; String chatSoundPath = null;
NotificationManager mNotificationManager = (NotificationManager)ApplicationLoader.applicationContext.getSystemService(Context.NOTIFICATION_SERVICE); NotificationManager mNotificationManager = (NotificationManager)ApplicationLoader.applicationContext.getSystemService(Context.NOTIFICATION_SERVICE);
Intent intent = new Intent(ApplicationLoader.applicationContext, ApplicationActivity.class); Intent intent = new Intent(ApplicationLoader.applicationContext, LaunchActivity.class);
String msg = null; String msg = null;
if ((int)dialog_id != 0) { if ((int)dialog_id != 0) {

View file

@ -242,7 +242,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
args.putBoolean("serverOnly", true); args.putBoolean("serverOnly", true);
fragment.setArguments(args); fragment.setArguments(args);
fragment.delegate = ChatActivity.this; fragment.delegate = ChatActivity.this;
((ApplicationActivity)parentActivity).presentFragment(fragment, "select_chat", false); ((LaunchActivity)parentActivity).presentFragment(fragment, "select_chat", false);
break; break;
} }
} }
@ -2056,7 +2056,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putInt("user_id", currentUser.id); args.putInt("user_id", currentUser.id);
fragment.setArguments(args); fragment.setArguments(args);
((ApplicationActivity)parentActivity).presentFragment(fragment, "add_contact_" + currentUser.id, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "add_contact_" + currentUser.id, false);
} }
}); });
} }
@ -2175,7 +2175,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
actionBar.setDisplayShowCustomEnabled(false); actionBar.setDisplayShowCustomEnabled(false);
actionBar.setCustomView(null); actionBar.setCustomView(null);
updateSubtitle(); updateSubtitle();
((ApplicationActivity)parentActivity).fixBackButton(); ((LaunchActivity)parentActivity).fixBackButton();
} }
@Override @Override
@ -2214,8 +2214,8 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
if (getActivity() == null) { if (getActivity() == null) {
return; return;
} }
((ApplicationActivity)parentActivity).showActionBar(); ((LaunchActivity)parentActivity).showActionBar();
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
fixLayout(); fixLayout();
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE); SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
String lastMessageText = preferences.getString("dialog_" + dialog_id, null); String lastMessageText = preferences.getString("dialog_" + dialog_id, null);
@ -2380,7 +2380,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
args.putLong("dialog_id", dialog_id); args.putLong("dialog_id", dialog_id);
} }
fragment.setArguments(args); fragment.setArguments(args);
((ApplicationActivity) parentActivity).presentFragment(fragment, "user_" + currentUser.id, swipeOpening); ((LaunchActivity) parentActivity).presentFragment(fragment, "user_" + currentUser.id, swipeOpening);
} else if (currentChat != null) { } else if (currentChat != null) {
if (info != null) { if (info != null) {
if (info instanceof TLRPC.TL_chatParticipantsForbidden) { if (info instanceof TLRPC.TL_chatParticipantsForbidden) {
@ -2395,7 +2395,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putInt("chat_id", currentChat.id); args.putInt("chat_id", currentChat.id);
fragment.setArguments(args); fragment.setArguments(args);
((ApplicationActivity) parentActivity).presentFragment(fragment, "chat_" + currentChat.id, swipeOpening); ((LaunchActivity) parentActivity).presentFragment(fragment, "chat_" + currentChat.id, swipeOpening);
} }
} }
}); });
@ -2614,7 +2614,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
args.putBoolean("serverOnly", true); args.putBoolean("serverOnly", true);
fragment.setArguments(args); fragment.setArguments(args);
fragment.delegate = this; fragment.delegate = this;
((ApplicationActivity)parentActivity).presentFragment(fragment, "select_chat", false); ((LaunchActivity)parentActivity).presentFragment(fragment, "select_chat", false);
} }
} else if (option == 3) { } else if (option == 3) {
if (selectedObject != null) { if (selectedObject != null) {
@ -2677,14 +2677,14 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
fragment.scrollToTopOnResume = true; fragment.scrollToTopOnResume = true;
ActionBarActivity act = (ActionBarActivity)getActivity(); ActionBarActivity act = (ActionBarActivity)getActivity();
if (inflaterActivity != null) { if (inflaterActivity != null) {
((ApplicationActivity)inflaterActivity).presentFragment(fragment, "chat" + Math.random(), false); ((LaunchActivity)inflaterActivity).presentFragment(fragment, "chat" + Math.random(), false);
} }
} else if (lower_part < 0) { } else if (lower_part < 0) {
bundle.putInt("chat_id", -lower_part); bundle.putInt("chat_id", -lower_part);
fragment.setArguments(bundle); fragment.setArguments(bundle);
fragment.scrollToTopOnResume = true; fragment.scrollToTopOnResume = true;
if (inflaterActivity != null) { if (inflaterActivity != null) {
((ApplicationActivity)inflaterActivity).presentFragment(fragment, "chat" + Math.random(), false); ((LaunchActivity)inflaterActivity).presentFragment(fragment, "chat" + Math.random(), false);
} }
} }
removeSelfFromStack(); removeSelfFromStack();
@ -2800,13 +2800,13 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
return true; return true;
} }
LocationActivity fragment = new LocationActivity(); LocationActivity fragment = new LocationActivity();
((ApplicationActivity)parentActivity).presentFragment(fragment, "location", false); ((LaunchActivity)parentActivity).presentFragment(fragment, "location", false);
break; break;
} }
case R.id.attach_document: { case R.id.attach_document: {
DocumentSelectActivity fragment = new DocumentSelectActivity(); DocumentSelectActivity fragment = new DocumentSelectActivity();
fragment.delegate = this; fragment.delegate = this;
((ApplicationActivity)parentActivity).presentFragment(fragment, "document", false); ((LaunchActivity)parentActivity).presentFragment(fragment, "document", false);
break; break;
} }
} }
@ -3097,7 +3097,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putInt("user_id", user.id); args.putInt("user_id", user.id);
fragment.setArguments(args); fragment.setArguments(args);
((ApplicationActivity)parentActivity).presentFragment(fragment, "user_" + user.id, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "user_" + user.id, false);
} }
} }
}; };
@ -3699,7 +3699,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
args.putInt("user_id", message.messageOwner.media.user_id); args.putInt("user_id", message.messageOwner.media.user_id);
args.putString("phone", message.messageOwner.media.phone_number); args.putString("phone", message.messageOwner.media.phone_number);
fragment.setArguments(args); fragment.setArguments(args);
((ApplicationActivity)parentActivity).presentFragment(fragment, "add_contact_" + message.messageOwner.media.user_id, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "add_contact_" + message.messageOwner.media.user_id, false);
} }
}); });
@ -3728,7 +3728,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putInt("user_id", message.messageOwner.media.user_id); args.putInt("user_id", message.messageOwner.media.user_id);
fragment.setArguments(args); fragment.setArguments(args);
((ApplicationActivity)parentActivity).presentFragment(fragment, "user_" + message.messageOwner.media.user_id, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "user_" + message.messageOwner.media.user_id, false);
} }
} }
} }
@ -3753,7 +3753,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putInt("user_id", message.messageOwner.media.audio.user_id); args.putInt("user_id", message.messageOwner.media.audio.user_id);
fragment.setArguments(args); fragment.setArguments(args);
((ApplicationActivity)parentActivity).presentFragment(fragment, "user_" + message.messageOwner.media.audio.user_id, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "user_" + message.messageOwner.media.audio.user_id, false);
} }
} }
} }
@ -3782,7 +3782,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putInt("user_id", message.messageOwner.from_id); args.putInt("user_id", message.messageOwner.from_id);
fragment.setArguments(args); fragment.setArguments(args);
((ApplicationActivity)parentActivity).presentFragment(fragment, "user_" + message.messageOwner.from_id, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "user_" + message.messageOwner.from_id, false);
} }
} }
}); });
@ -3883,7 +3883,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
} }
NotificationCenter.Instance.addToMemCache(0, message); NotificationCenter.Instance.addToMemCache(0, message);
LocationActivity fragment = new LocationActivity(); LocationActivity fragment = new LocationActivity();
((ApplicationActivity)parentActivity).presentFragment(fragment, "location_view", false); ((LaunchActivity)parentActivity).presentFragment(fragment, "location_view", false);
} else if (message.type == 2 || message.type == 3) { } else if (message.type == 2 || message.type == 3) {
if (photoFile == null || photoObjectToSet == null || photoFile != null && photoFile.exists()) { if (photoFile == null || photoObjectToSet == null || photoFile != null && photoFile.exists()) {
NotificationCenter.Instance.addToMemCache(51, message); NotificationCenter.Instance.addToMemCache(51, message);

View file

@ -194,7 +194,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putLong("dialog_id", -chat_id); bundle.putLong("dialog_id", -chat_id);
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "media_chat_" + chat_id, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "media_chat_" + chat_id, false);
} else { } else {
int size = 0; int size = 0;
if (info != null) { if (info != null) {
@ -209,7 +209,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putInt("user_id", user_id); args.putInt("user_id", user_id);
fragment.setArguments(args); fragment.setArguments(args);
((ApplicationActivity)parentActivity).presentFragment(fragment, "user_" + user_id, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "user_" + user_id, false);
} else { } else {
if (size + 7 == i) { if (size + 7 == i) {
if (info.participants.size() < 200) { if (info.participants.size() < 200) {
@ -332,7 +332,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
title.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0); title.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
title.setCompoundDrawablePadding(0); title.setCompoundDrawablePadding(0);
} }
((ApplicationActivity)parentActivity).fixBackButton(); ((LaunchActivity)parentActivity).fixBackButton();
} }
@Override @Override
@ -344,8 +344,8 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
if (listViewAdapter != null) { if (listViewAdapter != null) {
listViewAdapter.notifyDataSetChanged(); listViewAdapter.notifyDataSetChanged();
} }
((ApplicationActivity)parentActivity).showActionBar(); ((LaunchActivity)parentActivity).showActionBar();
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
} }
@Override @Override
@ -457,7 +457,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
NotificationCenter.Instance.addToMemCache(7, users); NotificationCenter.Instance.addToMemCache(7, users);
} }
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "contacts_block", false); ((LaunchActivity)parentActivity).presentFragment(fragment, "contacts_block", false);
} }
private void kickUser(TLRPC.TL_chatParticipant user) { private void kickUser(TLRPC.TL_chatParticipant user) {
@ -549,7 +549,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putInt("chat_id", chat_id); bundle.putInt("chat_id", chat_id);
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat_name_" + chat_id, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat_name_" + chat_id, false);
} }
}); });

View file

@ -129,7 +129,7 @@ public class ChatProfileChangeNameActivity extends BaseFragment {
if (getActivity() == null) { if (getActivity() == null) {
return; return;
} }
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE); SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
boolean animations = preferences.getBoolean("view_animations", true); boolean animations = preferences.getBoolean("view_animations", true);

View file

@ -214,7 +214,7 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent
if (getActivity() == null) { if (getActivity() == null) {
return; return;
} }
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE); SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
boolean animations = preferences.getBoolean("view_animations", true); boolean animations = preferences.getBoolean("view_animations", true);

View file

@ -174,7 +174,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putInt("user_id", user.id); bundle.putInt("user_id", user.id);
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), destroyAfterSelect, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), destroyAfterSelect, false);
} }
} }
} else { } else {
@ -235,7 +235,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putInt("user_id", user.id); bundle.putInt("user_id", user.id);
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), destroyAfterSelect, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), destroyAfterSelect, false);
} }
} }
} else { } else {
@ -357,7 +357,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
actionBar.setTitle(getStringEntry(R.string.Contacts)); actionBar.setTitle(getStringEntry(R.string.Contacts));
} }
((ApplicationActivity)parentActivity).fixBackButton(); ((LaunchActivity)parentActivity).fixBackButton();
} }
@Override @Override
@ -373,8 +373,8 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
listViewAdapter.notifyDataSetChanged(); listViewAdapter.notifyDataSetChanged();
} }
firstStart = false; firstStart = false;
((ApplicationActivity)parentActivity).showActionBar(); ((LaunchActivity)parentActivity).showActionBar();
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
} }
@Override @Override
@ -478,7 +478,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
} }
listView.setFastScrollEnabled(true); listView.setFastScrollEnabled(true);
listView.setVerticalScrollBarEnabled(false); listView.setVerticalScrollBarEnabled(false);
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
epmtyTextView.setText(getStringEntry(R.string.NoContacts)); epmtyTextView.setText(getStringEntry(R.string.NoContacts));
return true; return true;
@ -504,7 +504,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putInt("enc_id", encryptedChat.id); bundle.putInt("enc_id", encryptedChat.id);
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), true, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), true, false);
} }
} }
} }

View file

@ -240,8 +240,8 @@ public class DocumentSelectActivity extends BaseFragment {
listAdapter.notifyDataSetChanged(); listAdapter.notifyDataSetChanged();
} }
firstStart = false; firstStart = false;
((ApplicationActivity)parentActivity).showActionBar(); ((LaunchActivity)parentActivity).showActionBar();
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
} }
@Override @Override

View file

@ -294,8 +294,8 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
if (getActivity() == null) { if (getActivity() == null) {
return; return;
} }
((ApplicationActivity)parentActivity).showActionBar(); ((LaunchActivity)parentActivity).showActionBar();
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
} }
public Emoji.XImageSpan createAndPutChipForUser(TLRPC.User user) { public Emoji.XImageSpan createAndPutChipForUser(TLRPC.User user) {
@ -426,7 +426,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
} else { } else {
return; return;
} }
((ApplicationActivity)parentActivity).presentFragment(new GroupCreateFinalActivity(), "group_craate_final", false); ((LaunchActivity)parentActivity).presentFragment(new GroupCreateFinalActivity(), "group_craate_final", false);
} }
}); });
} }

View file

@ -162,8 +162,8 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
if (getActivity() == null) { if (getActivity() == null) {
return; return;
} }
((ApplicationActivity)parentActivity).showActionBar(); ((LaunchActivity)parentActivity).showActionBar();
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
} }
@Override @Override
@ -244,7 +244,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putInt("chat_id", (Integer)args[0]); bundle.putInt("chat_id", (Integer)args[0]);
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), true, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), true, false);
} }
}); });
} }

View file

@ -111,8 +111,8 @@ public class IdenticonActivity extends BaseFragment {
if (getActivity() == null) { if (getActivity() == null) {
return; return;
} }
((ApplicationActivity)parentActivity).showActionBar(); ((LaunchActivity)parentActivity).showActionBar();
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
fixLayout(); fixLayout();
} }

View file

@ -51,7 +51,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
public class ApplicationActivity extends ActionBarActivity implements NotificationCenter.NotificationCenterDelegate, MessagesActivity.MessagesActivityDelegate { public class LaunchActivity extends ActionBarActivity implements NotificationCenter.NotificationCenterDelegate, MessagesActivity.MessagesActivityDelegate {
private boolean finished = false; private boolean finished = false;
private NotificationView notificationView; private NotificationView notificationView;
private Uri photoPath = null; private Uri photoPath = null;

View file

@ -207,8 +207,8 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
if (getActivity() == null) { if (getActivity() == null) {
return; return;
} }
((ApplicationActivity)parentActivity).showActionBar(); ((LaunchActivity)parentActivity).showActionBar();
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
} }
@Override @Override

View file

@ -239,7 +239,7 @@ public class LoginActivity extends ActionBarActivity implements SlideView.SlideV
@Override @Override
public void needFinishActivity() { public void needFinishActivity() {
Intent intent2 = new Intent(this, ApplicationActivity.class); Intent intent2 = new Intent(this, LaunchActivity.class);
startActivity(intent2); startActivity(intent2);
finish(); finish();
} }

View file

@ -271,8 +271,8 @@ public class MediaActivity extends BaseFragment implements NotificationCenter.No
listAdapter.notifyDataSetChanged(); listAdapter.notifyDataSetChanged();
} }
firstStart = false; firstStart = false;
((ApplicationActivity)parentActivity).showActionBar(); ((LaunchActivity)parentActivity).showActionBar();
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
fixLayout(); fixLayout();
} }

View file

@ -193,17 +193,17 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
if (lower_part > 0) { if (lower_part > 0) {
bundle.putInt("user_id", lower_part); bundle.putInt("user_id", lower_part);
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), false);
} else if (lower_part < 0) { } else if (lower_part < 0) {
bundle.putInt("chat_id", -lower_part); bundle.putInt("chat_id", -lower_part);
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), false);
} }
} else { } else {
int id = (int)(dialog_id >> 32); int id = (int)(dialog_id >> 32);
bundle.putInt("enc_id", id); bundle.putInt("enc_id", id);
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), false);
} }
} }
} }
@ -306,7 +306,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
actionBar.setSubtitle(null); actionBar.setSubtitle(null);
actionBar.setCustomView(null); actionBar.setCustomView(null);
actionBar.setTitle(getStringEntry(R.string.SelectChat)); actionBar.setTitle(getStringEntry(R.string.SelectChat));
((ApplicationActivity)parentActivity).fixBackButton(); ((LaunchActivity)parentActivity).fixBackButton();
} else { } else {
ImageView view = (ImageView)parentActivity.findViewById(16908332); ImageView view = (ImageView)parentActivity.findViewById(16908332);
if (view == null) { if (view == null) {
@ -349,8 +349,8 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
if (messagesListViewAdapter != null) { if (messagesListViewAdapter != null) {
messagesListViewAdapter.notifyDataSetChanged(); messagesListViewAdapter.notifyDataSetChanged();
} }
((ApplicationActivity)parentActivity).showActionBar(); ((LaunchActivity)parentActivity).showActionBar();
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
} }
@Override @Override
@ -607,7 +607,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
messagesListViewAdapter.notifyDataSetChanged(); messagesListViewAdapter.notifyDataSetChanged();
} }
if (onlySelect) { if (onlySelect) {
((ApplicationActivity)parentActivity).fixBackButton(); ((LaunchActivity)parentActivity).fixBackButton();
} }
return true; return true;
} }
@ -629,11 +629,11 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
switch (itemId) { switch (itemId) {
case R.id.messages_list_menu_settings: { case R.id.messages_list_menu_settings: {
((ApplicationActivity)inflaterActivity).presentFragment(new SettingsActivity(), "settings", false); ((LaunchActivity)inflaterActivity).presentFragment(new SettingsActivity(), "settings", false);
break; break;
} }
case R.id.messages_list_menu_contacts: { case R.id.messages_list_menu_contacts: {
((ApplicationActivity)inflaterActivity).presentFragment(new ContactsActivity(), "contacts", false); ((LaunchActivity)inflaterActivity).presentFragment(new ContactsActivity(), "contacts", false);
break; break;
} }
case R.id.messages_list_menu_new_messages: { case R.id.messages_list_menu_new_messages: {
@ -644,7 +644,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
bundle.putBoolean("usersAsSections", true); bundle.putBoolean("usersAsSections", true);
fragment.animationType = 1; fragment.animationType = 1;
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)inflaterActivity).presentFragment(fragment, "contacts_chat", false); ((LaunchActivity)inflaterActivity).presentFragment(fragment, "contacts_chat", false);
break; break;
} }
case R.id.messages_list_menu_new_secret_chat: { case R.id.messages_list_menu_new_secret_chat: {
@ -656,11 +656,11 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
bundle.putBoolean("createSecretChat", true); bundle.putBoolean("createSecretChat", true);
fragment.animationType = 1; fragment.animationType = 1;
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)inflaterActivity).presentFragment(fragment, "contacts_chat", false); ((LaunchActivity)inflaterActivity).presentFragment(fragment, "contacts_chat", false);
break; break;
} }
case R.id.messages_list_menu_new_chat: { case R.id.messages_list_menu_new_chat: {
((ApplicationActivity)inflaterActivity).presentFragment(new GroupCreateActivity(), "group_create", false); ((LaunchActivity)inflaterActivity).presentFragment(new GroupCreateActivity(), "group_create", false);
break; break;
} }
case android.R.id.home: case android.R.id.home:

View file

@ -380,6 +380,6 @@ public class PhotoCropActivity extends BaseFragment {
if (getActivity() == null) { if (getActivity() == null) {
return; return;
} }
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
} }
} }

View file

@ -223,11 +223,11 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
listView.invalidateViews(); listView.invalidateViews();
} }
} else if (i == notificationRow) { } else if (i == notificationRow) {
((ApplicationActivity)parentActivity).presentFragment(new SettingsNotificationsActivity(), "settings_notifications", false); ((LaunchActivity)parentActivity).presentFragment(new SettingsNotificationsActivity(), "settings_notifications", false);
} else if (i == blockedRow) { } else if (i == blockedRow) {
((ApplicationActivity)parentActivity).presentFragment(new SettingsBlockedUsers(), "settings_blocked", false); ((LaunchActivity)parentActivity).presentFragment(new SettingsBlockedUsers(), "settings_blocked", false);
} else if (i == backgroundRow) { } else if (i == backgroundRow) {
((ApplicationActivity)parentActivity).presentFragment(new SettingsWallpapersActivity(), "settings_wallpapers", false); ((LaunchActivity)parentActivity).presentFragment(new SettingsWallpapersActivity(), "settings_wallpapers", false);
} else if (i == askQuestionRow) { } else if (i == askQuestionRow) {
final SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE); final SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
int uid = preferences.getInt("support_id", 0); int uid = preferences.getInt("support_id", 0);
@ -286,7 +286,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putInt("user_id", res.user.id); bundle.putInt("user_id", res.user.id);
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), false);
} }
}); });
} else { } else {
@ -309,7 +309,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putInt("user_id", supportUser.id); bundle.putInt("user_id", supportUser.id);
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), false);
} }
} else if (i == sendLogsRow) { } else if (i == sendLogsRow) {
sendLogs(); sendLogs();
@ -478,8 +478,8 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
listAdapter.notifyDataSetChanged(); listAdapter.notifyDataSetChanged();
} }
firstStart = false; firstStart = false;
((ApplicationActivity)parentActivity).showActionBar(); ((LaunchActivity)parentActivity).showActionBar();
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
} }
@Override @Override
@ -544,7 +544,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
button.setOnClickListener(new View.OnClickListener() { button.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
((ApplicationActivity)parentActivity).presentFragment(new SettingsChangeNameActivity(), "change_name", false); ((LaunchActivity)parentActivity).presentFragment(new SettingsChangeNameActivity(), "change_name", false);
} }
}); });

View file

@ -95,7 +95,7 @@ public class SettingsBlockedUsers extends BaseFragment implements NotificationCe
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putInt("user_id", blockedContacts.get(i).user_id); args.putInt("user_id", blockedContacts.get(i).user_id);
fragment.setArguments(args); fragment.setArguments(args);
((ApplicationActivity)parentActivity).presentFragment(fragment, "user_" + blockedContacts.get(i).user_id, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "user_" + blockedContacts.get(i).user_id, false);
} }
} }
}); });
@ -269,7 +269,7 @@ public class SettingsBlockedUsers extends BaseFragment implements NotificationCe
title.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0); title.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
title.setCompoundDrawablePadding(0); title.setCompoundDrawablePadding(0);
} }
((ApplicationActivity)parentActivity).fixBackButton(); ((LaunchActivity)parentActivity).fixBackButton();
} }
@Override @Override
@ -285,8 +285,8 @@ public class SettingsBlockedUsers extends BaseFragment implements NotificationCe
listViewAdapter.notifyDataSetChanged(); listViewAdapter.notifyDataSetChanged();
} }
firstStart = false; firstStart = false;
((ApplicationActivity)parentActivity).showActionBar(); ((LaunchActivity)parentActivity).showActionBar();
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
} }
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
@ -310,7 +310,7 @@ public class SettingsBlockedUsers extends BaseFragment implements NotificationCe
bundle.putBoolean("returnAsResult", true); bundle.putBoolean("returnAsResult", true);
fragment.delegate = this; fragment.delegate = this;
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "contacts_block", false); ((LaunchActivity)parentActivity).presentFragment(fragment, "contacts_block", false);
break; break;
} }
return true; return true;

View file

@ -292,8 +292,8 @@ public class SettingsNotificationsActivity extends BaseFragment {
if (getActivity() == null) { if (getActivity() == null) {
return; return;
} }
((ApplicationActivity)parentActivity).showActionBar(); ((LaunchActivity)parentActivity).showActionBar();
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
} }
@Override @Override

View file

@ -424,7 +424,7 @@ public class SettingsWallpapersActivity extends BaseFragment implements Notifica
listAdapter.notifyDataSetChanged(); listAdapter.notifyDataSetChanged();
} }
((ApplicationActivity) parentActivity).hideActionBar(); ((LaunchActivity) parentActivity).hideActionBar();
processSelectedBackground(); processSelectedBackground();

View file

@ -178,13 +178,13 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
bundle.putLong("dialog_id", user_id); bundle.putLong("dialog_id", user_id);
} }
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "media_user_" + user_id, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "media_user_" + user_id, false);
} else if (i == 5 && dialog_id != 0 && currentEncryptedChat instanceof TLRPC.TL_encryptedChat) { } else if (i == 5 && dialog_id != 0 && currentEncryptedChat instanceof TLRPC.TL_encryptedChat) {
IdenticonActivity fragment = new IdenticonActivity(); IdenticonActivity fragment = new IdenticonActivity();
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putInt("chat_id", (int)(dialog_id >> 32)); bundle.putInt("chat_id", (int)(dialog_id >> 32));
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "key_" + dialog_id, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "key_" + dialog_id, false);
} else if (i == 4 && dialog_id != 0 && currentEncryptedChat instanceof TLRPC.TL_encryptedChat) { } else if (i == 4 && dialog_id != 0 && currentEncryptedChat instanceof TLRPC.TL_encryptedChat) {
AlertDialog.Builder builder = new AlertDialog.Builder(parentActivity); AlertDialog.Builder builder = new AlertDialog.Builder(parentActivity);
builder.setTitle(getStringEntry(R.string.MessageLifetime)); builder.setTitle(getStringEntry(R.string.MessageLifetime));
@ -312,7 +312,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putInt("enc_id", encryptedChat.id); bundle.putInt("enc_id", encryptedChat.id);
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), true, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), true, false);
} }
} else if (id == MessagesController.encryptedChatUpdated) { } else if (id == MessagesController.encryptedChatUpdated) {
TLRPC.EncryptedChat chat = (TLRPC.EncryptedChat)args[0]; TLRPC.EncryptedChat chat = (TLRPC.EncryptedChat)args[0];
@ -373,8 +373,8 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
listAdapter.notifyDataSetChanged(); listAdapter.notifyDataSetChanged();
} }
firstStart = false; firstStart = false;
((ApplicationActivity)parentActivity).showActionBar(); ((LaunchActivity)parentActivity).showActionBar();
((ApplicationActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
fixLayout(); fixLayout();
} }
@ -439,7 +439,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putInt("user_id", user.id); args.putInt("user_id", user.id);
fragment.setArguments(args); fragment.setArguments(args);
((ApplicationActivity)parentActivity).presentFragment(fragment, "add_contact_" + user.id, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "add_contact_" + user.id, false);
break; break;
} }
case R.id.share_contact: { case R.id.share_contact: {
@ -449,7 +449,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
args.putBoolean("serverOnly", true); args.putBoolean("serverOnly", true);
fragment.setArguments(args); fragment.setArguments(args);
fragment.delegate = this; fragment.delegate = this;
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat_select", false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat_select", false);
break; break;
} }
case R.id.edit_contact: { case R.id.edit_contact: {
@ -457,7 +457,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putInt("user_id", user_id); args.putInt("user_id", user_id);
fragment.setArguments(args); fragment.setArguments(args);
((ApplicationActivity)parentActivity).presentFragment(fragment, "add_contact_" + user_id, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "add_contact_" + user_id, false);
break; break;
} }
case R.id.delete_contact: { case R.id.delete_contact: {
@ -513,7 +513,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
bundle.putInt("user_id", lower_part); bundle.putInt("user_id", lower_part);
fragment.setArguments(bundle); fragment.setArguments(bundle);
fragment.scrollToTopOnResume = true; fragment.scrollToTopOnResume = true;
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), true, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), true, false);
removeSelfFromStack(); removeSelfFromStack();
messageFragment.removeSelfFromStack(); messageFragment.removeSelfFromStack();
} else if (lower_part < 0) { } else if (lower_part < 0) {
@ -521,7 +521,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
bundle.putInt("chat_id", -lower_part); bundle.putInt("chat_id", -lower_part);
fragment.setArguments(bundle); fragment.setArguments(bundle);
fragment.scrollToTopOnResume = true; fragment.scrollToTopOnResume = true;
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), true, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), true, false);
messageFragment.removeSelfFromStack(); messageFragment.removeSelfFromStack();
removeSelfFromStack(); removeSelfFromStack();
} }
@ -531,7 +531,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
bundle.putInt("enc_id", id); bundle.putInt("enc_id", id);
fragment.setArguments(bundle); fragment.setArguments(bundle);
fragment.scrollToTopOnResume = true; fragment.scrollToTopOnResume = true;
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), false);
messageFragment.removeSelfFromStack(); messageFragment.removeSelfFromStack();
removeSelfFromStack(); removeSelfFromStack();
} }
@ -730,7 +730,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putInt("user_id", user_id); bundle.putInt("user_id", user_id);
fragment.setArguments(bundle); fragment.setArguments(bundle);
((ApplicationActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), true, false); ((LaunchActivity)parentActivity).presentFragment(fragment, "chat" + Math.random(), true, false);
} }
}); });
TextView textView = (TextView)view.findViewById(R.id.settings_row_text); TextView textView = (TextView)view.findViewById(R.id.settings_row_text);

View file

@ -21,7 +21,7 @@ import org.telegram.messenger.FileLog;
import org.telegram.messenger.NotificationCenter; import org.telegram.messenger.NotificationCenter;
import org.telegram.messenger.UserConfig; import org.telegram.messenger.UserConfig;
import org.telegram.messenger.Utilities; import org.telegram.messenger.Utilities;
import org.telegram.ui.ApplicationActivity; import org.telegram.ui.LaunchActivity;
import org.telegram.ui.PhotoCropActivity; import org.telegram.ui.PhotoCropActivity;
import java.io.File; import java.io.File;
@ -76,9 +76,9 @@ public class AvatarUpdater implements NotificationCenter.NotificationCenterDeleg
private void startCrop(String path, Uri uri) { private void startCrop(String path, Uri uri) {
try { try {
ApplicationActivity activity = (ApplicationActivity)parentFragment.parentActivity; LaunchActivity activity = (LaunchActivity)parentFragment.parentActivity;
if (activity == null) { if (activity == null) {
activity = (ApplicationActivity)parentFragment.getActivity(); activity = (LaunchActivity)parentFragment.getActivity();
} }
if (activity == null) { if (activity == null) {
return; return;

View file

@ -17,7 +17,7 @@ import android.view.animation.Animation;
import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils;
import org.telegram.messenger.ConnectionsManager; import org.telegram.messenger.ConnectionsManager;
import org.telegram.ui.ApplicationActivity; import org.telegram.ui.LaunchActivity;
import org.telegram.ui.ApplicationLoader; import org.telegram.ui.ApplicationLoader;
public class BaseFragment extends Fragment { public class BaseFragment extends Fragment {
@ -55,7 +55,7 @@ public class BaseFragment extends Fragment {
onFragmentDestroy(); onFragmentDestroy();
return; return;
} }
((ApplicationActivity)parentActivity).finishFragment(bySwipe); ((LaunchActivity)parentActivity).finishFragment(bySwipe);
if (getActivity() == null) { if (getActivity() == null) {
if (fragmentView != null) { if (fragmentView != null) {
ViewGroup parent = (ViewGroup)fragmentView.getParent(); ViewGroup parent = (ViewGroup)fragmentView.getParent();
@ -80,7 +80,7 @@ public class BaseFragment extends Fragment {
onFragmentDestroy(); onFragmentDestroy();
return; return;
} }
((ApplicationActivity)parentActivity).removeFromStack(this); ((LaunchActivity)parentActivity).removeFromStack(this);
if (getActivity() == null) { if (getActivity() == null) {
if (fragmentView != null) { if (fragmentView != null) {
ViewGroup parent = (ViewGroup)fragmentView.getParent(); ViewGroup parent = (ViewGroup)fragmentView.getParent();