Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge release/25.6 into trunk #21613

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .buildkite/beta-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ steps:
manual:
# If those jobs fail, one should always prefer re-triggering a new build from ReleaseV2 rather than retrying the individual job from Buildkite
allowed: false
artifact_paths:
- "**/build/build.log"

- label: ":jetpack: :android: Beta Build"
key: jpbuild
Expand All @@ -77,6 +79,8 @@ steps:
manual:
# If those jobs fail, one should always prefer re-triggering a new build from ReleaseV2 rather than retrying the individual job from Buildkite
allowed: false
artifact_paths:
- "**/build/build.log"

#################
# GitHub Release
Expand Down
4 changes: 2 additions & 2 deletions .configure
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"project_name": "WordPress-Android",
"branch": "trunk",
"pinned_hash": "11fa9c59619ba8d31d0bce2b7ba4412074c00d69",
"pinned_hash": "1c83426e3f9175a6d561f4af53c69a1e2097a6ef",
"files_to_copy": [
{
"file": "android/WPAndroid/secrets.properties",
Expand Down Expand Up @@ -47,4 +47,4 @@
"file_dependencies": [

]
}
}
Binary file modified .configure-files/secrets.properties.enc
Binary file not shown.
4 changes: 4 additions & 0 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ android {
buildConfigField "String", "PUSH_NOTIFICATIONS_APP_KEY", '"org.wordpress.android"'
buildConfigField "boolean", "ENABLE_QRCODE_AUTH_FLOW", "false"
buildConfigField "boolean", "ENABLE_OPEN_WEB_LINKS_WITH_JP_FLOW", "true"
buildConfigField "String", "WPCOM_REDIRECT_URI", '"wordpress://wpcom-authorize"'

manifestPlaceholders = [magicLinkScheme:"wordpress"]
}
Expand All @@ -229,6 +230,7 @@ android {
buildConfigField "String", "PUSH_NOTIFICATIONS_APP_KEY", '"com.jetpack.android"'
buildConfigField "boolean", "ENABLE_QRCODE_AUTH_FLOW", "true"
buildConfigField "boolean", "ENABLE_OPEN_WEB_LINKS_WITH_JP_FLOW", "false"
buildConfigField "String", "WPCOM_REDIRECT_URI", '"jetpack://wpcom-authorize"'

manifestPlaceholders = [magicLinkScheme:"jetpack"]

Expand Down Expand Up @@ -443,6 +445,8 @@ dependencies {
implementation(libs.google.mlkit.text.recognition)
implementation(libs.google.mlkit.barcode.scanning.main)

implementation(libs.androidx.browser)

// CameraX
implementation(libs.androidx.camera.camera2)
implementation(libs.androidx.camera.lifecycle)
Expand Down
17 changes: 9 additions & 8 deletions WordPress/jetpack_metadata/PlayStoreStrings.po
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ msgstr ""
"X-Generator: VsCode\n"
"Project-Id-Version: Jetpack - Apps - Android - Release Notes\n"

msgctxt "release_note_256"
msgid ""
"25.6:\n"
"This update:\n"
"- Fixes a rare crash when registering a domain.\n"
"- Fixes a bunch of under-the-hood things that should make the app more reliable.\n"
"- Uses a web-based approach for WordPress.com login. This should be more reliable for most users, but please contact support if you have any trouble!\n"
msgstr ""

msgctxt "release_note_255"
msgid ""
"25.5:\n"
Expand All @@ -20,14 +29,6 @@ msgid ""
"- Adjusted how users log into WordPress.com – this fixes a long-standing issue where you couldn't log in if you used a Passkey.\n"
msgstr ""

msgctxt "release_note_254"
msgid ""
"25.4:\n"
"Lots of under-the-hood improvements this month – mostly bugfixes, but you should notice that the app doesn't prompt you for ratings nearly as often.\n"
"We're excited to have more to share with you soon!\n"
"We'd love to hear your feedback on the app – you can reach us at mobile-support@automattic.com.\n"
msgstr ""

#. translators: Release notes for this version to be displayed in the Play Store. Limit to 500 characters including spaces and commas!
#. translators: Title to be displayed in the Play Store. Limit to 30 characters including spaces and commas!
msgctxt "play_store_app_title"
Expand Down
6 changes: 4 additions & 2 deletions WordPress/jetpack_metadata/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@


This update:
- Fixes a rare crash when registering a domain.
- Fixes a bunch of under-the-hood things that should make the app more reliable.
- Uses a web-based approach for WordPress.com login. This should be more reliable for most users, but please contact support if you have any trouble!
17 changes: 9 additions & 8 deletions WordPress/metadata/PlayStoreStrings.po
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ msgstr ""
"X-Generator: VsCode\n"
"Project-Id-Version: Release Notes & Play Store Descriptions\n"

msgctxt "release_note_256"
msgid ""
"25.6:\n"
"This update:\n"
"- Fixes a rare crash when registering a domain.\n"
"- Fixes a bunch of under-the-hood things that should make the app more reliable.\n"
"- Uses a web-based approach for WordPress.com login. This should be more reliable for most users, but please contact support if you have any trouble!\n"
msgstr ""

msgctxt "release_note_255"
msgid ""
"25.5:\n"
Expand All @@ -19,14 +28,6 @@ msgid ""
"- Adjusted how users log into WordPress.com – this fixes a long-standing issue where you couldn't log in if you used a Passkey.\n"
msgstr ""

msgctxt "release_note_254"
msgid ""
"25.4:\n"
"Lots of under-the-hood improvements this month – mostly bugfixes, but you should notice that the app doesn't prompt you for ratings nearly as often.\n"
"We're excited to have more to share with you soon!\n"
"We'd love to hear your feedback on the app – you can reach us at mobile-support@automattic.com.\n"
msgstr ""

#. translators: Release notes for this version to be displayed in the Play Store. Limit to 500 characters including spaces and commas!
#. translators: Shorter Release notes for this version to be displayed in the Play Store. Limit to 500 characters including spaces and commas!
msgctxt "sample_post_content"
Expand Down
6 changes: 4 additions & 2 deletions WordPress/metadata/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@


This update:
- Fixes a rare crash when registering a domain.
- Fixes a bunch of under-the-hood things that should make the app more reliable.
- Uses a web-based approach for WordPress.com login. This should be more reliable for most users, but please contact support if you have any trouble!
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class LoginPrologueRevampedFragment : Fragment() {
LoginScreenRevamped(
onWpComLoginClicked = {
viewModel.onWpComLoginClicked()
loginPrologueListener.showEmailLoginScreen()
loginPrologueListener.showWPcomLoginScreen(this.context)
},
onSiteAddressLoginClicked = {
viewModel.onSiteAddressLoginClicked()
Expand Down
16 changes: 15 additions & 1 deletion WordPress/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,22 @@
<activity
android:name=".ui.accounts.LoginActivity"
android:theme="@style/LoginTheme.TransparentSystemBars"
android:windowSoftInputMode="adjustResize" />
android:windowSoftInputMode="adjustResize"
android:exported="true">

<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="wpcom-authorize"
android:scheme="${magicLinkScheme}" />
</intent-filter>
</activity>

<activity
android:name=".ui.accounts.LoginMagicLinkInterceptActivity"
android:theme="@style/NoDisplay"

Check warning

Code scanning / Android Lint

Application has custom scheme intent filters with missing autoVerify attributes Warning

Custom scheme intent filters should explicitly set the autoVerify attribute to true
android:exported="true">

<intent-filter>
Expand Down Expand Up @@ -1155,6 +1166,9 @@
<intent>
<action android:name="android.intent.action.MAIN" />
</intent>
<intent>
<action android:name="android.support.customtabs.action.CustomTabsService" />
</intent>
<!-- required for Android 11 (API level 30) or higher -->
<package android:name="com.jetpack.android" />
</queries>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import android.content.Context;
import android.util.Base64;

import androidx.annotation.NonNull;

import com.goterl.lazysodium.utils.Key;

import org.wordpress.android.BuildConfig;
Expand All @@ -19,12 +21,13 @@
import dagger.hilt.android.qualifiers.ApplicationContext;
import dagger.hilt.components.SingletonComponent;


@InstallIn(SingletonComponent.class)
@Module
public class AppConfigModule {
@Provides
@NonNull @Provides
public AppSecrets provideAppSecrets() {
return new AppSecrets(BuildConfig.OAUTH_APP_ID, BuildConfig.OAUTH_APP_SECRET);
return new AppSecrets(BuildConfig.OAUTH_APP_ID, BuildConfig.OAUTH_APP_SECRET, BuildConfig.WPCOM_REDIRECT_URI);
}

@Singleton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ abstract class LocaleAwareActivity : AppCompatActivity() {
* can't inject [PerAppLocaleManager] into an abstract class
*/
private fun isPerAppLocaleEnabled(): Boolean {
return AppPrefs.getManualFeatureConfig(PerAppLocaleManager.EXPERIMENTAL_PER_APP_LANGUAGE_PREF_KEY)
return AppPrefs.getExperimentalFeatureConfig(PerAppLocaleManager.EXPERIMENTAL_PER_APP_LANGUAGE_PREF_KEY)
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.wordpress.android.ui.accounts;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
Expand All @@ -9,6 +10,7 @@

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.browser.customtabs.CustomTabsIntent;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.ViewModelProvider;
Expand Down Expand Up @@ -58,8 +60,10 @@
import org.wordpress.android.ui.accounts.UnifiedLoginTracker.Click;
import org.wordpress.android.ui.accounts.UnifiedLoginTracker.Flow;
import org.wordpress.android.ui.accounts.UnifiedLoginTracker.Source;
import org.wordpress.android.ui.accounts.UnifiedLoginTracker.Step;
import org.wordpress.android.ui.accounts.login.LoginPrologueListener;
import org.wordpress.android.ui.accounts.login.LoginPrologueRevampedFragment;
import org.wordpress.android.ui.accounts.login.WPcomLoginHelper;
import org.wordpress.android.ui.accounts.login.jetpack.LoginNoSitesFragment;
import org.wordpress.android.ui.accounts.login.jetpack.LoginSiteCheckErrorFragment;
import org.wordpress.android.ui.main.ChooseSiteActivity;
Expand Down Expand Up @@ -130,6 +134,7 @@ private enum SmartLockHelperState {

private LoginMode mLoginMode;
private LoginViewModel mViewModel;
@Inject protected WPcomLoginHelper mLoginHelper;

@Inject DispatchingAndroidInjector<Object> mDispatchingAndroidInjector;
@Inject protected LoginAnalyticsListener mLoginAnalyticsListener;
Expand All @@ -144,6 +149,18 @@ private enum SmartLockHelperState {
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// Attempt Login if this activity was created in response to a user confirming login
mLoginHelper.tryLoginWithDataString(getIntent().getDataString());

// Start preloading the WordPress.com login page if needed – this avoids visual hitches
// when displaying that screen
mLoginHelper.bindCustomTabsService(this);

if (mLoginHelper.isLoggedIn()) {
this.loggedInAndFinish(new ArrayList<Integer>(), true);
return;
}

LoginFlowThemeHelper.injectMissingCustomAttributes(getTheme());

setContentView(R.layout.login_activity);
Expand Down Expand Up @@ -184,7 +201,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
break;
case WPCOM_REAUTHENTICATE:
mUnifiedLoginTracker.setSource(Source.REAUTHENTICATION);
checkSmartLockPasswordAndStartLogin();
showWPcomLoginScreen(getBaseContext());
break;
case SHARE_INTENT:
mUnifiedLoginTracker.setSource(Source.SHARE);
Expand Down Expand Up @@ -451,9 +468,20 @@ private void startLogin() {

// LoginPrologueListener implementation methods

@Override
public void showEmailLoginScreen() {
checkSmartLockPasswordAndStartLogin();
public void showWPcomLoginScreen(@NonNull Context context) {
AnalyticsTracker.track(AnalyticsTracker.Stat.LOGIN_WPCOM_WEBVIEW);
mUnifiedLoginTracker.setFlowAndStep(Flow.WORDPRESS_COM_WEB, Step.WPCOM_WEB_START);

CustomTabsIntent intent = new CustomTabsIntent.Builder()
.setShareState(CustomTabsIntent.SHARE_STATE_OFF)
.setStartAnimations(this, R.anim.activity_slide_in_from_right, R.anim.activity_slide_out_to_left)
.setExitAnimations(this, R.anim.activity_slide_in_from_left, R.anim.activity_slide_out_to_right)
.setUrlBarHidingEnabled(true)
.setInstantAppsEnabled(false)
.setShowTitle(false)
.build();

intent.launchUrl(this, mLoginHelper.getWpcomLoginUri());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sealed class LoginNavigationEvents {
data class SelectSite(val localId: Int) : LoginNavigationEvents()
object CreateNewSite : LoginNavigationEvents()
object CloseWithResultOk : LoginNavigationEvents()
object ShowEmailLoginScreen : LoginNavigationEvents()
object showWPcomLoginScreen : LoginNavigationEvents()
object ShowLoginViaSiteAddressScreen : LoginNavigationEvents()
object ShowJetpackIndividualPluginOverlay : LoginNavigationEvents()
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class UnifiedLoginTracker
enum class Flow(val value: String) {
PROLOGUE("prologue"),
WORDPRESS_COM("wordpress_com"),
WORDPRESS_COM_WEB("wordpress_com_web"),
GOOGLE_LOGIN("google_login"),
SMART_LOCK_LOGIN("smart_lock_login"),
LOGIN_MAGIC_LINK("login_magic_link"),
Expand All @@ -147,7 +148,8 @@ class UnifiedLoginTracker
SHOW_EMAIL_HINTS("show_email_hints"),
PASSWORD_CHALLENGE("password_challenge"),
NOT_A_JETPACK_SITE("not_a_jetpack_site"),
NO_JETPACK_SITES("no_jetpack_sites")
NO_JETPACK_SITES("no_jetpack_sites"),
WPCOM_WEB_START("wpcom_web_start")
}

enum class Click(val value: String) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package org.wordpress.android.ui.accounts.login

import android.content.Context

interface LoginPrologueListener {
// Login Prologue callbacks
fun showEmailLoginScreen()
fun showWPcomLoginScreen(context: Context)
fun loginViaSiteAddress()
}
Loading
Loading