Skip to content

Commit

Permalink
Standardize macos namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
joshliebe committed Nov 7, 2023
1 parent ada67d2 commit fc9a4b1
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion macos/macos-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {
apply from: "$rootProject.projectDir/gradle/android-library.gradle"

android {
namespace 'com.duckduckgo.macos_impl'
namespace 'com.duckduckgo.macos.impl'
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions macos/macos-impl/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.duckduckgo.macos_impl">
package="com.duckduckgo.macos.impl">

<application android:supportsRtl="true">
<activity
Expand All @@ -24,7 +24,7 @@
android:label="@string/macos_app"
android:parentActivityName="com.duckduckgo.app.settings.SettingsActivity" />
<receiver
android:name=".MacOsLinkShareBroadcastReceiver"
android:name="com.duckduckgo.macos.impl.MacOsLinkShareBroadcastReceiver"
android:exported="false" />
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 DuckDuckGo
* Copyright (c) 2023 DuckDuckGo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.duckduckgo.macos_impl
package com.duckduckgo.macos.impl

import android.annotation.SuppressLint
import android.app.PendingIntent
Expand All @@ -29,10 +29,11 @@ import com.duckduckgo.anvil.annotations.InjectWith
import com.duckduckgo.app.global.DuckDuckGoActivity
import com.duckduckgo.di.scopes.ActivityScope
import com.duckduckgo.macos.api.MacOsScreenWithEmptyParams
import com.duckduckgo.macos_impl.MacOsViewModel.Command
import com.duckduckgo.macos_impl.MacOsViewModel.Command.GoToWindowsClientSettings
import com.duckduckgo.macos_impl.MacOsViewModel.Command.ShareLink
import com.duckduckgo.macos_impl.databinding.ActivityMacosBinding
import com.duckduckgo.macos.impl.MacOsViewModel.Command
import com.duckduckgo.macos.impl.MacOsViewModel.Command.GoToWindowsClientSettings
import com.duckduckgo.macos.impl.MacOsViewModel.Command.ShareLink
import com.duckduckgo.macos.impl.R.string
import com.duckduckgo.macos.impl.databinding.ActivityMacosBinding
import com.duckduckgo.mobile.android.ui.viewbinding.viewBinding
import com.duckduckgo.navigation.api.GlobalActivityStarter
import com.duckduckgo.windows.api.ui.WindowsScreenWithEmptyParams
Expand Down Expand Up @@ -90,8 +91,8 @@ class MacOsActivity : DuckDuckGoActivity() {
private fun launchSharePageChooser() {
val share = Intent(Intent.ACTION_SEND).apply {
type = "text/html"
putExtra(Intent.EXTRA_TEXT, getString(R.string.macos_share_text))
putExtra(Intent.EXTRA_TITLE, getString(R.string.macos_share_title))
putExtra(Intent.EXTRA_TEXT, getString(string.macos_share_text))
putExtra(Intent.EXTRA_TITLE, getString(string.macos_share_title))
}

val pi = PendingIntent.getBroadcast(
Expand All @@ -101,7 +102,7 @@ class MacOsActivity : DuckDuckGoActivity() {
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE,
)
try {
startActivity(Intent.createChooser(share, getString(R.string.macos_share_title), pi.intentSender))
startActivity(Intent.createChooser(share, getString(string.macos_share_title), pi.intentSender))
} catch (e: ActivityNotFoundException) {
Timber.w(e, "Activity not found")
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 DuckDuckGo
* Copyright (c) 2023 DuckDuckGo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,15 +14,15 @@
* limitations under the License.
*/

package com.duckduckgo.macos_impl
package com.duckduckgo.macos.impl

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.duckduckgo.anvil.annotations.InjectWith
import com.duckduckgo.app.statistics.pixels.Pixel
import com.duckduckgo.di.scopes.ReceiverScope
import com.duckduckgo.macos_impl.MacOsPixelNames.MACOS_WAITLIST_SHARE_SHARED
import com.duckduckgo.macos.impl.MacOsPixelNames.MACOS_WAITLIST_SHARE_SHARED
import dagger.android.AndroidInjection
import javax.inject.Inject

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.duckduckgo.macos_impl
package com.duckduckgo.macos.impl

import com.duckduckgo.app.statistics.pixels.Pixel

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 DuckDuckGo
* Copyright (c) 2023 DuckDuckGo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,16 +14,16 @@
* limitations under the License.
*/

package com.duckduckgo.macos_impl
package com.duckduckgo.macos.impl

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.duckduckgo.anvil.annotations.ContributesViewModel
import com.duckduckgo.app.statistics.pixels.Pixel
import com.duckduckgo.di.scopes.AppScope
import com.duckduckgo.macos_impl.MacOsPixelNames.MACOS_WAITLIST_SHARE_PRESSED
import com.duckduckgo.macos_impl.MacOsViewModel.Command.GoToWindowsClientSettings
import com.duckduckgo.macos_impl.MacOsViewModel.Command.ShareLink
import com.duckduckgo.macos.impl.MacOsPixelNames.MACOS_WAITLIST_SHARE_PRESSED
import com.duckduckgo.macos.impl.MacOsViewModel.Command.GoToWindowsClientSettings
import com.duckduckgo.macos.impl.MacOsViewModel.Command.ShareLink
import javax.inject.Inject
import kotlinx.coroutines.channels.BufferOverflow
import kotlinx.coroutines.channels.Channel
Expand Down
2 changes: 1 addition & 1 deletion macos/macos-impl/src/main/res/layout/activity_macos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MacOsActivity">
tools:context="com.duckduckgo.macos.impl.MacOsActivity">

<include
android:id="@+id/includeToolbar"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 DuckDuckGo
* Copyright (c) 2023 DuckDuckGo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,16 +14,15 @@
* limitations under the License.
*/

package com.duckduckgo.macos_impl.waitlist.ui
package com.duckduckgo.macos.impl

import androidx.test.ext.junit.runners.AndroidJUnit4
import app.cash.turbine.test
import com.duckduckgo.app.CoroutineTestRule
import com.duckduckgo.app.statistics.pixels.Pixel
import com.duckduckgo.macos_impl.MacOsPixelNames.MACOS_WAITLIST_SHARE_PRESSED
import com.duckduckgo.macos_impl.MacOsViewModel
import com.duckduckgo.macos_impl.MacOsViewModel.Command.GoToWindowsClientSettings
import com.duckduckgo.macos_impl.MacOsViewModel.Command.ShareLink
import com.duckduckgo.macos.impl.MacOsPixelNames.MACOS_WAITLIST_SHARE_PRESSED
import com.duckduckgo.macos.impl.MacOsViewModel.Command.GoToWindowsClientSettings
import com.duckduckgo.macos.impl.MacOsViewModel.Command.ShareLink
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runTest
import org.junit.Assert.*
Expand Down

0 comments on commit fc9a4b1

Please sign in to comment.