Skip to content

Commit

Permalink
Remove locale aware activity (#21523)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbradbury authored Dec 16, 2024
2 parents 81c2235 + e7f0947 commit b2e7f5f
Show file tree
Hide file tree
Showing 90 changed files with 180 additions and 199 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import android.os.Bundle
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import org.wordpress.android.ui.LocaleAwareActivity
import androidx.appcompat.app.AppCompatActivity
import org.wordpress.android.util.extensions.setContent

class DesignSystemActivity : LocaleAwareActivity() {
class DesignSystemActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.pm.ShortcutInfoCompat;
import androidx.core.content.pm.ShortcutManagerCompat;
Expand All @@ -44,7 +45,7 @@

import javax.inject.Inject;

public class AddQuickPressShortcutActivity extends LocaleAwareActivity {
public class AddQuickPressShortcutActivity extends AppCompatActivity {
public String[] blogNames;
public int[] siteIds;
public String[] blogUrls;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.text.HtmlCompat;

Expand All @@ -35,7 +36,7 @@
/**
* views the activity log (see utils/AppLog.java)
*/
public class AppLogViewerActivity extends LocaleAwareActivity {
public class AppLogViewerActivity extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import org.wordpress.android.R;
Expand Down Expand Up @@ -39,7 +40,7 @@
* <p>
* Redirects users to the stats activity if the jetpack connection was succesful
*/
public class JetpackConnectionResultActivity extends LocaleAwareActivity {
public class JetpackConnectionResultActivity extends AppCompatActivity {
private static final String ALREADY_CONNECTED = "already-connected";
private static final String REASON_PARAM = "reason";
private static final String SOURCE_PARAM = "source";
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.TaskStackBuilder;
import androidx.preference.PreferenceManager;

Expand Down Expand Up @@ -43,7 +44,7 @@
* Moreover it lists what actions the user can perform and redirects the user to the activity,
* along with the content passed in the intent.
*/
public class ShareIntentReceiverActivity extends LocaleAwareActivity implements ShareIntentFragmentListener {
public class ShareIntentReceiverActivity extends AppCompatActivity implements ShareIntentFragmentListener {
private static final String SHARE_LAST_USED_BLOG_ID_KEY = "wp-settings-share-last-used-text-blogid";
private static final String KEY_SELECTED_SITE_LOCAL_ID = "KEY_SELECTED_SITE_LOCAL_ID";
private static final String KEY_SHARE_ACTION_ID = "KEY_SHARE_ACTION_ID";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.wordpress.android.ui
import android.annotation.SuppressLint
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import org.wordpress.android.R
import org.wordpress.android.WordPress
Expand All @@ -12,7 +13,7 @@ import org.wordpress.android.util.ProfilingUtils
import org.wordpress.android.util.ToastUtils

@SuppressLint("CustomSplashScreen")
class WPLaunchActivity : LocaleAwareActivity() {
class WPLaunchActivity : AppCompatActivity() {
/*
* this the main (default) activity, which does nothing more than launch the
* previously active activity on startup - note that it's defined in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import org.wordpress.android.R;
Expand All @@ -25,7 +26,7 @@
/**
* Basic activity for displaying a WebView.
*/
public abstract class WebViewActivity extends LocaleAwareActivity {
public abstract class WebViewActivity extends AppCompatActivity {
/**
* Primary webview used to display content.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import com.automattic.about.model.AboutConfigProvider
import org.wordpress.android.R
import org.wordpress.android.WordPress
import org.wordpress.android.ui.ActivityLauncher
import org.wordpress.android.ui.LocaleAwareActivity
import androidx.appcompat.app.AppCompatActivity
import org.wordpress.android.ui.about.UnifiedAboutNavigationAction.Dismiss
import org.wordpress.android.ui.about.UnifiedAboutNavigationAction.OpenBlog
import org.wordpress.android.viewmodel.observeEvent
import javax.inject.Inject

class UnifiedAboutActivity : LocaleAwareActivity(), AboutConfigProvider {
class UnifiedAboutActivity : AppCompatActivity(), AboutConfigProvider {
@Inject
lateinit var viewModel: UnifiedAboutViewModel

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import org.wordpress.android.support.ZendeskHelper
import org.wordpress.android.ui.ActivityId
import org.wordpress.android.ui.ActivityLauncher
import org.wordpress.android.ui.AppLogViewerActivity
import org.wordpress.android.ui.LocaleAwareActivity
import androidx.appcompat.app.AppCompatActivity
import org.wordpress.android.ui.debug.DebugSettingsActivity
import org.wordpress.android.ui.main.utils.MeGravatarLoader
import org.wordpress.android.ui.prefs.AppPrefs
Expand All @@ -50,7 +50,7 @@ import javax.inject.Inject
import android.R as AndroidR

@AndroidEntryPoint
class HelpActivity : LocaleAwareActivity() {
class HelpActivity : AppCompatActivity() {
@Inject
lateinit var accountStore: AccountStore

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.ViewModelProvider;
Expand Down Expand Up @@ -49,7 +50,6 @@
import org.wordpress.android.support.ZendeskHelper;
import org.wordpress.android.ui.ActivityLauncher;
import org.wordpress.android.ui.JetpackConnectionSource;
import org.wordpress.android.ui.LocaleAwareActivity;
import org.wordpress.android.ui.RequestCodes;
import org.wordpress.android.ui.accounts.HelpActivity.Origin;
import org.wordpress.android.ui.accounts.LoginNavigationEvents.ShowNoJetpackSites;
Expand Down Expand Up @@ -95,7 +95,7 @@
import static org.wordpress.android.util.ActivityUtils.hideKeyboard;

@AndroidEntryPoint
public class LoginActivity extends LocaleAwareActivity implements ConnectionCallbacks, OnConnectionFailedListener,
public class LoginActivity extends AppCompatActivity implements ConnectionCallbacks, OnConnectionFailedListener,
Callback, LoginListener, GoogleListener, LoginPrologueListener,
HasAndroidInjector, BasicDialogPositiveClickInterface {
public static final String ARG_JETPACK_CONNECT_SOURCE = "ARG_JETPACK_CONNECT_SOURCE";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.ViewModelProvider;
Expand All @@ -12,7 +13,6 @@
import org.wordpress.android.fluxc.store.AccountStore;
import org.wordpress.android.fluxc.store.SiteStore;
import org.wordpress.android.ui.ActivityLauncher;
import org.wordpress.android.ui.LocaleAwareActivity;
import org.wordpress.android.ui.RequestCodes;
import org.wordpress.android.ui.accounts.LoginNavigationEvents.CloseWithResultOk;
import org.wordpress.android.ui.accounts.LoginNavigationEvents.CreateNewSite;
Expand All @@ -35,7 +35,7 @@
import dagger.hilt.android.AndroidEntryPoint;

@AndroidEntryPoint
public class LoginEpilogueActivity extends LocaleAwareActivity implements LoginEpilogueListener {
public class LoginEpilogueActivity extends AppCompatActivity implements LoginEpilogueListener {
public static final String EXTRA_DO_LOGIN_UPDATE = "EXTRA_DO_LOGIN_UPDATE";
public static final String EXTRA_SHOW_AND_RETURN = "EXTRA_SHOW_AND_RETURN";
public static final String ARG_OLD_SITES_IDS = "ARG_OLD_SITES_IDS";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import org.wordpress.android.login.LoginAnalyticsListener;
import org.wordpress.android.ui.JetpackConnectionSource;
import org.wordpress.android.ui.LocaleAwareActivity;
import org.wordpress.android.ui.main.WPMainActivity;

import javax.inject.Inject;
Expand All @@ -20,7 +20,7 @@
* or signup based on deep link scheme, host, and parameters.
*/
@AndroidEntryPoint
public class LoginMagicLinkInterceptActivity extends LocaleAwareActivity {
public class LoginMagicLinkInterceptActivity extends AppCompatActivity {
private static final String PARAMETER_FLOW = "flow";
private static final String PARAMETER_FLOW_JETPACK = "jetpack";
private static final String PARAMETER_SOURCE = "source";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import dagger.hilt.android.AndroidEntryPoint
import org.wordpress.android.R
import org.wordpress.android.databinding.PostSignupInterstitialActivityBinding
import org.wordpress.android.ui.ActivityLauncher
import org.wordpress.android.ui.LocaleAwareActivity
import androidx.appcompat.app.AppCompatActivity
import org.wordpress.android.ui.jetpackoverlay.individualplugin.WPJetpackIndividualPluginFragment
import org.wordpress.android.ui.sitecreation.misc.SiteCreationSource
import org.wordpress.android.viewmodel.accounts.PostSignupInterstitialViewModel
Expand All @@ -21,7 +21,7 @@ import org.wordpress.android.viewmodel.accounts.PostSignupInterstitialViewModel.
import javax.inject.Inject

@AndroidEntryPoint
class PostSignupInterstitialActivity : LocaleAwareActivity() {
class PostSignupInterstitialActivity : AppCompatActivity() {
@Inject
lateinit var viewModelFactory: ViewModelProvider.Factory
private lateinit var viewModel: PostSignupInterstitialViewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentTransaction;

import org.wordpress.android.R;
import org.wordpress.android.fluxc.store.SiteStore;
import org.wordpress.android.ui.ActivityLauncher;
import org.wordpress.android.ui.LocaleAwareActivity;
import org.wordpress.android.ui.accounts.signup.SignupEpilogueFragment;
import org.wordpress.android.ui.accounts.signup.SignupEpilogueListener;

Expand All @@ -17,7 +17,7 @@
import dagger.hilt.android.AndroidEntryPoint;

@AndroidEntryPoint
public class SignupEpilogueActivity extends LocaleAwareActivity implements SignupEpilogueListener {
public class SignupEpilogueActivity extends AppCompatActivity implements SignupEpilogueListener {
public static final String EXTRA_SIGNUP_DISPLAY_NAME = "EXTRA_SIGNUP_DISPLAY_NAME";
public static final String EXTRA_SIGNUP_EMAIL_ADDRESS = "EXTRA_SIGNUP_EMAIL_ADDRESS";
public static final String EXTRA_SIGNUP_IS_EMAIL = "EXTRA_SIGNUP_IS_EMAIL";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import android.os.Bundle
import android.view.MenuItem
import dagger.hilt.android.AndroidEntryPoint
import org.wordpress.android.databinding.ActivityLogDetailActivityBinding
import org.wordpress.android.ui.LocaleAwareActivity
import androidx.appcompat.app.AppCompatActivity
import org.wordpress.android.ui.RequestCodes
import android.R as AndroidR

@AndroidEntryPoint
class ActivityLogDetailActivity : LocaleAwareActivity() {
class ActivityLogDetailActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import dagger.hilt.android.AndroidEntryPoint
import org.wordpress.android.R
import org.wordpress.android.databinding.ActivityLogListActivityBinding
import org.wordpress.android.models.JetpackPoweredScreen
import org.wordpress.android.ui.LocaleAwareActivity
import androidx.appcompat.app.AppCompatActivity
import org.wordpress.android.ui.RequestCodes
import org.wordpress.android.ui.ScrollableViewInitializedListener
import org.wordpress.android.ui.activitylog.detail.ActivityLogDetailActivity
Expand All @@ -27,7 +27,7 @@ import javax.inject.Inject
import android.R as AndroidR

@AndroidEntryPoint
class ActivityLogListActivity : LocaleAwareActivity(), ScrollableViewInitializedListener {
class ActivityLogListActivity : AppCompatActivity(), ScrollableViewInitializedListener {
@Inject
lateinit var jetpackBrandingUtils: JetpackBrandingUtils

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import android.os.Bundle
import androidx.activity.viewModels
import dagger.hilt.android.AndroidEntryPoint
import org.wordpress.android.R
import org.wordpress.android.ui.LocaleAwareActivity
import androidx.appcompat.app.AppCompatActivity
import org.wordpress.android.ui.blaze.blazecampaigns.campaigndetail.CampaignDetailFragment
import org.wordpress.android.ui.blaze.blazecampaigns.campaignlisting.CampaignListingFragment
import org.wordpress.android.util.extensions.getParcelableCompat
Expand All @@ -13,7 +13,7 @@ import org.wordpress.android.util.extensions.getParcelableExtraCompat
const val ARG_EXTRA_BLAZE_CAMPAIGN_PAGE = "blaze_campaign_page"

@AndroidEntryPoint
class BlazeCampaignParentActivity : LocaleAwareActivity() {
class BlazeCampaignParentActivity : AppCompatActivity() {
private val viewModel: CampaignViewModel by viewModels()
private var campaignPage: BlazeCampaignPage? = null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import android.os.Bundle
import androidx.activity.viewModels
import dagger.hilt.android.AndroidEntryPoint
import org.wordpress.android.R
import org.wordpress.android.ui.LocaleAwareActivity
import androidx.appcompat.app.AppCompatActivity
import org.wordpress.android.ui.blaze.BlazeFlowSource
import org.wordpress.android.ui.blaze.BlazeUIModel
import org.wordpress.android.ui.blaze.BlazeUiState
Expand All @@ -20,7 +20,7 @@ const val ARG_BLAZE_FLOW_SOURCE = "blaze_flow_source"
const val ARG_BLAZE_SHOULD_SHOW_OVERLAY = "blaze_flow_should_show_overlay"

@AndroidEntryPoint
class BlazePromoteParentActivity : LocaleAwareActivity() {
class BlazePromoteParentActivity : AppCompatActivity() {
private val viewModel: BlazeViewModel by viewModels()
private var shouldShowOverlay = false
private var source: BlazeFlowSource = BlazeFlowSource.DASHBOARD_CARD
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import org.wordpress.android.ui.ActivityLauncher
import org.wordpress.android.ui.LocaleAwareActivity
import androidx.appcompat.app.AppCompatActivity
import org.wordpress.android.ui.bloggingprompts.promptslist.compose.BloggingPromptsListScreen
import org.wordpress.android.ui.compose.theme.AppThemeM3
import org.wordpress.android.ui.posts.PostUtils
import org.wordpress.android.util.extensions.setContent

@AndroidEntryPoint
class BloggingPromptsListActivity : LocaleAwareActivity() {
class BloggingPromptsListActivity : AppCompatActivity() {
private val viewModel: BloggingPromptsListViewModel by viewModels()

override fun onCreate(savedInstanceState: Bundle?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager.widget.ViewPager;

import org.greenrobot.eventbus.Subscribe;
Expand All @@ -28,7 +29,6 @@
import org.wordpress.android.fluxc.store.CommentStore.OnCommentChanged;
import org.wordpress.android.models.CommentList;
import org.wordpress.android.ui.CollapseFullScreenDialogFragment;
import org.wordpress.android.ui.LocaleAwareActivity;
import org.wordpress.android.ui.ScrollableViewInitializedListener;
import org.wordpress.android.ui.comments.unified.CommentConstants;
import org.wordpress.android.ui.comments.unified.CommentsStoreAdapter;
Expand All @@ -55,7 +55,7 @@
@Deprecated
@AndroidEntryPoint
@SuppressWarnings({"deprecation", "DeprecatedIsStillUsed"})
public class CommentsDetailActivity extends LocaleAwareActivity
public class CommentsDetailActivity extends AppCompatActivity
implements OnLoadMoreListener,
CommentActions.OnCommentActionListener, ScrollableViewInitializedListener {
public static final String COMMENT_ID_EXTRA = "commentId";
Expand Down
Loading

0 comments on commit b2e7f5f

Please sign in to comment.