我想在App API的代码源中按下硬件后退按钮时删除应用程序中存在的代码行 . 这是app.js中我想要更改的代码:

App.prototype.goBack = function() {
    if (this._menuCtrl && this._menuCtrl.isOpen()) {
        return this._menuCtrl.close();
    }
    var navPromise = this.navPop();
    if (navPromise === null) {
        // no views to go back to
        // let's exit the app
        if (this._config.getBoolean('navExitApp', true)) {
            (void 0) /* console.debug */ ;
             this._plt.exitApp();
        }
    }
    return navPromise;
};

我想要做的就是删除this._plt.exitApp();除了直接更改代码源之外,还有其他干净的方法吗?我尝试了它的方法registerBackButtonAction(fn, priority),但它在三星A3 2014上真的太慢了(650毫秒) . 当我直接更改代码源时,性能非常好 . 干净利落的方式有什么办法吗?