[Android Head-Units] blacklistedcard:
I just cracked my screen. Summer is sending me two touch glass replacements. I'll report back if I was successful.

---------- Post added at 02:09 AM ---------- Previous post was at 02:00 AM ----------

I guess we could start thinking about adding more car support for the CANBUS..

package com.android.internal.car.can;

2

3 import android.os.Bundle;

4 import android.util.Slog;

5

6 public class Sonata8 {

7 public static final String ACTION_CANBUS_SONATA8 = "com.bonovo.canbus.Sonata8";

8 public static final String ACTION_SHOW = "com.android.internal.car.can";

9 public static final String BUNDLE_NAME = "sonata8_bundle";

10 public static final String EXTRA_SHOW = "show";

11 public static final String KEY_EQ_BASS = "eq_bass";

12 public static final String KEY_EQ_MID = "eq_mid";

13 public static final String KEY_EQ_TREBLE = "eq_treble";

14 public static final String KEY_S8_VOLUME = "s8_volume";

15 public static final String KEY_VOLUME_FRONT_AND_REAR = "volume_front_rear";

16 public static final String KEY_VOLUME_LEFT_AND_RIGHT = "volume_left_right";

17 private static final boolean LOCAL_LOGD = true;

18 private static final String TAG = "Sonata8";

19 private int mBalanceFrontAndRear = 0;

20 private int mBalanceLeftAndRight = 0;

21 private int mVolumeEQBass = 0;

22 private int mVolumeEQMid = 0;

23 private int mVolumeEQTreble = 0;

24 private int mVolume = 0;

25

26 public Sonata8() {

27 }

28

29 public Sonata8(int frontRear, int leftRight, int eqBass, int eqMid, int eqTreble, int volume) {

30 mBalanceFrontAndRear = frontRear;

31 mBalanceLeftAndRight = leftRight;

32 mVolumeEQBass = eqBass;

33 mVolumeEQMid = eqMid;

34 mVolumeEQTreble = eqTreble;

35 mVolume = volume;

36 }

37

38 public int getBalanceFrontAndRear() {

39 return mBalanceFrontAndRear;

40 }

41

42 public int getBalanceLeftAndRight() {

43 return mBalanceLeftAndRight;

44 }

45

46 public int getVolumeEQBass() {

47 return mVolumeEQBass;

48 }

49

50 public int getVolumeEQMid() {

51 return mVolumeEQMid;

52 }

53

54 public int getVolumeEQTreble() {

55 return mVolumeEQTreble;

56 }

57

58 public int getVolume() {

59 return mVolume;

60 }

61

62 public void setBalanceFrontAndRear(int volume) {

63 mBalanceFrontAndRear = volume;

64 Slog.v("Sonata8", "myu Class-->Sonata8 setBalanceFrontAndRear() mBalanceFrontAndRear =" + mBalanceFrontAndRear);

65 }

66

67 public void setBalanceLeftAndRight(int volume) {

68 mBalanceLeftAndRight = volume;

69 Slog.v("Sonata8", "myu Class-->Sonata8 setBalanceLeftAndRight() mBalanceLeftAndRight =" + mBalanceLeftAndRight);

70 }

71

72 public void setVolumeEQBass(int volume) {

73 mVolumeEQBass = volume;

74 Slog.v("Sonata8", "myu Class-->Sonata8 setVolumeEQBass()mVolumeEQBass =" + mVolumeEQBass);

75 }

76

77 public void setVolumeEQMid(int volume) {

78 mVolumeEQMid = volume;

79 Slog.v("Sonata8", "myu Class-->Sonata8 setVolumeEQMid() mVolumeEQMid=" + mVolumeEQMid);

80 }

81

82 public void setVolumeEQTreble(int volume) {

83 mVolumeEQTreble = volume;

84 Slog.v("Sonata8", "myu Class-->Sonata8 setVolumeEQTreble() mVolumeEQTreble =" + mVolumeEQTreble);

85 }

86

87 public void setVolume(int volume) {

88 mVolume = volume;

89 Slog.v("Sonata8", "myu Class-->Sonata8 setVolume() mVolume =" + mVolume);

90 }

91

92 public String toString() {

93 return "FrontAndRear:" + mBalanceFrontAndRear + " LeftAndRightt:" + mBalanceLeftAndRight + " EQBass:" + mVolumeEQBass + " EQMid:" + mVolumeEQMid + " VolumeEQTreblet:" + mVolumeEQTreble + " S8Volume:" + mVolume;

94 }

95

96 public Bundle toBundle() {

97 Bundle bundle = new Bundle();

98 Slog.v("Sonata8", "myu Class-->Sonata8 toBundle()");

99 bundle.putInt("volume_front_rear", mBalanceFrontAndRear);

100 bundle.putInt("volume_left_right", mBalanceLeftAndRight);

101 bundle.putInt("eq_bass", mVolumeEQBass);

102 bundle.putInt("eq_mid", mVolumeEQMid);

103 bundle.putInt("eq_treble", mVolumeEQTreble);

104 bundle.putInt("s8_volume", mVolume);

105 return bundle;

106 }

107

108 public static Sonata8 bundle2Radar(Bundle bundle) {

109 return new Sonata8(getInt("volume_front_rear"), getInt("volume_left_right"), getInt("eq_bass"), getInt("eq_mid"), getInt("eq_treble"), getInt("s8_volume"));

110 }

111 }

