Fix Signal UI coming up in some cases

This commit is contained in:
gmbnt 2020-03-23 10:49:25 +11:00
parent 3e8f4ae97f
commit 94549724a9
6 changed files with 19 additions and 22 deletions

View File

@ -162,12 +162,12 @@
<activity
android:name="org.thoughtcrime.securesms.InviteActivity"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:parentActivityName="org.thoughtcrime.securesms.ConversationListActivity"
android:parentActivityName="org.thoughtcrime.securesms.loki.redesign.activities.HomeActivity"
android:theme="@style/TextSecure.HighlightTheme"
android:windowSoftInputMode="stateHidden">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="PsiClass:ConversationListActivity" />
android:value="PsiClass:HomeActivity" />
</activity>
<activity
android:name="org.thoughtcrime.securesms.PromptMmsActivity"
@ -217,13 +217,6 @@
android:name="android.service.chooser.chooser_target_service"
android:value=".service.DirectShareService" />
</activity>
<activity
android:name="org.thoughtcrime.securesms.ConversationListActivity"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTask"
android:theme="@style/TextSecure.LightNoActionBar" />
<activity-alias
android:name=".RoutingActivity"
@ -267,10 +260,10 @@
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:label="@string/AndroidManifest_archived_conversations"
android:launchMode="singleTask"
android:parentActivityName="org.thoughtcrime.securesms.ConversationListActivity">
android:parentActivityName="org.thoughtcrime.securesms.loki.redesign.activities.HomeActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="PsiClass:ConversationListActivity" />
android:value="PsiClass:HomeActivity" />
</activity>
<activity
android:name="org.thoughtcrime.securesms.conversation.ConversationActivity"

View File

@ -41,6 +41,7 @@ import android.util.Log;
import android.widget.Toast;
import org.thoughtcrime.securesms.crypto.IdentityKeyUtil;
import org.thoughtcrime.securesms.loki.redesign.activities.HomeActivity;
import org.thoughtcrime.securesms.preferences.AppProtectionPreferenceFragment;
import org.thoughtcrime.securesms.preferences.ChatsPreferenceFragment;
import org.thoughtcrime.securesms.preferences.CorrectedPreferenceFragment;
@ -125,7 +126,7 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
if (fragmentManager.getBackStackEntryCount() > 0) {
fragmentManager.popBackStack();
} else {
Intent intent = new Intent(this, ConversationListActivity.class);
Intent intent = new Intent(this, HomeActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
finish();

View File

@ -19,6 +19,7 @@ import com.nineoldandroids.animation.ArgbEvaluator;
import org.thoughtcrime.securesms.IntroPagerAdapter.IntroPage;
import org.thoughtcrime.securesms.logging.Log;
import org.thoughtcrime.securesms.loki.redesign.activities.HomeActivity;
import org.thoughtcrime.securesms.notifications.NotificationChannels;
import org.thoughtcrime.securesms.util.ServiceUtil;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
@ -191,7 +192,7 @@ public class ExperienceUpgradeActivity extends BaseActionBarActivity implements
TextSecurePreferences.setLastExperienceVersionCode(this, latestVersion);
if (seenUpgrade.isPresent() && seenUpgrade.get().nextIntent != null) {
Intent intent = new Intent(this, seenUpgrade.get().nextIntent);
Intent nextIntent = new Intent(this, ConversationListActivity.class);
Intent nextIntent = new Intent(this, HomeActivity.class);
intent.putExtra("next_intent", nextIntent);
startActivity(intent);
} else {

View File

@ -16,16 +16,17 @@ import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.support.v4.app.NotificationCompat;
import org.thoughtcrime.securesms.ConversationListActivity;
import network.loki.messenger.R;
import org.thoughtcrime.securesms.database.SmsMigrator;
import org.thoughtcrime.securesms.database.SmsMigrator.ProgressDescription;
import org.thoughtcrime.securesms.loki.redesign.activities.HomeActivity;
import org.thoughtcrime.securesms.notifications.NotificationChannels;
import java.lang.ref.WeakReference;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import network.loki.messenger.R;
// FIXME: This class is nuts.
public class ApplicationMigrationService extends Service
implements SmsMigrator.SmsMigrationProgressListener
@ -133,7 +134,7 @@ public class ApplicationMigrationService extends Service
builder.setContentText(getString(R.string.ApplicationMigrationService_import_in_progress));
builder.setOngoing(true);
builder.setProgress(100, 0, false);
builder.setContentIntent(PendingIntent.getActivity(this, 0, new Intent(this, ConversationListActivity.class), 0));
builder.setContentIntent(PendingIntent.getActivity(this, 0, new Intent(this, HomeActivity.class), 0));
stopForeground(true);
startForeground(4242, builder.build());
@ -184,7 +185,7 @@ public class ApplicationMigrationService extends Service
builder.setSmallIcon(R.drawable.ic_notification);
builder.setContentTitle(context.getString(R.string.ApplicationMigrationService_import_complete));
builder.setContentText(context.getString(R.string.ApplicationMigrationService_system_database_import_is_complete));
builder.setContentIntent(PendingIntent.getActivity(context, 0, new Intent(context, ConversationListActivity.class), 0));
builder.setContentIntent(PendingIntent.getActivity(context, 0, new Intent(context, HomeActivity.class), 0));
builder.setWhen(System.currentTimeMillis());
builder.setDefaults(Notification.DEFAULT_VIBRATE);
builder.setAutoCancel(true);

View File

@ -12,12 +12,13 @@ import android.support.annotation.Nullable;
import android.support.v4.app.NotificationCompat;
import android.support.v4.content.ContextCompat;
import org.thoughtcrime.securesms.ConversationListActivity;
import network.loki.messenger.R;
import org.thoughtcrime.securesms.logging.Log;
import org.thoughtcrime.securesms.loki.redesign.activities.HomeActivity;
import org.thoughtcrime.securesms.notifications.NotificationChannels;
import org.whispersystems.libsignal.util.guava.Preconditions;
import network.loki.messenger.R;
public class GenericForegroundService extends Service {
private static final String TAG = GenericForegroundService.class.getSimpleName();
@ -89,7 +90,7 @@ public class GenericForegroundService extends Service {
startForeground(NOTIFICATION_ID, new NotificationCompat.Builder(this, channelId)
.setSmallIcon(iconRes)
.setContentTitle(title)
.setContentIntent(PendingIntent.getActivity(this, 0, new Intent(this, ConversationListActivity.class), 0))
.setContentIntent(PendingIntent.getActivity(this, 0, new Intent(this, HomeActivity.class), 0))
.build());
}

View File

@ -32,13 +32,13 @@ import android.support.annotation.Nullable;
import android.support.v4.app.NotificationCompat;
import org.thoughtcrime.securesms.ApplicationContext;
import org.thoughtcrime.securesms.ConversationListActivity;
import org.thoughtcrime.securesms.DatabaseUpgradeActivity;
import org.thoughtcrime.securesms.DummyActivity;
import org.thoughtcrime.securesms.crypto.InvalidPassphraseException;
import org.thoughtcrime.securesms.crypto.MasterSecret;
import org.thoughtcrime.securesms.crypto.MasterSecretUtil;
import org.thoughtcrime.securesms.logging.Log;
import org.thoughtcrime.securesms.loki.redesign.activities.HomeActivity;
import org.thoughtcrime.securesms.notifications.MessageNotifier;
import org.thoughtcrime.securesms.notifications.NotificationChannels;
import org.thoughtcrime.securesms.util.DynamicLanguage;
@ -295,7 +295,7 @@ public class KeyCachingService extends Service {
}
private PendingIntent buildLaunchIntent() {
Intent intent = new Intent(this, ConversationListActivity.class);
Intent intent = new Intent(this, HomeActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
return PendingIntent.getActivity(getApplicationContext(), 0, intent, 0);
}