Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d1a2694 authored by Andrew Sapperstein's avatar Andrew Sapperstein
Browse files

Remove ToastController.

Wasn't meant to be submitted.

Change-Id: Icc94daaf47ed85cefb59f20928241ef38d5ee2ca
(cherry picked from commit 17047d19)
parent 12344c5f
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -682,9 +682,6 @@ public class SettingsActivity extends SettingsDrawerActivity
            }
        }

        // Will remove this line before submitting.
        FeatureFactory.getFactory(this).createToastController().makeToast(this);

        if (DEBUG_TIMING) Log.d(LOG_TAG, "onCreate took " + (System.currentTimeMillis() - startTime)
                + " ms");
    }
+1 −7
Original line number Diff line number Diff line
@@ -59,13 +59,7 @@ public abstract class FeatureFactory {
        return sFactory;
    }

    /**
     * Creates stub controller that makes {@link android.widget.Toast}s.
     * Will be removed before submitting.
     */
    public abstract ToastController createToastController();

    public static class FactoryNotFoundException extends RuntimeException {
    public static final class FactoryNotFoundException extends RuntimeException {
        public FactoryNotFoundException(Throwable throwable) {
            super("Unable to create factory. Did you misconfigure Proguard?", throwable);
        }
+0 −12
Original line number Diff line number Diff line
@@ -16,20 +16,8 @@

package com.android.settings.overlay;

import android.content.Context;
import android.widget.Toast;

/**
 * {@link FeatureFactory} implementation for AOSP Settings.
 */
public class FeatureFactoryImpl extends FeatureFactory {
    @Override
    public ToastController createToastController() {
        return new ToastController() {
            @Override
            public void makeToast(Context context) {
                Toast.makeText(context, "Here's a piece of AOSP toast", Toast.LENGTH_LONG).show();
            }
        };
    }
}
+0 −10
Original line number Diff line number Diff line
package com.android.settings.overlay;

import android.content.Context;

/**
 * Will be removed before submitting. Just a proof of concept for review.
 */
public interface ToastController {
    void makeToast(Context context);
}