Created
February 5, 2015 09:48
-
-
Save RussellCollins/3ce44395e9c7c6c35b35 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
package com.factorypatterndemo.utils.factories; | |
import android.os.Build; | |
import com.factorypatterndemo.utils.helpers.AsusNexus72012sdk21SystemDateTimeViewHelper; | |
import com.factorypatterndemo.utils.helpers.SamsungGalaxyS5sdk19SystemDateTimeViewHelper; | |
import com.factorypatterndemo.utils.interfaces.SystemUiDateTimeViewHelperInterface; | |
public class SystemUiDateTimeViewHelperFactory { | |
static String galaxyS5_sdk19_fingerprint = "samsung/kltedx/klte:4.4.2/KOT49H/G900FDXU1ANG4:user/release-keys"; | |
static String asusNexus72012_sdk21_fingerprint = "google/nakasi/grouper:5.0.2/LRX22G/1649326:user/release-keys"; | |
public static SystemUiDateTimeViewHelperInterface create() { | |
String fingerprint = Build.FINGERPRINT; | |
if (fingerprint.equals(asusNexus72012_sdk21_fingerprint)) { | |
return new AsusNexus72012sdk21SystemDateTimeViewHelper(); | |
} | |
if (fingerprint.equals(galaxyS5_sdk19_fingerprint)) { | |
return new SamsungGalaxyS5sdk19SystemDateTimeViewHelper(); | |
} | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment