Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Fixes #2859 - Removed code to select all of the edit field when it is…
Browse files Browse the repository at this point in the history
… the default valeu

Fixes #2859 Removed onclick listener whose sole purpose was to highlight default values and set focus
  • Loading branch information
daron-walters committed May 21, 2020
1 parent 7a566e2 commit 31109e5
Show file tree
Hide file tree
Showing 114 changed files with 1,232 additions and 5,091 deletions.
4 changes: 1 addition & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"

deps.telemetry.glean_unittests = "org.mozilla.telemetry:glean-forUnitTests:$project.ext.glean_version"

def getGitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
Expand Down Expand Up @@ -51,7 +49,7 @@ android {
minSdkVersion build_versions.min_sdk
targetSdkVersion build_versions.target_sdk
versionCode 1
versionName "11"
versionName "10"
buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\""
buildConfigField "Boolean", "DISABLE_CRASH_RESTART", getCrashRestartDisabled()
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
45 changes: 15 additions & 30 deletions app/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ distribution:
- https://github.com/MozillaReality/FirefoxReality/issues/1420
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/1854#issuecomment-546214568
- https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749
notification_emails:
- [email protected]
- [email protected]
expires: "2020-11-01"
expires: "2020-05-01"

url:
domains:
Expand All @@ -38,11 +37,10 @@ url:
- https://github.com/MozillaReality/FirefoxReality/issues/2230
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/2241#issuecomment-557740258
- https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749
notification_emails:
- [email protected]
- [email protected]
expires: "2020-11-01"
expires: "2020-05-01"
visits:
type: counter
send_in_pings:
Expand All @@ -53,11 +51,10 @@ url:
- https://github.com/MozillaReality/FirefoxReality/issues/2230
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/2241#issuecomment-557740258
- https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749
notification_emails:
- [email protected]
- [email protected]
expires: "2020-11-01"
expires: "2020-05-01"
query_type:
type: labeled_counter
description: >
Expand All @@ -70,11 +67,10 @@ url:
- https://github.com/MozillaReality/FirefoxReality/issues/2230
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/2241#issuecomment-557740258
- https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749
notification_emails:
- [email protected]
- [email protected]
expires: "2020-11-01"
expires: "2020-05-01"

searches:
counts:
Expand All @@ -85,11 +81,10 @@ searches:
- https://github.com/MozillaReality/FirefoxReality/issues/2230
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/2241#issuecomment-557740258
- https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749
notification_emails:
- [email protected]
- [email protected]
expires: "2020-11-01"
expires: "2020-05-01"

tabs:
opened:
Expand All @@ -112,11 +107,10 @@ tabs:
- https://github.com/MozillaReality/FirefoxReality/issues/1609
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837
- https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749
notification_emails:
- [email protected]
- [email protected]
expires: "2020-11-01"
expires: "2020-05-01"
activated:
type: counter
description: >
Expand All @@ -127,11 +121,10 @@ tabs:
- https://github.com/MozillaReality/FirefoxReality/issues/1609
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837
- https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749
notification_emails:
- [email protected]
- [email protected]
expires: "2020-11-01"
expires: "2020-05-01"

firefox_account:
sign_in:
Expand All @@ -142,11 +135,10 @@ firefox_account:
- https://github.com/MozillaReality/FirefoxReality/issues/1610
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837
- https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749
notification_emails:
- [email protected]
- [email protected]
expires: "2020-11-01"
expires: "2020-05-01"
sign_in_result:
type: event
description: >
Expand All @@ -158,11 +150,10 @@ firefox_account:
- https://github.com/MozillaReality/FirefoxReality/issues/1610
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837
- https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749
notification_emails:
- [email protected]
- [email protected]
expires: "2020-11-01"
expires: "2020-05-01"
sign_out:
type: event
description: >
Expand All @@ -171,11 +162,10 @@ firefox_account:
- https://github.com/MozillaReality/FirefoxReality/issues/1610
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837
- https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749
notification_emails:
- [email protected]
- [email protected]
expires: "2020-11-01"
expires: "2020-05-01"
bookmarks_sync_status:
type: boolean
lifetime: application
Expand All @@ -185,11 +175,10 @@ firefox_account:
- https://github.com/MozillaReality/FirefoxReality/issues/1610
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837
- https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749
notification_emails:
- [email protected]
- [email protected]
expires: "2020-11-01"
expires: "2020-05-01"
history_sync_status:
type: boolean
lifetime: application
Expand All @@ -199,11 +188,10 @@ firefox_account:
- https://github.com/MozillaReality/FirefoxReality/issues/1610
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837
- https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749
notification_emails:
- [email protected]
- [email protected]
expires: "2020-11-01"
expires: "2020-05-01"
tab_sent:
type: counter
description: >
Expand All @@ -212,11 +200,10 @@ firefox_account:
- https://github.com/MozillaReality/FirefoxReality/issues/1610
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837
- https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749
notification_emails:
- [email protected]
- [email protected]
expires: "2020-11-01"
expires: "2020-05-01"
received_tab:
type: labeled_counter
description: >
Expand All @@ -232,11 +219,10 @@ firefox_account:
- https://github.com/MozillaReality/FirefoxReality/issues/1610
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837
- https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749
notification_emails:
- [email protected]
- [email protected]
expires: "2020-11-01"
expires: "2020-05-01"

control:
open_new_window:
Expand All @@ -249,8 +235,7 @@ control:
- https://github.com/MozillaReality/FirefoxReality/issues/2347
data_reviews:
- https://github.com/MozillaReality/FirefoxReality/pull/2348#issuecomment-564736919
- https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749
notification_emails:
- [email protected]
- [email protected]
expires: "2020-11-01"
expires: "2020-05-01"
75 changes: 15 additions & 60 deletions app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import org.mozilla.vrbrowser.browser.Accounts;
import org.mozilla.vrbrowser.browser.PermissionDelegate;
import org.mozilla.vrbrowser.browser.SettingsStore;
import org.mozilla.vrbrowser.browser.engine.EngineProvider;
import org.mozilla.vrbrowser.browser.engine.Session;
import org.mozilla.vrbrowser.browser.engine.SessionStore;
import org.mozilla.vrbrowser.crashreporting.CrashReporterService;
Expand Down Expand Up @@ -97,8 +96,6 @@
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.function.Consumer;

import static org.mozilla.vrbrowser.ui.widgets.UIWidget.REMOVE_WIDGET;

public class VRBrowserActivity extends PlatformActivity implements WidgetManagerDelegate, ComponentCallbacks2, LifecycleOwner, ViewModelStoreOwner {

private BroadcastReceiver mCrashReceiver = new BroadcastReceiver() {
Expand Down Expand Up @@ -171,7 +168,6 @@ public void run() {
NavigationBarWidget mNavigationBar;
CrashDialogWidget mCrashDialog;
TrayWidget mTray;
WhatsNewWidget mWhatsNewWidget = null;
WebXRInterstitialWidget mWebXRInterstitial;
PermissionDelegate mPermissionDelegate;
LinkedList<UpdateListener> mWidgetUpdateListeners;
Expand All @@ -193,7 +189,6 @@ public void run() {
private Widget mActiveDialog;
private Set<String> mPoorPerformanceWhiteList;
private float mCurrentCylinderDensity = 0;
private boolean mHideWebXRIntersitial = false;

private boolean callOnAudioManager(Consumer<AudioManager> fn) {
if (mAudioManager == null) {
Expand Down Expand Up @@ -257,8 +252,6 @@ protected void onCreate(Bundle savedInstanceState) {
SessionStore.get().initializeStores(this);
SessionStore.get().setLocales(LocaleUtils.getPreferredLanguageTags(this));

EngineProvider.INSTANCE.getOrCreateRuntime(this).appendAppNotesToCrashReport("Firefox Reality " + BuildConfig.VERSION_NAME + "-" + BuildConfig.VERSION_CODE + "-" + BuildConfig.FLAVOR + "-" + BuildConfig.BUILD_TYPE + " (" + BuildConfig.GIT_HASH + ")");

// Create broadcast receiver for getting crash messages from crash process
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(CrashReporterService.CRASH_ACTION);
Expand Down Expand Up @@ -387,10 +380,10 @@ public void onWindowVideoAvailabilityChanged(@NonNull WindowWidget aWindow) {

// Show the what's upp dialog if we haven't showed it yet and this is v6.
if (!SettingsStore.getInstance(this).isWhatsNewDisplayed()) {
mWhatsNewWidget = new WhatsNewWidget(this);
mWhatsNewWidget.setLoginOrigin(Accounts.LoginOrigin.NONE);
mWhatsNewWidget.getPlacement().parentHandle = mWindows.getFocusedWindow().getHandle();
mWhatsNewWidget.show(UIWidget.REQUEST_FOCUS);
final WhatsNewWidget whatsNew = new WhatsNewWidget(this);
whatsNew.setLoginOrigin(Accounts.LoginOrigin.NONE);
whatsNew.getPlacement().parentHandle = mWindows.getFocusedWindow().getHandle();
whatsNew.show(UIWidget.REQUEST_FOCUS);
}
}

Expand Down Expand Up @@ -620,20 +613,6 @@ void loadFromIntent(final Intent intent) {
uri = Uri.parse(SettingsStore.getInstance(this).getHomepage());
}
}

if (extras.containsKey("hide_webxr_interstitial")) {
mHideWebXRIntersitial = extras.getBoolean("hide_webxr_interstitial", false);
if (mHideWebXRIntersitial) {
setWebXRIntersitialState(WEBXR_INTERSTITIAL_HIDDEN);
}
}

if (extras.containsKey("hide_whats_new")) {
boolean hideWhatsNew = extras.getBoolean("hide_whats_new", false);
if (hideWhatsNew && mWhatsNewWidget != null) {
mWhatsNewWidget.hide(REMOVE_WIDGET);
}
}
}

// If there is a URI we open it
Expand Down Expand Up @@ -747,7 +726,7 @@ public void onBackPressed() {
new String[]{
getString(R.string.exit_confirm_dialog_button_cancel),
getString(R.string.exit_confirm_dialog_button_quit),
}, (index, isChecked) -> {
}, index -> {
if (index == PromptDialogWidget.POSITIVE) {
VRBrowserActivity.super.onBackPressed();
}
Expand Down Expand Up @@ -1048,7 +1027,7 @@ void onEnterWebXR() {

@Keep
@SuppressWarnings("unused")
void onExitWebXR(long aCallback) {
void onExitWebXR() {
if (Thread.currentThread() == mUiThread) {
return;
}
Expand All @@ -1070,29 +1049,19 @@ void onExitWebXR(long aCallback) {
if (!mWindows.isPaused()) {
Log.d(LOGTAG, "Compositor resume begin");
mWindows.resumeCompositor();
if (aCallback != 0) {
queueRunnable(() -> runCallbackNative(aCallback));
}
Log.d(LOGTAG, "Compositor resume end");
}
}, 20);
}
@Keep
@SuppressWarnings("unused")
void onDismissWebXRInterstitial() {
runOnUiThread(() -> {
for (WebXRListener listener: mWebXRListeners) {
listener.onDismissWebXRInterstitial();
}
});
}

@Keep
@SuppressWarnings("unused")
void onWebXRRenderStateChange(boolean aRendering) {
runOnUiThread(() -> {
for (WebXRListener listener: mWebXRListeners) {
listener.onWebXRRenderStateChange(aRendering);
runOnUiThread(new Runnable() {
@Override
public void run() {
for (WebXRListener listener: mWebXRListeners) {
listener.onDismissWebXRInterstitial();
}
}
});
}
Expand Down Expand Up @@ -1165,7 +1134,7 @@ public int getPointerColor() {
@Keep
@SuppressWarnings("unused")
private void setDeviceType(int aType) {
if (DeviceType.isOculusBuild() || DeviceType.isWaveBuild()) {
if (DeviceType.isOculusBuild()) {
runOnUiThread(() -> DeviceType.setType(aType));
}
}
Expand All @@ -1178,7 +1147,7 @@ private void haltActivity(final int aReason) {
mWindows.getFocusedWindow().showAlert(
getString(R.string.not_entitled_title),
getString(R.string.not_entitled_message, getString(R.string.app_name)),
(index, isChecked) -> finish());
index -> finish());
}
});
}
Expand All @@ -1204,10 +1173,7 @@ private void handlePoorPerformance() {
}
window.getSession().loadHomePage();
final String[] buttons = {getString(R.string.ok_button), getString(R.string.performance_unblock_page)};
window.showConfirmPrompt(getString(R.string.performance_title),
getString(R.string.performance_message),
buttons,
(index, isChecked) -> {
window.showConfirmPrompt(getString(R.string.performance_title), getString(R.string.performance_message), buttons, index -> {
if (index == PromptDialogWidget.NEGATIVE) {
mPoorPerformanceWhiteList.add(originalUri);
window.getSession().loadUri(originalUri);
Expand Down Expand Up @@ -1243,12 +1209,6 @@ private void disableLayers() {
});
}

@Keep
@SuppressWarnings("unused")
private void appendAppNotesToCrashReport(String aNotes) {
runOnUiThread(() -> EngineProvider.INSTANCE.getOrCreateRuntime(VRBrowserActivity.this).appendAppNotesToCrashReport(aNotes));
}

private SurfaceTexture createSurfaceTexture() {
int[] ids = new int[1];
GLES20.glGenTextures(1, ids, 0);
Expand Down Expand Up @@ -1485,11 +1445,6 @@ public void setWebXRIntersitialState(@WebXRInterstitialState int aState) {
queueRunnable(() -> setWebXRIntersitialStateNative(aState));
}

@Override
public boolean isWebXRIntersitialHidden() {
return mHideWebXRIntersitial;
}

@Override
public void addConnectivityListener(Delegate aListener) {
if (!mConnectivityListeners.contains(aListener)) {
Expand Down
Loading

0 comments on commit 31109e5

Please sign in to comment.