forked from Igalia/wolvic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'source/release/0.9.5' into wave/rc_from…
…_7_8_22_with_0_9_5
- Loading branch information
Showing
19 changed files
with
490 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Wolvic Release Notes | ||
|
||
## version 0.9.5 | ||
* Restored Firefox Accounts synchronization. You can now sync your bookmarks and send tabs between devices running Firefox and Wolvic. | ||
* Ability to select a default search engine. To change your search engine, open the Settings window, select “Privacy & Security”, and then the “Edit” button that accompanies the “Search engine” option. The engine you have set will appear below the “Search engine” label. | ||
* Added Wolvic's privacy policy. | ||
* Added some changes to address 6DoF controller problems in the latest Huawei VR SDK. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
app/src/common/shared/com/igalia/wolvic/ui/widgets/dialogs/PrivacyPolicyDialogWidget.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*- | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
package com.igalia.wolvic.ui.widgets.dialogs; | ||
|
||
import android.content.Context; | ||
import android.content.res.Configuration; | ||
import android.view.LayoutInflater; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.databinding.DataBindingUtil; | ||
|
||
import com.igalia.wolvic.R; | ||
import com.igalia.wolvic.databinding.PrivacyPolicyDialogBinding; | ||
import com.igalia.wolvic.ui.widgets.WidgetPlacement; | ||
import com.igalia.wolvic.ui.widgets.WindowWidget; | ||
|
||
/** | ||
* A dialog that displays the Privacy Policy along with two buttons to accept or reject it. | ||
*/ | ||
public class PrivacyPolicyDialogWidget extends UIDialog { | ||
|
||
public interface Delegate { | ||
void onUserResponse(boolean response); | ||
} | ||
|
||
private PrivacyPolicyDialogBinding mBinding; | ||
private Delegate mPrivacyDialogDelegate; | ||
|
||
public PrivacyPolicyDialogWidget(Context aContext) { | ||
super(aContext); | ||
initialize(aContext); | ||
} | ||
|
||
protected void initialize(Context aContext) { | ||
updateUI(); | ||
} | ||
|
||
@Override | ||
public void onConfigurationChanged(Configuration newConfig) { | ||
super.onConfigurationChanged(newConfig); | ||
updateUI(); | ||
} | ||
|
||
public void updateUI() { | ||
removeAllViews(); | ||
|
||
LayoutInflater inflater = LayoutInflater.from(getContext()); | ||
|
||
// Inflate this data binding layout | ||
mBinding = DataBindingUtil.inflate(inflater, R.layout.privacy_policy_dialog, this, true); | ||
|
||
mBinding.acceptButton.setOnClickListener(v -> { | ||
if (mPrivacyDialogDelegate != null) { | ||
mPrivacyDialogDelegate.onUserResponse(true); | ||
} | ||
onDismiss(); | ||
}); | ||
mBinding.declineButton.setOnClickListener(v -> { | ||
if (mPrivacyDialogDelegate != null) { | ||
mPrivacyDialogDelegate.onUserResponse(false); | ||
} | ||
onDismiss(); | ||
}); | ||
} | ||
|
||
public void setDelegate(Delegate delegate) { | ||
mPrivacyDialogDelegate = delegate; | ||
} | ||
|
||
@Override | ||
public void onWorldClick() { | ||
// ignored: this is a modal dialog | ||
} | ||
|
||
@Override | ||
public void attachToWindow(@NonNull WindowWidget window) { | ||
mWidgetPlacement.parentHandle = window.getHandle(); | ||
} | ||
|
||
@Override | ||
protected void initializeWidgetPlacement(WidgetPlacement aPlacement) { | ||
aPlacement.visible = false; | ||
aPlacement.width = WidgetPlacement.dpDimension(getContext(), R.dimen.settings_dialog_width); | ||
aPlacement.height = WidgetPlacement.dpDimension(getContext(), R.dimen.privacy_options_height); | ||
aPlacement.parentAnchorX = 0.5f; | ||
aPlacement.parentAnchorY = 0.0f; | ||
aPlacement.anchorX = 0.5f; | ||
aPlacement.anchorY = 0.5f; | ||
aPlacement.translationY = WidgetPlacement.unitFromMeters(getContext(), R.dimen.settings_world_y) - | ||
WidgetPlacement.unitFromMeters(getContext(), R.dimen.window_world_y); | ||
aPlacement.translationZ = WidgetPlacement.unitFromMeters(getContext(), R.dimen.settings_world_z) - | ||
WidgetPlacement.unitFromMeters(getContext(), R.dimen.window_world_z); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
app/src/common/shared/com/igalia/wolvic/ui/widgets/settings/PrivacyPolicyView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package com.igalia.wolvic.ui.widgets.settings; | ||
|
||
import android.content.Context; | ||
import android.graphics.Point; | ||
import android.view.LayoutInflater; | ||
|
||
import androidx.databinding.DataBindingUtil; | ||
|
||
import com.igalia.wolvic.R; | ||
import com.igalia.wolvic.databinding.OptionsPrivacyPolicyBinding; | ||
import com.igalia.wolvic.ui.widgets.WidgetManagerDelegate; | ||
import com.igalia.wolvic.ui.widgets.WidgetPlacement; | ||
|
||
/** | ||
* A SettingsView that displays Wolvic's Privacy Policy. | ||
* The content itself is shared with PrivacyPolicyDialogWidget. | ||
*/ | ||
public class PrivacyPolicyView extends SettingsView { | ||
|
||
private OptionsPrivacyPolicyBinding mBinding; | ||
|
||
public PrivacyPolicyView(Context aContext, WidgetManagerDelegate aWidgetManager) { | ||
super(aContext, aWidgetManager); | ||
initialize(aContext); | ||
} | ||
|
||
private void initialize(Context aContext) { | ||
updateUI(); | ||
} | ||
|
||
@Override | ||
protected void updateUI() { | ||
super.updateUI(); | ||
|
||
LayoutInflater inflater = LayoutInflater.from(getContext()); | ||
|
||
// Inflate this data binding layout | ||
mBinding = DataBindingUtil.inflate(inflater, R.layout.options_privacy_policy, this, true); | ||
|
||
mScrollbar = mBinding.scrollbar; | ||
|
||
// Header | ||
mBinding.headerLayout.setBackClickListener(view -> { | ||
mDelegate.showView(SettingViewType.PRIVACY); | ||
}); | ||
} | ||
|
||
@Override | ||
public Point getDimensions() { | ||
return new Point(WidgetPlacement.dpDimension(getContext(), R.dimen.settings_dialog_width), | ||
WidgetPlacement.dpDimension(getContext(), R.dimen.privacy_options_height)); | ||
} | ||
|
||
@Override | ||
protected SettingViewType getType() { | ||
return SettingViewType.PRIVACY_POLICY; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:id="@+id/optionsLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@drawable/dialog_background" | ||
android:paddingStart="30dp" | ||
android:paddingEnd="30dp"> | ||
|
||
<com.igalia.wolvic.ui.widgets.settings.SettingsHeader | ||
android:id="@+id/header_layout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:helpVisibility="gone" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:title="@string/settings_privacy_policy" /> | ||
|
||
<com.igalia.wolvic.ui.views.CustomScrollView | ||
android:id="@+id/scrollbar" | ||
style="@style/customScrollViewStyle" | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_marginTop="10dp" | ||
android:layout_marginBottom="30dp" | ||
android:paddingEnd="30dp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/header_layout"> | ||
|
||
<include layout="@layout/privacy_policy_content" /> | ||
|
||
</com.igalia.wolvic.ui.views.CustomScrollView> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |
Oops, something went wrong.