app/src/main/java/fr/neamar/kiss/MainActivity.java
/**
     * Restart if required,
     * Hide the kissbar by default
     */
Restart if required,
Hide the kissbar by default
Restart if required Hide the kissbar by default
@SuppressLint("CommitPrefEdits")
    protected void onResume() {
        Log.d(TAG, "onResume()");
        if (prefs.getBoolean("require-layout-update", false)) {
            super.onResume();
            Log.i(TAG, "Restarting app after setting changes");
            prefs.edit().putBoolean("require-layout-update", false).apply();
            this.recreate();
            return;
        }
        dismissPopup();
        if (KissApplication.getApplication(this).getDataHandler().allProvidersHaveLoaded) {
            displayLoader(false);
            onFavoriteChange();
        }
        updateSearchRecords(true);
        displayClearOnInput();
        if (isViewingAllApps()) {
            displayKissBar(false);
        }
        forwarderManager.onResume();
        super.onResume();
    }
@ SuppressLint ( "CommitPrefEdits" ) protected void onResume ( ) { Log . d ( TAG , "onResume()" ) ; if ( prefs . getBoolean ( "require-layout-update" , false ) ) { super . onResume ( ) ; Log . i ( TAG , "Restarting app after setting changes" ) ; prefs . edit ( ) . putBoolean ( "require-layout-update" , false ) . apply ( ) ; this . recreate ( ) ; return ; } dismissPopup ( ) ; if ( KissApplication . getApplication ( this ) . getDataHandler ( ) . allProvidersHaveLoaded ) { displayLoader ( false ) ; onFavoriteChange ( ) ; } updateSearchRecords ( true ) ; displayClearOnInput ( ) ; if ( isViewingAllApps ( ) ) { displayKissBar ( false ) ; } forwarderManager . onResume ( ) ; super . onResume ( ) ; }
Restart if required,
 Hide the kissbar by default
Restart if required Hide the kissbar by default
// Restart current activity to refresh view, since some preferences // may require using a new UI // We need to update the history in case an external event created new items // (for instance, installed a new app, got a phone call or simply clicked on a favorite)