Guest User

WatchFaceConfig.java

a guest
Oct 9th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 184.71 KB | None | 0 0
  1. package com.huami.watch.watchface.util;
  2.  
  3. import android.content.Context;
  4. import android.content.SharedPreferences;
  5. import android.content.res.Resources;
  6. import android.graphics.Bitmap;
  7. import android.graphics.BitmapFactory;
  8. import android.graphics.Canvas;
  9. import android.graphics.Color;
  10. import android.graphics.ColorFilter;
  11. import android.graphics.Paint;
  12. import android.graphics.PorterDuff;
  13. import android.graphics.PorterDuffColorFilter;
  14. import android.graphics.RectF;
  15. import android.graphics.drawable.BitmapDrawable;
  16. import android.graphics.drawable.Drawable;
  17. import android.util.Log;
  18. import android.util.SparseArray;
  19. import com.huami.watch.watchface.loader.WatchFaceExternalLoader;
  20. import com.huami.watch.watchface.loader.WfzConstansGTR;
  21. import com.huami.watch.watchface.loader.WfzConstants;
  22. import com.huami.watch.watchface.model.WatchFaceComponent;
  23. import com.huami.watch.watchface.model.WatchFaceComponentItem;
  24. import com.huami.watch.watchface.model.WatchFaceModule;
  25. import com.huami.watch.watchface.model.WatchFaceModuleItem;
  26. import com.huami.watch.watchface.widget.ImageFont;
  27. import com.ingenic.iwds.slpt.view.utils.SimpleFile;
  28. import java.io.ByteArrayOutputStream;
  29. import java.io.File;
  30. import java.io.FileInputStream;
  31. import java.io.FileNotFoundException;
  32. import java.io.FileOutputStream;
  33. import java.io.FilenameFilter;
  34. import java.io.IOException;
  35. import java.io.InputStream;
  36. import java.util.ArrayList;
  37. import java.util.Iterator;
  38. import java.util.List;
  39. import org.json.JSONException;
  40. import org.json.JSONObject;
  41.  
  42. public class WatchFaceConfig {
  43. private static int arcIndex = 0;
  44.  
  45. public static DateDigital mDateDigital;
  46.  
  47. private String INTERNAL_PATH;
  48.  
  49. private Drawable mBgDrawable;
  50.  
  51. private String mBgPathSlpt;
  52.  
  53. private String mBgPathSlpt26W;
  54.  
  55. private int mBgType = -1;
  56.  
  57. private Context mContext;
  58.  
  59. private WatchFaceExternalLoader mExternalLoader;
  60.  
  61. private Drawable mGraduation;
  62.  
  63. private String mGraduationSlptPath;
  64.  
  65. private String mGraduationSlptPath26W;
  66.  
  67. private int mGraduationType = -1;
  68.  
  69. private GtrDatehand mGtrDatehand = null;
  70.  
  71. private GtrTimehand mGtrTimehand = null;
  72.  
  73. private GtrWeather mGtrWeather = null;
  74.  
  75. private ArrayList<GtrWidgetConfig> mGtrWidgets = new ArrayList<GtrWidgetConfig>();
  76.  
  77. private List<IconWidget> mIconWidgets = new ArrayList<IconWidget>();
  78.  
  79. private String mLowPowerIconSlptPath;
  80.  
  81. private int mLowPowerIconType = -1;
  82.  
  83. private int mLowPowerX = Integer.MIN_VALUE;
  84.  
  85. private int mLowPowerY = Integer.MIN_VALUE;
  86.  
  87. private int mStatusBarPosX = Integer.MIN_VALUE;
  88.  
  89. private int mStatusBarPosY = Integer.MIN_VALUE;
  90.  
  91. private boolean mSupport26W = false;
  92.  
  93. private TimeDigital mTimeDigital;
  94.  
  95. private TimeDisplay mTimeDis;
  96.  
  97. private TimeHand mTimeHand;
  98.  
  99. private String mTimeHandHourSlpt26WPath;
  100.  
  101. private String mTimeHandHourSlptPath;
  102.  
  103. private String mTimeHandMinuteSlpt26WPath;
  104.  
  105. private String mTimeHandMinuteSlptPath;
  106.  
  107. private String mTimeHandSecondsSlpt26WPath;
  108.  
  109. private String mTimeHandSecondsSlptPath;
  110.  
  111. private int mTimeHandType = -1;
  112.  
  113. private String mWatchFaceName;
  114.  
  115. private ArrayList<WatchFaceConfigTemplate.DataWidgetConfig> mWidgets = new ArrayList<WatchFaceConfigTemplate.DataWidgetConfig>();
  116.  
  117. private WatchFaceConfig() {
  118. arcIndex = 0;
  119. }
  120.  
  121. private static boolean contantsInList(String[] paramArrayOfString, String paramString) {
  122. if (paramArrayOfString != null) {
  123. int j = paramArrayOfString.length;
  124. for (int i = 0; i < j; i++) {
  125. String str = paramArrayOfString[i];
  126. if (str != null && str.equals(paramString))
  127. return true;
  128. }
  129. }
  130. return false;
  131. }
  132.  
  133. private Bitmap getBitmapFromResName(Context paramContext, String paramString) {
  134. if (paramString != null && paramString.length() > 0) {
  135. Resources resources = paramContext.getResources();
  136. int i = resources.getIdentifier(paramString, "drawable", paramContext.getPackageName());
  137. if (i > 0) {
  138. try {
  139. return BitmapFactory.decodeResource(resources, i);
  140. } catch (IllegalArgumentException illegalArgumentException) {
  141. Log.d("WatchFaceConfig", "getBitmapFromResName: Unable to find drawable " + paramString);
  142. }
  143. return null;
  144. }
  145. } else {
  146. return null;
  147. }
  148. Log.d("WatchFaceConfig", "getBitmapFromResName: Unable to find drawable " + paramString);
  149. return null;
  150. }
  151.  
  152. private byte[] getByteStream(File paramFile) {
  153. try {
  154. FileInputStream fileInputStream = new FileInputStream(paramFile);
  155. byte[] arrayOfByte = new byte[fileInputStream.available()];
  156. fileInputStream.read(arrayOfByte);
  157. fileInputStream.close();
  158. return arrayOfByte;
  159. } catch (Exception exception) {
  160. exception.printStackTrace();
  161. return null;
  162. }
  163. }
  164.  
  165. private Drawable getDrawableFromResName(Context paramContext, String paramString) {
  166. if (paramString != null && paramString.length() > 0) {
  167. Resources resources = paramContext.getResources();
  168. int i = resources.getIdentifier(paramString, "drawable", paramContext.getPackageName());
  169. if (i > 0) {
  170. try {
  171. return resources.getDrawable(i);
  172. } catch (android.content.res.Resources.NotFoundException notFoundException) {
  173. Log.d("WatchFaceConfig", "getDrawableFromResName: Unable to find drawable " + paramString);
  174. }
  175. return null;
  176. }
  177. } else {
  178. return null;
  179. }
  180. Log.d("WatchFaceConfig", "getDrawableFromResName: Unable to find drawable " + paramString);
  181. return null;
  182. }
  183.  
  184. public static String getFileName(String paramString) {
  185. int i = paramString.lastIndexOf(File.separator);
  186. return (i < 0) ? paramString : paramString.substring(i + 1, paramString.length());
  187. }
  188.  
  189. private static String getSlpt26WConfig(String paramString) {
  190. String str2 = null;
  191. String str1 = str2;
  192. if (paramString != null) {
  193. str1 = str2;
  194. if (paramString.startsWith("@wfz/")) {
  195. paramString = paramString.substring("@wfz/".length());
  196. str1 = str2;
  197. if (paramString != null) {
  198. int i = paramString.lastIndexOf(File.separator);
  199. str1 = str2;
  200. if (i > 0)
  201. str1 = (new StringBuffer(paramString)).insert(i + 1, "slpt/").toString();
  202. }
  203. }
  204. }
  205. return str1;
  206. }
  207.  
  208. private static String getSlptConfig(String paramString) {
  209. String str2 = null;
  210. String str1 = str2;
  211. if (paramString != null) {
  212. str1 = str2;
  213. if (paramString.startsWith("@wfz/")) {
  214. paramString = paramString.substring("@wfz/".length());
  215. str1 = str2;
  216. if (paramString != null) {
  217. int i = paramString.lastIndexOf(File.separator);
  218. str1 = str2;
  219. if (i > 0)
  220. str1 = (new StringBuffer(paramString)).insert(i + 1, "8c/").toString();
  221. }
  222. }
  223. }
  224. return str1;
  225. }
  226.  
  227. public static WatchFaceConfig getWatchFaceConfig(Context paramContext, String paramString) {
  228. List<WatchFaceComponent> list;
  229. WatchFaceConfig watchFaceConfig = new WatchFaceConfig();
  230. watchFaceConfig.mContext = paramContext;
  231. watchFaceConfig.INTERNAL_PATH = paramContext.getFilesDir().getAbsolutePath();
  232. watchFaceConfig.mWatchFaceName = paramString;
  233. Log.d("WatchFaceConfig", "WatchFaceConfig watchfaceName: " + paramString);
  234. if (paramString.equals("external_watchface")) {
  235. File file = new File("/sdcard/.watchface/current/");
  236. String str = null;
  237. paramString = str;
  238. if (file.exists()) {
  239. paramString = str;
  240. if (file.isDirectory()) {
  241. File[] arrayOfFile = file.listFiles(new FilenameFilter() {
  242. public boolean accept(File param1File, String param1String) {
  243. Log.d("WatchFaceConfig", "FilenameFilter filename: " + param1String);
  244. return (param1String != null && param1String.endsWith(".wfz"));
  245. }
  246. });
  247. paramString = str;
  248. if (arrayOfFile != null) {
  249. paramString = str;
  250. if (arrayOfFile.length > 0) {
  251. paramString = arrayOfFile[0].getPath();
  252. Log.d("WatchFaceConfig", "current wfz: " + paramString);
  253. watchFaceConfig.mExternalLoader = WatchFaceExternalLoader.getWatchFaceExternalLoader(paramString, (paramContext.getResources().getConfiguration()).locale);
  254. }
  255. }
  256. }
  257. }
  258. if (watchFaceConfig.mExternalLoader != null) {
  259. WatchFaceModule watchFaceModule = watchFaceConfig.mExternalLoader.parseWatchFace();
  260. WatchFaceSave watchFaceSave = WatchFaceSave.getWatchFaceSave(paramString);
  261. if (watchFaceModule != null) {
  262. List<WatchFaceModuleItem> list1 = watchFaceModule.getWatchFaceItemList();
  263. if (list1 != null && list1.size() > 0) {
  264. int i = 0;
  265. while (i < list1.size()) {
  266. boolean bool1;
  267. boolean bool2;
  268. WatchFaceConfigTemplate.DataWidgetConfig dataWidgetConfig;
  269. WatchFaceModuleItem watchFaceModuleItem = list1.get(i);
  270. switch (WfzConstants.parseItemType(watchFaceModuleItem.getType())) {
  271. default:
  272. i++;
  273. continue;
  274. case 0:
  275. if (watchFaceSave != null && watchFaceSave.contains("Background"))
  276. watchFaceConfig.parseBg(paramContext, watchFaceSave.getString("Background", null));
  277. if (watchFaceConfig.mBgDrawable == null)
  278. watchFaceConfig.parseBg(paramContext, watchFaceModuleItem.getConfig());
  279. case 1:
  280. if (watchFaceSave != null && watchFaceSave.contains("Graduation"))
  281. watchFaceConfig.parseGraduation(paramContext, watchFaceSave.getString("Graduation", null));
  282. if (watchFaceConfig.mGraduation == null)
  283. watchFaceConfig.parseGraduation(paramContext, watchFaceModuleItem.getConfig());
  284. case 2:
  285. if (watchFaceSave != null && watchFaceSave.contains("TimeHand"))
  286. watchFaceConfig.parseTimeHand(paramContext, watchFaceSave.getString("TimeHand", null));
  287. if (watchFaceConfig.mTimeHand == null)
  288. watchFaceConfig.parseTimeHand(paramContext, watchFaceModuleItem.getConfig());
  289. case 4:
  290. if (watchFaceSave != null && watchFaceSave.contains("TimeDigital"))
  291. watchFaceConfig.parseTimeDigital(paramContext, watchFaceSave.getString("TimeDigital", null));
  292. if (watchFaceConfig.mTimeDigital == null)
  293. watchFaceConfig.parseTimeDigital(watchFaceModuleItem);
  294. case 3:
  295. bool2 = false;
  296. bool1 = bool2;
  297. bool1 = bool2;
  298. if (watchFaceSave != null && watchFaceSave.contains("DataWidget" + watchFaceModuleItem.getId()))
  299. bool1 = watchFaceConfig.parseDataWidget(watchFaceSave.getString("DataWidget" + watchFaceModuleItem.getId(), null));
  300. if (!bool1) {
  301. dataWidgetConfig = new WatchFaceConfigTemplate.DataWidgetConfig(watchFaceModuleItem.getId(), watchFaceModuleItem.getDataType(), watchFaceModuleItem.getX(), watchFaceModuleItem.getY(), watchFaceModuleItem.getModel(), null, null);
  302. watchFaceConfig.mWidgets.add(dataWidgetConfig);
  303. }
  304. case 5:
  305. watchFaceConfig.mStatusBarPosX = dataWidgetConfig.getX();
  306. watchFaceConfig.mStatusBarPosY = dataWidgetConfig.getY();
  307. case 6:
  308. watchFaceConfig.mSupport26W = Boolean.parseBoolean(dataWidgetConfig.getConfig());
  309. case 7:
  310. watchFaceConfig.mLowPowerX = dataWidgetConfig.getX();
  311. watchFaceConfig.mLowPowerY = dataWidgetConfig.getY();
  312. watchFaceConfig.parseLowPower(paramContext, dataWidgetConfig.getConfig());
  313. case -1:
  314. break;
  315. }
  316. Log.d("WatchFaceConfig", "Not support " + dataWidgetConfig);
  317. }
  318. }
  319. list = watchFaceModule.getWatchFaceComponentList();
  320. if (list != null && list.size() > 0) {
  321. int i = 0;
  322. while (i < list.size()) {
  323. WatchFaceComponent watchFaceComponent = list.get(i);
  324. switch (WfzConstansGTR.parseItemType(watchFaceComponent.getType())) {
  325. default:
  326. i++;
  327. continue;
  328. case 0:
  329. if (watchFaceConfig.mBgDrawable == null) {
  330. watchFaceConfig.parseGtrBg(paramContext, watchFaceComponent.getConfig());
  331. watchFaceConfig.mStatusBarPosX = Integer.MAX_VALUE;
  332. watchFaceConfig.mStatusBarPosY = Integer.MAX_VALUE;
  333. }
  334. case 11:
  335. watchFaceConfig.parseDate(watchFaceComponent);
  336. case 2:
  337. watchFaceConfig.parseGtrTimehand(watchFaceComponent);
  338. case 10:
  339. watchFaceConfig.parseGtrProgress(watchFaceComponent);
  340. case 9:
  341. watchFaceConfig.parseGtrWidget(watchFaceComponent);
  342. case 8:
  343. watchFaceConfig.parseTimeDis(watchFaceComponent);
  344. case 12:
  345. watchFaceConfig.parseIcon(watchFaceComponent);
  346. case 13:
  347. watchFaceConfig.parseGtrWidget(watchFaceComponent);
  348. case 14:
  349. watchFaceConfig.parseDatehand(watchFaceComponent);
  350. case 15:
  351. watchFaceConfig.parseWeather(watchFaceComponent);
  352. case 16:
  353. watchFaceConfig.parseGtrArc(watchFaceComponent);
  354. case -1:
  355. break;
  356. }
  357. Log.d("WatchFaceConfig", "Not support " + watchFaceComponent);
  358. }
  359. }
  360. }
  361. }
  362. } else {
  363. if ("com.huami.watch.watchface.AnalogWatchFaceEleven".equals(list))
  364. watchFaceConfig.mSupport26W = true;
  365. SharedPreferences sharedPreferences = paramContext.getSharedPreferences((String)list, 0);
  366. if (sharedPreferences.contains("Background"))
  367. watchFaceConfig.parseBg(paramContext, sharedPreferences.getString("Background", null));
  368. if (sharedPreferences.contains("TimeHand"))
  369. watchFaceConfig.parseTimeHand(paramContext, sharedPreferences.getString("TimeHand", null));
  370. if (sharedPreferences.contains("Graduation"))
  371. watchFaceConfig.parseGraduation(paramContext, sharedPreferences.getString("Graduation", null));
  372. for (int i = 0; i < 10; i++) {
  373. if (sharedPreferences.contains("DataWidget" + i))
  374. watchFaceConfig.parseDataWidget(sharedPreferences.getString("DataWidget" + i, null));
  375. }
  376. }
  377. return watchFaceConfig;
  378. }
  379.  
  380. private static boolean isAssetsFileExist(Context paramContext, String paramString1, String paramString2) {
  381. IOException iOException2 = null;
  382. String str = paramString1;
  383. if (paramString1 == null)
  384. str = "";
  385. try {
  386. String[] arrayOfString = paramContext.getAssets().list(str);
  387. } catch (IOException iOException1) {
  388. iOException1 = iOException2;
  389. }
  390. return contantsInList((String[])iOException1, paramString2);
  391. }
  392.  
  393. private void parseBg(Context paramContext, String paramString) {
  394. Log.d("WatchFaceConfig", "parseBg " + paramString);
  395. if (paramString != null && paramString.length() > 2) {
  396. if (paramString.startsWith("@")) {
  397. if (paramString.startsWith("@drawable/")) {
  398. paramString = paramString.substring("@drawable/".length());
  399. this.mBgDrawable = getDrawableFromResName(paramContext, paramString);
  400. if (this.mBgDrawable != null) {
  401. this.mBgPathSlpt = "guard/" + this.mWatchFaceName + File.separator + paramString + ".png";
  402. if (this.mSupport26W)
  403. this.mBgPathSlpt26W = paramString;
  404. this.mBgType = 1;
  405. Log.d("WatchFaceConfig", "BgType: IMG_TYPE_DRAWABLE SlptBgPath: " + this.mBgPathSlpt);
  406. }
  407. return;
  408. }
  409. if (paramString.startsWith("@customBg/")) {
  410. paramString = paramString.substring("@customBg/".length());
  411. String str = this.INTERNAL_PATH + "/watchface/customBg/" + paramString;
  412. if ((new File(str)).exists()) {
  413. this.mBgDrawable = (Drawable)new BitmapDrawable(paramContext.getResources(), str);
  414. this.mBgPathSlpt = this.INTERNAL_PATH + "/watchface/customSlptBg/" + paramString;
  415. if (this.mSupport26W)
  416. this.mBgPathSlpt26W = str;
  417. this.mBgType = 4;
  418. Log.d("WatchFaceConfig", "BgType: IMG_TYPE_FILE BgPathSlpt: " + this.mBgPathSlpt);
  419. return;
  420. }
  421. return;
  422. }
  423. if (paramString.startsWith("@wfz/")) {
  424. String str = paramString.substring("@wfz/".length());
  425. if (str != null && str.length() > 0) {
  426. this.mBgDrawable = parseDrawable(6, str);
  427. if (this.mBgDrawable != null) {
  428. int i = str.lastIndexOf(File.separator);
  429. this.mBgPathSlpt = (new StringBuffer(str)).insert(i + 1, "8c/").toString();
  430. if (this.mSupport26W)
  431. this.mBgPathSlpt26W = str;
  432. this.mBgType = 6;
  433. return;
  434. }
  435. }
  436. }
  437. return;
  438. }
  439. } else {
  440. return;
  441. }
  442. if (paramString.startsWith("#")) {
  443. this.mBgType = 5;
  444. return;
  445. }
  446. }
  447.  
  448. private Bitmap parseBitmap(int paramInt, String paramString) {
  449. Log.d("WatchFaceConfig", "parseBitmap type:" + paramInt + " path=" + paramString);
  450. if (paramString != null && paramString.length() > 2) {
  451. switch (paramInt) {
  452. default:
  453. return null;
  454. case 2:
  455. return Util.decodeImage(this.mContext.getResources(), paramString);
  456. case 1:
  457. return getBitmapFromResName(this.mContext, paramString);
  458. case 4:
  459. paramString = this.INTERNAL_PATH + "/watchface/customBg/" + paramString;
  460. if ((new File(paramString)).exists())
  461. return BitmapFactory.decodeFile(paramString);
  462. case 6:
  463. break;
  464. }
  465. if (this.mExternalLoader != null) {
  466. String str = paramString;
  467. if (paramString != null) {
  468. str = paramString;
  469. if (paramString.contains("CN")) {
  470. str = paramString;
  471. if (!"CN".equals(Util.getWfzLocal()))
  472. str = paramString.replace("CN", Util.getWfzLocal());
  473. }
  474. }
  475. Log.i("WatchFaceConfig", "replaceLanguage:" + str);
  476. InputStream inputStream = this.mExternalLoader.readFileInputStream(str);
  477. Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
  478. WatchFaceExternalLoader.closeInputStream(inputStream);
  479. return bitmap;
  480. }
  481. }
  482. }
  483.  
  484. private boolean parseDataWidget(String paramString) {
  485. if (paramString != null && paramString.length() > 2)
  486. try {
  487. WatchFaceConfigTemplate.DataWidgetConfig dataWidgetConfig = new WatchFaceConfigTemplate.DataWidgetConfig(paramString);
  488. Log.d("WatchFaceConfig", "parseDataWidget success: " + dataWidgetConfig);
  489. this.mWidgets.add(dataWidgetConfig);
  490. return true;
  491. } catch (JSONException jSONException) {}
  492. return false;
  493. }
  494.  
  495. private void parseDate(WatchFaceComponent paramWatchFaceComponent) {
  496. String str7;
  497. int i14 = 0;
  498. int i13 = 0;
  499. int i12 = 0;
  500. int i11 = 0;
  501. int i10 = 0;
  502. int i9 = 8;
  503. int i8 = 0;
  504. int i7 = 0;
  505. int i6 = 0;
  506. int i5 = 0;
  507. int i4 = 0;
  508. int i3 = 8;
  509. int i2 = 0;
  510. int i1 = 0;
  511. int n = 0;
  512. int m = 0;
  513. int k = 0;
  514. int j = 8;
  515. int i20 = 0;
  516. int i19 = 0;
  517. int i18 = 0;
  518. int i17 = 0;
  519. int i16 = 0;
  520. int i15 = 8;
  521. boolean bool2 = false;
  522. boolean bool1 = false;
  523. boolean bool4 = false;
  524. boolean bool3 = false;
  525. String str2 = null;
  526. String str3 = null;
  527. boolean bool5 = true;
  528. boolean bool7 = true;
  529. boolean bool6 = false;
  530. String str1 = null;
  531. String str6 = null;
  532. String str5 = null;
  533. String str4 = null;
  534. WatchFaceComponentItem watchFaceComponentItem = null;
  535. int i = 0;
  536. while (i < paramWatchFaceComponent.ItemList.size()) {
  537. int i21;
  538. int i22;
  539. int i23;
  540. int i24;
  541. int i25;
  542. int i26;
  543. int i27;
  544. int i28;
  545. int i29;
  546. int i30;
  547. int i31;
  548. int i32;
  549. int i33;
  550. int i34;
  551. int i35;
  552. int i36;
  553. int i37;
  554. int i38;
  555. int i39;
  556. int i40;
  557. int i41;
  558. int i42;
  559. int i43;
  560. int i44;
  561. boolean bool8;
  562. boolean bool9;
  563. boolean bool10;
  564. boolean bool11;
  565. boolean bool12;
  566. boolean bool13;
  567. boolean bool14;
  568. String str8;
  569. String str10;
  570. String str11;
  571. String str12;
  572. String str13;
  573. String str14;
  574. WatchFaceComponentItem watchFaceComponentItem1 = paramWatchFaceComponent.ItemList.get(i);
  575. String str9 = watchFaceComponentItem1.getType();
  576. if (str9.equals("year")) {
  577. i14 = watchFaceComponentItem1.getX0();
  578. i9 = watchFaceComponentItem1.getY0();
  579. i13 = watchFaceComponentItem1.getX1();
  580. i10 = watchFaceComponentItem1.getY1();
  581. i11 = watchFaceComponentItem1.getAlign();
  582. i12 = watchFaceComponentItem1.getSpace();
  583. str6 = watchFaceComponentItem1.getFontConfig();
  584. i21 = i20;
  585. i32 = i19;
  586. i24 = i18;
  587. i35 = i17;
  588. i36 = i16;
  589. i37 = i15;
  590. watchFaceComponentItem1 = watchFaceComponentItem;
  591. i25 = i14;
  592. i33 = i9;
  593. i22 = i13;
  594. i29 = i10;
  595. i30 = i11;
  596. i31 = i12;
  597. str9 = str6;
  598. i23 = i8;
  599. i34 = i7;
  600. i26 = i6;
  601. i38 = i5;
  602. i39 = i4;
  603. i40 = i3;
  604. str10 = str5;
  605. i27 = i2;
  606. i41 = i1;
  607. i28 = n;
  608. i42 = m;
  609. i43 = k;
  610. i44 = j;
  611. str11 = str4;
  612. bool12 = bool7;
  613. bool13 = bool6;
  614. bool14 = bool5;
  615. str12 = str3;
  616. bool8 = bool4;
  617. bool9 = bool3;
  618. str13 = str2;
  619. str14 = str1;
  620. bool10 = bool2;
  621. bool11 = bool1;
  622. if ((i11 & 0x8) > 0) {
  623. i25 = i14 - 20;
  624. i22 = i13 + 20;
  625. bool11 = bool1;
  626. bool10 = bool2;
  627. str14 = str1;
  628. str13 = str2;
  629. bool9 = bool3;
  630. bool8 = bool4;
  631. str12 = str3;
  632. bool14 = bool5;
  633. bool13 = bool6;
  634. bool12 = bool7;
  635. str11 = str4;
  636. i44 = j;
  637. i43 = k;
  638. i42 = m;
  639. i28 = n;
  640. i41 = i1;
  641. i27 = i2;
  642. str10 = str5;
  643. i40 = i3;
  644. i39 = i4;
  645. i38 = i5;
  646. i26 = i6;
  647. i34 = i7;
  648. i23 = i8;
  649. str9 = str6;
  650. i31 = i12;
  651. i30 = i11;
  652. i29 = i10;
  653. i33 = i9;
  654. watchFaceComponentItem1 = watchFaceComponentItem;
  655. i37 = i15;
  656. i36 = i16;
  657. i35 = i17;
  658. i24 = i18;
  659. i32 = i19;
  660. i21 = i20;
  661. }
  662. } else if (str9.equals("month_text")) {
  663. i8 = watchFaceComponentItem1.getX0();
  664. i3 = watchFaceComponentItem1.getY0();
  665. i7 = watchFaceComponentItem1.getX1();
  666. i4 = watchFaceComponentItem1.getY1();
  667. i5 = watchFaceComponentItem1.getAlign();
  668. i6 = watchFaceComponentItem1.getSpace();
  669. str5 = watchFaceComponentItem1.getFontConfig();
  670. bool5 = watchFaceComponentItem1.getMonFillZero();
  671. i21 = i20;
  672. i32 = i19;
  673. i24 = i18;
  674. i35 = i17;
  675. i36 = i16;
  676. i37 = i15;
  677. watchFaceComponentItem1 = watchFaceComponentItem;
  678. i25 = i14;
  679. i33 = i13;
  680. i22 = i12;
  681. i29 = i11;
  682. i30 = i10;
  683. i31 = i9;
  684. str9 = str6;
  685. i23 = i8;
  686. i34 = i3;
  687. i26 = i7;
  688. i38 = i4;
  689. i39 = i5;
  690. i40 = i6;
  691. str10 = str5;
  692. i27 = i2;
  693. i41 = i1;
  694. i28 = n;
  695. i42 = m;
  696. i43 = k;
  697. i44 = j;
  698. str11 = str4;
  699. bool12 = bool7;
  700. bool13 = bool6;
  701. bool14 = bool5;
  702. str12 = str3;
  703. bool8 = bool4;
  704. bool9 = bool3;
  705. str13 = str2;
  706. str14 = str1;
  707. bool10 = bool2;
  708. bool11 = bool1;
  709. if ((i5 & 0x8) > 0) {
  710. i23 = i8 - 20;
  711. i26 = i7 + 20;
  712. i21 = i20;
  713. i32 = i19;
  714. i24 = i18;
  715. i35 = i17;
  716. i36 = i16;
  717. i37 = i15;
  718. watchFaceComponentItem1 = watchFaceComponentItem;
  719. i25 = i14;
  720. i33 = i13;
  721. i22 = i12;
  722. i29 = i11;
  723. i30 = i10;
  724. i31 = i9;
  725. str9 = str6;
  726. i34 = i3;
  727. i38 = i4;
  728. i39 = i5;
  729. i40 = i6;
  730. str10 = str5;
  731. i27 = i2;
  732. i41 = i1;
  733. i28 = n;
  734. i42 = m;
  735. i43 = k;
  736. i44 = j;
  737. str11 = str4;
  738. bool12 = bool7;
  739. bool13 = bool6;
  740. bool14 = bool5;
  741. str12 = str3;
  742. bool8 = bool4;
  743. bool9 = bool3;
  744. str13 = str2;
  745. str14 = str1;
  746. bool10 = bool2;
  747. bool11 = bool1;
  748. }
  749. } else if (str9.equals("day")) {
  750. i2 = watchFaceComponentItem1.getX0();
  751. j = watchFaceComponentItem1.getY0();
  752. i1 = watchFaceComponentItem1.getX1();
  753. k = watchFaceComponentItem1.getY1();
  754. m = watchFaceComponentItem1.getAlign();
  755. n = watchFaceComponentItem1.getSpace();
  756. str4 = watchFaceComponentItem1.getFontConfig();
  757. bool6 = watchFaceComponentItem1.getMonFillZero();
  758. bool7 = watchFaceComponentItem1.getDayHasEnd();
  759. i21 = i20;
  760. i32 = i19;
  761. i24 = i18;
  762. i35 = i17;
  763. i36 = i16;
  764. i37 = i15;
  765. watchFaceComponentItem1 = watchFaceComponentItem;
  766. i25 = i14;
  767. i33 = i13;
  768. i22 = i12;
  769. i29 = i11;
  770. i30 = i10;
  771. i31 = i9;
  772. str9 = str6;
  773. i23 = i8;
  774. i34 = i7;
  775. i26 = i6;
  776. i38 = i5;
  777. i39 = i4;
  778. i40 = i3;
  779. str10 = str5;
  780. i27 = i2;
  781. i41 = j;
  782. i28 = i1;
  783. i42 = k;
  784. i43 = m;
  785. i44 = n;
  786. str11 = str4;
  787. bool12 = bool6;
  788. bool13 = bool7;
  789. bool14 = bool5;
  790. str12 = str3;
  791. bool8 = bool4;
  792. bool9 = bool3;
  793. str13 = str2;
  794. str14 = str1;
  795. bool10 = bool2;
  796. bool11 = bool1;
  797. if ((m & 0x8) > 0) {
  798. i27 = i2 - 20;
  799. i28 = i1 + 20;
  800. i21 = i20;
  801. i32 = i19;
  802. i24 = i18;
  803. i35 = i17;
  804. i36 = i16;
  805. i37 = i15;
  806. watchFaceComponentItem1 = watchFaceComponentItem;
  807. i25 = i14;
  808. i33 = i13;
  809. i22 = i12;
  810. i29 = i11;
  811. i30 = i10;
  812. i31 = i9;
  813. str9 = str6;
  814. i23 = i8;
  815. i34 = i7;
  816. i26 = i6;
  817. i38 = i5;
  818. i39 = i4;
  819. i40 = i3;
  820. str10 = str5;
  821. i41 = j;
  822. i42 = k;
  823. i43 = m;
  824. i44 = n;
  825. str11 = str4;
  826. bool12 = bool6;
  827. bool13 = bool7;
  828. bool14 = bool5;
  829. str12 = str3;
  830. bool8 = bool4;
  831. bool9 = bool3;
  832. str13 = str2;
  833. str14 = str1;
  834. bool10 = bool2;
  835. bool11 = bool1;
  836. }
  837. } else {
  838. String str;
  839. if (str9.equals("mon_day")) {
  840. i20 = watchFaceComponentItem1.getX0();
  841. i15 = watchFaceComponentItem1.getY0();
  842. i19 = watchFaceComponentItem1.getX1();
  843. i16 = watchFaceComponentItem1.getY1();
  844. i17 = watchFaceComponentItem1.getAlign();
  845. i18 = watchFaceComponentItem1.getSpace();
  846. str = watchFaceComponentItem1.getFontConfig();
  847. bool5 = watchFaceComponentItem1.getMonFillZero();
  848. bool6 = watchFaceComponentItem1.getMonFillZero();
  849. bool7 = watchFaceComponentItem1.getDayHasEnd();
  850. i21 = i20;
  851. i32 = i15;
  852. i24 = i19;
  853. i35 = i16;
  854. i36 = i17;
  855. i37 = i18;
  856. str8 = str;
  857. i25 = i14;
  858. i33 = i13;
  859. i22 = i12;
  860. i29 = i11;
  861. i30 = i10;
  862. i31 = i9;
  863. str9 = str6;
  864. i23 = i8;
  865. i34 = i7;
  866. i26 = i6;
  867. i38 = i5;
  868. i39 = i4;
  869. i40 = i3;
  870. str10 = str5;
  871. i27 = i2;
  872. i41 = i1;
  873. i28 = n;
  874. i42 = m;
  875. i43 = k;
  876. i44 = j;
  877. str11 = str4;
  878. bool12 = bool6;
  879. bool13 = bool7;
  880. bool14 = bool5;
  881. str12 = str3;
  882. bool8 = bool4;
  883. bool9 = bool3;
  884. str13 = str2;
  885. str14 = str1;
  886. bool10 = bool2;
  887. bool11 = bool1;
  888. if ((i17 & 0x8) > 0) {
  889. i21 = i20 - 20;
  890. i24 = i19 + 20;
  891. i32 = i15;
  892. i35 = i16;
  893. i36 = i17;
  894. i37 = i18;
  895. str8 = str;
  896. i25 = i14;
  897. i33 = i13;
  898. i22 = i12;
  899. i29 = i11;
  900. i30 = i10;
  901. i31 = i9;
  902. str9 = str6;
  903. i23 = i8;
  904. i34 = i7;
  905. i26 = i6;
  906. i38 = i5;
  907. i39 = i4;
  908. i40 = i3;
  909. str10 = str5;
  910. i27 = i2;
  911. i41 = i1;
  912. i28 = n;
  913. i42 = m;
  914. i43 = k;
  915. i44 = j;
  916. str11 = str4;
  917. bool12 = bool6;
  918. bool13 = bool7;
  919. bool14 = bool5;
  920. str12 = str3;
  921. bool8 = bool4;
  922. bool9 = bool3;
  923. str13 = str2;
  924. str14 = str1;
  925. bool10 = bool2;
  926. bool11 = bool1;
  927. }
  928. } else if (((WatchFaceComponentItem)paramWatchFaceComponent.ItemList.get(i)).getType().equals("week")) {
  929. bool10 = ((WatchFaceComponentItem)paramWatchFaceComponent.ItemList.get(i)).getX();
  930. bool11 = ((WatchFaceComponentItem)paramWatchFaceComponent.ItemList.get(i)).getY();
  931. str14 = ((WatchFaceComponentItem)paramWatchFaceComponent.ItemList.get(i)).getFontConfig();
  932. i21 = i20;
  933. i32 = i19;
  934. i24 = i18;
  935. i35 = i17;
  936. i36 = i16;
  937. i37 = i15;
  938. str8 = str;
  939. i25 = i14;
  940. i33 = i13;
  941. i22 = i12;
  942. i29 = i11;
  943. i30 = i10;
  944. i31 = i9;
  945. str9 = str6;
  946. i23 = i8;
  947. i34 = i7;
  948. i26 = i6;
  949. i38 = i5;
  950. i39 = i4;
  951. i40 = i3;
  952. str10 = str5;
  953. i27 = i2;
  954. i41 = i1;
  955. i28 = n;
  956. i42 = m;
  957. i43 = k;
  958. i44 = j;
  959. str11 = str4;
  960. bool12 = bool7;
  961. bool13 = bool6;
  962. bool14 = bool5;
  963. str12 = str3;
  964. bool8 = bool4;
  965. bool9 = bool3;
  966. str13 = str2;
  967. } else if (((WatchFaceComponentItem)paramWatchFaceComponent.ItemList.get(i)).getType().equals("month_image")) {
  968. bool8 = ((WatchFaceComponentItem)paramWatchFaceComponent.ItemList.get(i)).getX();
  969. bool9 = ((WatchFaceComponentItem)paramWatchFaceComponent.ItemList.get(i)).getY();
  970. str12 = ((WatchFaceComponentItem)paramWatchFaceComponent.ItemList.get(i)).getConfig();
  971. i21 = i20;
  972. i32 = i19;
  973. i24 = i18;
  974. i35 = i17;
  975. i36 = i16;
  976. i37 = i15;
  977. str8 = str;
  978. i25 = i14;
  979. i33 = i13;
  980. i22 = i12;
  981. i29 = i11;
  982. i30 = i10;
  983. i31 = i9;
  984. str9 = str6;
  985. i23 = i8;
  986. i34 = i7;
  987. i26 = i6;
  988. i38 = i5;
  989. i39 = i4;
  990. i40 = i3;
  991. str10 = str5;
  992. i27 = i2;
  993. i41 = i1;
  994. i28 = n;
  995. i42 = m;
  996. i43 = k;
  997. i44 = j;
  998. str11 = str4;
  999. bool12 = bool7;
  1000. bool13 = bool6;
  1001. bool14 = bool5;
  1002. str13 = str2;
  1003. str14 = str1;
  1004. bool10 = bool2;
  1005. bool11 = bool1;
  1006. } else {
  1007. i21 = i20;
  1008. i32 = i19;
  1009. i24 = i18;
  1010. i35 = i17;
  1011. i36 = i16;
  1012. i37 = i15;
  1013. str8 = str;
  1014. i25 = i14;
  1015. i33 = i13;
  1016. i22 = i12;
  1017. i29 = i11;
  1018. i30 = i10;
  1019. i31 = i9;
  1020. str9 = str6;
  1021. i23 = i8;
  1022. i34 = i7;
  1023. i26 = i6;
  1024. i38 = i5;
  1025. i39 = i4;
  1026. i40 = i3;
  1027. str10 = str5;
  1028. i27 = i2;
  1029. i41 = i1;
  1030. i28 = n;
  1031. i42 = m;
  1032. i43 = k;
  1033. i44 = j;
  1034. str11 = str4;
  1035. bool12 = bool7;
  1036. bool13 = bool6;
  1037. bool14 = bool5;
  1038. str12 = str3;
  1039. bool8 = bool4;
  1040. bool9 = bool3;
  1041. str13 = str2;
  1042. str14 = str1;
  1043. bool10 = bool2;
  1044. bool11 = bool1;
  1045. if (((WatchFaceComponentItem)paramWatchFaceComponent.ItemList.get(i)).getType().equals("weekFloat")) {
  1046. str13 = ((WatchFaceComponentItem)paramWatchFaceComponent.ItemList.get(i)).getFontConfig();
  1047. i21 = i20;
  1048. i32 = i19;
  1049. i24 = i18;
  1050. i35 = i17;
  1051. i36 = i16;
  1052. i37 = i15;
  1053. str8 = str;
  1054. i25 = i14;
  1055. i33 = i13;
  1056. i22 = i12;
  1057. i29 = i11;
  1058. i30 = i10;
  1059. i31 = i9;
  1060. str9 = str6;
  1061. i23 = i8;
  1062. i34 = i7;
  1063. i26 = i6;
  1064. i38 = i5;
  1065. i39 = i4;
  1066. i40 = i3;
  1067. str10 = str5;
  1068. i27 = i2;
  1069. i41 = i1;
  1070. i28 = n;
  1071. i42 = m;
  1072. i43 = k;
  1073. i44 = j;
  1074. str11 = str4;
  1075. bool12 = bool7;
  1076. bool13 = bool6;
  1077. bool14 = bool5;
  1078. str12 = str3;
  1079. bool8 = bool4;
  1080. bool9 = bool3;
  1081. str14 = str1;
  1082. bool10 = bool2;
  1083. bool11 = bool1;
  1084. }
  1085. }
  1086. }
  1087. i++;
  1088. i20 = i21;
  1089. i19 = i32;
  1090. i18 = i24;
  1091. i17 = i35;
  1092. i16 = i36;
  1093. i15 = i37;
  1094. str7 = str8;
  1095. i14 = i25;
  1096. i13 = i33;
  1097. i12 = i22;
  1098. i11 = i29;
  1099. i10 = i30;
  1100. i9 = i31;
  1101. str6 = str9;
  1102. i8 = i23;
  1103. i7 = i34;
  1104. i6 = i26;
  1105. i5 = i38;
  1106. i4 = i39;
  1107. i3 = i40;
  1108. str5 = str10;
  1109. i2 = i27;
  1110. i1 = i41;
  1111. n = i28;
  1112. m = i42;
  1113. k = i43;
  1114. j = i44;
  1115. str4 = str11;
  1116. bool7 = bool12;
  1117. bool6 = bool13;
  1118. bool5 = bool14;
  1119. str3 = str12;
  1120. bool4 = bool8;
  1121. bool3 = bool9;
  1122. str2 = str13;
  1123. str1 = str14;
  1124. bool2 = bool10;
  1125. bool1 = bool11;
  1126. }
  1127. if (str7 != null) {
  1128. mDateDigital = new DateDigital(i20, i19, i18, i17, i16, i15, str7);
  1129. if (str6 != null) {
  1130. mDateDigital.setYear_x0(i14);
  1131. mDateDigital.setYear_y0(i13);
  1132. mDateDigital.setYear_x1(i12);
  1133. mDateDigital.setYear_y1(i11);
  1134. mDateDigital.setYearAlign(i10);
  1135. mDateDigital.setYearSpace(i9);
  1136. mDateDigital.setYearFontConfig(str6);
  1137. }
  1138. } else {
  1139. mDateDigital = new DateDigital(i14, i13, i12, i11, i10, i9, str6, i8, i7, i6, i5, i4, i3, str5, i2, i1, n, m, k, j, str4);
  1140. }
  1141. if (str1 != null) {
  1142. mDateDigital.setWeek_x(bool2);
  1143. mDateDigital.setWeek_y(bool1);
  1144. mDateDigital.setWeekConfig(str1);
  1145. }
  1146. if (str3 != null) {
  1147. mDateDigital.setMonthImageX(bool4);
  1148. mDateDigital.setMonthImageY(bool3);
  1149. mDateDigital.setMonthImageConfig(str3);
  1150. }
  1151. if (str2 != null)
  1152. mDateDigital.setWeekFloatConfig(str2);
  1153. mDateDigital.setMonFillZero(bool5);
  1154. mDateDigital.setDayFillZero(bool7);
  1155. mDateDigital.setDayHasEnd(bool6);
  1156. mDateDigital.parseImageFontInfo();
  1157. mDateDigital.parseWeekBitmap();
  1158. mDateDigital.parseMonthImageBitmap();
  1159. mDateDigital.parseWeekFloatImages();
  1160. }
  1161.  
  1162. private void parseDatehand(WatchFaceComponent paramWatchFaceComponent) {
  1163. if (paramWatchFaceComponent != null) {
  1164. String str3 = null;
  1165. String str1 = null;
  1166. String str2 = null;
  1167. boolean bool10 = false;
  1168. boolean bool9 = false;
  1169. boolean bool4 = false;
  1170. boolean bool3 = false;
  1171. int n = 0;
  1172. int m = 0;
  1173. boolean bool12 = false;
  1174. boolean bool11 = false;
  1175. boolean bool6 = false;
  1176. boolean bool5 = false;
  1177. int i2 = 0;
  1178. int i1 = 0;
  1179. boolean bool8 = false;
  1180. boolean bool7 = false;
  1181. boolean bool2 = false;
  1182. boolean bool1 = false;
  1183. int k = 0;
  1184. int j = 0;
  1185. int i = 0;
  1186. while (i < paramWatchFaceComponent.ItemList.size()) {
  1187. boolean bool13;
  1188. boolean bool14;
  1189. boolean bool15;
  1190. boolean bool16;
  1191. boolean bool17;
  1192. boolean bool18;
  1193. boolean bool19;
  1194. boolean bool20;
  1195. boolean bool21;
  1196. boolean bool22;
  1197. boolean bool23;
  1198. boolean bool24;
  1199. String str4;
  1200. String str5;
  1201. WatchFaceComponentItem watchFaceComponentItem = paramWatchFaceComponent.ItemList.get(i);
  1202. if (watchFaceComponentItem.getType().equals("month")) {
  1203. bool23 = watchFaceComponentItem.getX();
  1204. bool21 = watchFaceComponentItem.getY();
  1205. bool19 = watchFaceComponentItem.getXCenter();
  1206. bool17 = watchFaceComponentItem.getYCenter();
  1207. bool15 = watchFaceComponentItem.getA0();
  1208. bool13 = watchFaceComponentItem.getA1();
  1209. str4 = watchFaceComponentItem.getConfig();
  1210. str5 = str1;
  1211. bool24 = bool1;
  1212. bool22 = bool2;
  1213. bool20 = bool3;
  1214. bool18 = bool4;
  1215. bool16 = bool5;
  1216. bool14 = bool6;
  1217. } else if (watchFaceComponentItem.getType().equals("day")) {
  1218. bool14 = watchFaceComponentItem.getX();
  1219. bool16 = watchFaceComponentItem.getY();
  1220. bool18 = watchFaceComponentItem.getXCenter();
  1221. bool20 = watchFaceComponentItem.getYCenter();
  1222. bool22 = watchFaceComponentItem.getA0();
  1223. bool24 = watchFaceComponentItem.getA1();
  1224. str5 = watchFaceComponentItem.getConfig();
  1225. bool23 = bool12;
  1226. bool21 = bool11;
  1227. bool19 = bool10;
  1228. bool17 = bool9;
  1229. bool15 = bool8;
  1230. bool13 = bool7;
  1231. str4 = str3;
  1232. } else {
  1233. bool23 = bool12;
  1234. bool21 = bool11;
  1235. bool19 = bool10;
  1236. bool17 = bool9;
  1237. bool15 = bool8;
  1238. bool13 = bool7;
  1239. str4 = str3;
  1240. bool14 = bool6;
  1241. bool16 = bool5;
  1242. bool18 = bool4;
  1243. bool20 = bool3;
  1244. bool22 = bool2;
  1245. bool24 = bool1;
  1246. str5 = str1;
  1247. if (watchFaceComponentItem.getType().equals("week")) {
  1248. i2 = watchFaceComponentItem.getX();
  1249. i1 = watchFaceComponentItem.getY();
  1250. n = watchFaceComponentItem.getXCenter();
  1251. m = watchFaceComponentItem.getYCenter();
  1252. k = watchFaceComponentItem.getA0();
  1253. j = watchFaceComponentItem.getA1();
  1254. str2 = watchFaceComponentItem.getConfig();
  1255. bool23 = bool12;
  1256. bool21 = bool11;
  1257. bool19 = bool10;
  1258. bool17 = bool9;
  1259. bool15 = bool8;
  1260. bool13 = bool7;
  1261. str4 = str3;
  1262. bool14 = bool6;
  1263. bool16 = bool5;
  1264. bool18 = bool4;
  1265. bool20 = bool3;
  1266. bool22 = bool2;
  1267. bool24 = bool1;
  1268. str5 = str1;
  1269. }
  1270. }
  1271. i++;
  1272. bool12 = bool23;
  1273. bool11 = bool21;
  1274. bool10 = bool19;
  1275. bool9 = bool17;
  1276. bool8 = bool15;
  1277. bool7 = bool13;
  1278. str3 = str4;
  1279. bool6 = bool14;
  1280. bool5 = bool16;
  1281. bool4 = bool18;
  1282. bool3 = bool20;
  1283. bool2 = bool22;
  1284. bool1 = bool24;
  1285. str1 = str5;
  1286. }
  1287. this.mGtrDatehand = new GtrDatehand(bool12, bool11, bool10, bool9, bool8, bool7, str3, bool6, bool5, bool4, bool3, bool2, bool1, str1, i2, i1, n, m, k, j, str2);
  1288. this.mGtrDatehand.parseGtrDatehandBitmap();
  1289. }
  1290. }
  1291.  
  1292. private Drawable parseDrawable(int paramInt, String paramString) {
  1293. if (paramString != null && paramString.length() > 2) {
  1294. switch (paramInt) {
  1295. default:
  1296. return null;
  1297. case 2:
  1298. return (Drawable)Util.decodeBitmapDrawableFromAssets(this.mContext.getResources(), paramString);
  1299. case 1:
  1300. return getDrawableFromResName(this.mContext, paramString);
  1301. case 4:
  1302. paramString = this.INTERNAL_PATH + "/watchface/customBg/" + paramString;
  1303. if ((new File(paramString)).exists())
  1304. return (Drawable)new BitmapDrawable(this.mContext.getResources(), paramString);
  1305. case 6:
  1306. break;
  1307. }
  1308. if (this.mExternalLoader != null) {
  1309. InputStream inputStream = this.mExternalLoader.readFileInputStream(paramString);
  1310. Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
  1311. WatchFaceExternalLoader.closeInputStream(inputStream);
  1312. if (bitmap != null)
  1313. return (Drawable)new BitmapDrawable(this.mContext.getResources(), bitmap);
  1314. }
  1315. }
  1316. }
  1317.  
  1318. private void parseGraduation(Context paramContext, String paramString) {
  1319. if (paramString.startsWith("@assets/")) {
  1320. String str = paramString.substring("@assets/".length());
  1321. this.mGraduation = parseDrawable(2, str + File.separator + "graduation.png");
  1322. if (this.mGraduation != null) {
  1323. this.mGraduationSlptPath = str + "/8c/graduation.png";
  1324. this.mGraduationType = 2;
  1325. if (this.mSupport26W) {
  1326. String[] arrayOfString;
  1327. paramContext = null;
  1328. try {
  1329. String[] arrayOfString1 = this.mContext.getAssets().list(str + "/26w/");
  1330. arrayOfString = arrayOfString1;
  1331. } catch (IOException iOException) {}
  1332. if (contantsInList(arrayOfString, "graduation.png"))
  1333. this.mGraduationSlptPath26W = str + "/26w/" + "graduation.png";
  1334. }
  1335. }
  1336. return;
  1337. }
  1338. if (iOException.startsWith("@drawable/")) {
  1339. this.mGraduation = parseDrawable(1, iOException.substring("@drawable/".length()));
  1340. if (this.mGraduation != null) {
  1341. this.mGraduationType = 1;
  1342. if (this.mSupport26W)
  1343. return;
  1344. }
  1345. return;
  1346. }
  1347. if (iOException.startsWith("@wfz/")) {
  1348. String str = iOException.substring("@wfz/".length());
  1349. if (this.mExternalLoader != null) {
  1350. this.mGraduation = parseDrawable(6, str + File.separator + "graduation.png");
  1351. if (this.mGraduation != null) {
  1352. this.mGraduationSlptPath = str + "/8c/graduation.png";
  1353. this.mGraduationType = 6;
  1354. if (this.mSupport26W && this.mExternalLoader.exists(str + "/26w/" + "graduation.png")) {
  1355. this.mGraduationSlptPath26W = str + "/26w/" + "graduation.png";
  1356. return;
  1357. }
  1358. }
  1359. }
  1360. }
  1361. }
  1362.  
  1363. private void parseGtrArc(WatchFaceComponent paramWatchFaceComponent) {
  1364. if (paramWatchFaceComponent != null) {
  1365. int i = paramWatchFaceComponent.getDataType();
  1366. int j = paramWatchFaceComponent.getXCenter();
  1367. int k = paramWatchFaceComponent.getYCenter();
  1368. int m = paramWatchFaceComponent.getRx();
  1369. int n = paramWatchFaceComponent.getRy();
  1370. String str = paramWatchFaceComponent.getColor();
  1371. int i1 = paramWatchFaceComponent.getSize();
  1372. int i2 = paramWatchFaceComponent.getCap();
  1373. int i3 = paramWatchFaceComponent.getA0();
  1374. int i4 = paramWatchFaceComponent.getA1();
  1375. GtrWidgetConfig gtrWidgetConfig = new GtrWidgetConfig(0, i, 0, 0, 454, 454, 0, null, 0, 0);
  1376. if (j != 0 || k != 0 || m != 0 || n != 0)
  1377. gtrWidgetConfig.setmArc(new Arc(j, k, m, n, str, i1, i2, i3, i4));
  1378. this.mGtrWidgets.add(gtrWidgetConfig);
  1379. }
  1380. }
  1381.  
  1382. private void parseGtrBg(Context paramContext, String paramString) {
  1383. ByteArrayOutputStream byteArrayOutputStream;
  1384. Log.d("WatchFaceConfig", "parseBg " + paramString);
  1385. if (paramString != null && paramString.length() > 2) {
  1386. if (paramString.startsWith("@")) {
  1387. if (paramString.startsWith("@wfz/")) {
  1388. String str = paramString.substring("@wfz/".length());
  1389. if (str != null && str.length() > 0) {
  1390. this.mBgDrawable = parseDrawable(6, str);
  1391. if (this.mBgDrawable != null) {
  1392. int i = str.lastIndexOf(File.separator);
  1393. this.mBgPathSlpt = (new StringBuffer(str)).insert(i + 1, "8c/").toString();
  1394. this.mBgPathSlpt26W = (new StringBuffer(str)).insert(i + 1, "slpt/").toString();
  1395. this.mBgType = 6;
  1396. Bitmap bitmap = parseBitmap(6, this.mBgPathSlpt);
  1397. byteArrayOutputStream = new ByteArrayOutputStream();
  1398. bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
  1399. byte[] arrayOfByte = byteArrayOutputStream.toByteArray();
  1400. if (arrayOfByte != null && BitmapFactory.decodeByteArray(arrayOfByte, 0, arrayOfByte.length) == null)
  1401. Log.i("WatchFaceConfig", "out is null");
  1402. }
  1403. }
  1404. }
  1405. return;
  1406. }
  1407. } else {
  1408. return;
  1409. }
  1410. if (byteArrayOutputStream.startsWith("#")) {
  1411. this.mBgType = 5;
  1412. return;
  1413. }
  1414. }
  1415.  
  1416. private void parseGtrProgress(WatchFaceComponent paramWatchFaceComponent) {
  1417. if (paramWatchFaceComponent != null) {
  1418. int i3 = paramWatchFaceComponent.getDataType();
  1419. boolean bool2 = false;
  1420. boolean bool1 = false;
  1421. boolean bool6 = false;
  1422. boolean bool4 = false;
  1423. boolean bool3 = false;
  1424. boolean bool9 = false;
  1425. boolean bool8 = false;
  1426. boolean bool7 = false;
  1427. String str3 = null;
  1428. boolean bool5 = false;
  1429. String str2 = null;
  1430. int k = 0;
  1431. int j = 0;
  1432. int i2 = 0;
  1433. int n = 0;
  1434. int i1 = 0;
  1435. int m = 0;
  1436. String str1 = "0";
  1437. int i = 0;
  1438. while (i < paramWatchFaceComponent.ItemList.size()) {
  1439. boolean bool10;
  1440. boolean bool11;
  1441. boolean bool12;
  1442. boolean bool13;
  1443. boolean bool14;
  1444. boolean bool15;
  1445. boolean bool16;
  1446. boolean bool17;
  1447. boolean bool18;
  1448. String str4;
  1449. String str5;
  1450. WatchFaceComponentItem watchFaceComponentItem = paramWatchFaceComponent.ItemList.get(i);
  1451. if (watchFaceComponentItem.getType().equals("Arc")) {
  1452. bool15 = watchFaceComponentItem.getXCenter();
  1453. bool14 = watchFaceComponentItem.getYCenter();
  1454. bool18 = watchFaceComponentItem.getRx();
  1455. bool17 = watchFaceComponentItem.getRy();
  1456. str5 = watchFaceComponentItem.getColor();
  1457. bool16 = watchFaceComponentItem.getSize();
  1458. bool13 = watchFaceComponentItem.getCap();
  1459. bool12 = watchFaceComponentItem.getA0();
  1460. bool10 = watchFaceComponentItem.getA1();
  1461. str4 = str3;
  1462. bool11 = bool5;
  1463. } else if (watchFaceComponentItem.getType().equals("AdditiveImage")) {
  1464. str4 = watchFaceComponentItem.getAdditiveBitmapConfig();
  1465. bool11 = watchFaceComponentItem.getAdditiveBitmapCount();
  1466. bool13 = bool9;
  1467. bool12 = bool8;
  1468. bool10 = bool7;
  1469. str5 = str1;
  1470. bool18 = bool6;
  1471. bool17 = bool4;
  1472. bool16 = bool3;
  1473. bool15 = bool2;
  1474. bool14 = bool1;
  1475. } else {
  1476. bool13 = bool9;
  1477. bool12 = bool8;
  1478. bool10 = bool7;
  1479. bool11 = bool5;
  1480. str4 = str3;
  1481. str5 = str1;
  1482. bool18 = bool6;
  1483. bool17 = bool4;
  1484. bool16 = bool3;
  1485. bool15 = bool2;
  1486. bool14 = bool1;
  1487. if (watchFaceComponentItem.getType().equals("pointer")) {
  1488. i2 = watchFaceComponentItem.getX();
  1489. n = watchFaceComponentItem.getY();
  1490. str2 = watchFaceComponentItem.getConfig();
  1491. i1 = watchFaceComponentItem.getXCenter();
  1492. m = watchFaceComponentItem.getYCenter();
  1493. k = watchFaceComponentItem.getA0();
  1494. j = watchFaceComponentItem.getA1();
  1495. bool13 = bool9;
  1496. bool12 = bool8;
  1497. bool10 = bool7;
  1498. bool11 = bool5;
  1499. str4 = str3;
  1500. str5 = str1;
  1501. bool18 = bool6;
  1502. bool17 = bool4;
  1503. bool16 = bool3;
  1504. bool15 = bool2;
  1505. bool14 = bool1;
  1506. }
  1507. }
  1508. i++;
  1509. bool9 = bool13;
  1510. bool8 = bool12;
  1511. bool7 = bool10;
  1512. bool5 = bool11;
  1513. str3 = str4;
  1514. str1 = str5;
  1515. bool6 = bool18;
  1516. bool4 = bool17;
  1517. bool3 = bool16;
  1518. bool2 = bool15;
  1519. bool1 = bool14;
  1520. }
  1521. GtrWidgetConfig gtrWidgetConfig = new GtrWidgetConfig(0, i3, 0, 0, 454, 454, 0, null, 0, 0);
  1522. if (bool2 || bool1 || bool6 || bool4)
  1523. gtrWidgetConfig.setmArc(new Arc(bool2, bool1, bool6, bool4, str1, bool3, bool9, bool8, bool7));
  1524. if (str3 != null) {
  1525. gtrWidgetConfig.setAdditiveImageConfig(str3);
  1526. gtrWidgetConfig.setAdditiveCount(bool5);
  1527. gtrWidgetConfig.parseAdditiveImages();
  1528. }
  1529. if (str2 != null) {
  1530. gtrWidgetConfig.setPointerConfig(str2);
  1531. gtrWidgetConfig.setPointerX(i2);
  1532. gtrWidgetConfig.setPointerY(n);
  1533. gtrWidgetConfig.setPointerCenterX(i1);
  1534. gtrWidgetConfig.setPointerCenterY(m);
  1535. gtrWidgetConfig.setPointerA0(k);
  1536. gtrWidgetConfig.setPointerA1(j);
  1537. gtrWidgetConfig.parsePointerBitmap();
  1538. }
  1539. this.mGtrWidgets.add(gtrWidgetConfig);
  1540. }
  1541. }
  1542.  
  1543. private void parseGtrTimehand(WatchFaceComponent paramWatchFaceComponent) {
  1544. boolean bool6 = false;
  1545. boolean bool5 = false;
  1546. boolean bool4 = false;
  1547. boolean bool3 = false;
  1548. boolean bool2 = false;
  1549. boolean bool1 = false;
  1550. boolean bool12 = false;
  1551. boolean bool11 = false;
  1552. boolean bool10 = false;
  1553. boolean bool9 = false;
  1554. boolean bool8 = false;
  1555. boolean bool7 = false;
  1556. int k = 0;
  1557. int j = 0;
  1558. String str4 = null;
  1559. String str3 = null;
  1560. String str1 = null;
  1561. String str2 = null;
  1562. int i = 0;
  1563. while (i < paramWatchFaceComponent.ItemList.size()) {
  1564. boolean bool13;
  1565. boolean bool14;
  1566. boolean bool15;
  1567. boolean bool16;
  1568. boolean bool17;
  1569. boolean bool18;
  1570. boolean bool19;
  1571. boolean bool20;
  1572. boolean bool21;
  1573. boolean bool22;
  1574. boolean bool23;
  1575. boolean bool24;
  1576. String str5;
  1577. String str6;
  1578. String str7;
  1579. WatchFaceComponentItem watchFaceComponentItem = paramWatchFaceComponent.ItemList.get(i);
  1580. if (watchFaceComponentItem.getType().equals("hour")) {
  1581. bool15 = watchFaceComponentItem.getX();
  1582. bool13 = watchFaceComponentItem.getY();
  1583. bool21 = watchFaceComponentItem.getXCenter();
  1584. bool18 = watchFaceComponentItem.getYCenter();
  1585. str5 = watchFaceComponentItem.getConfig();
  1586. bool24 = bool1;
  1587. bool23 = bool2;
  1588. bool22 = bool3;
  1589. bool19 = bool4;
  1590. str7 = str1;
  1591. bool20 = bool7;
  1592. bool17 = bool8;
  1593. str6 = str3;
  1594. bool16 = bool9;
  1595. bool14 = bool10;
  1596. } else if (watchFaceComponentItem.getType().equals("min")) {
  1597. bool14 = watchFaceComponentItem.getX();
  1598. bool16 = watchFaceComponentItem.getY();
  1599. bool19 = watchFaceComponentItem.getXCenter();
  1600. bool22 = watchFaceComponentItem.getYCenter();
  1601. str6 = watchFaceComponentItem.getConfig();
  1602. bool15 = bool12;
  1603. bool13 = bool11;
  1604. str5 = str4;
  1605. bool17 = bool8;
  1606. bool20 = bool7;
  1607. str7 = str1;
  1608. bool21 = bool6;
  1609. bool18 = bool5;
  1610. bool23 = bool2;
  1611. bool24 = bool1;
  1612. } else if (watchFaceComponentItem.getType().equals("sec")) {
  1613. bool17 = watchFaceComponentItem.getX();
  1614. bool20 = watchFaceComponentItem.getY();
  1615. bool23 = watchFaceComponentItem.getXCenter();
  1616. bool24 = watchFaceComponentItem.getYCenter();
  1617. str7 = watchFaceComponentItem.getConfig();
  1618. bool15 = bool12;
  1619. bool13 = bool11;
  1620. str5 = str4;
  1621. bool14 = bool10;
  1622. bool16 = bool9;
  1623. str6 = str3;
  1624. bool21 = bool6;
  1625. bool18 = bool5;
  1626. bool19 = bool4;
  1627. bool22 = bool3;
  1628. } else {
  1629. bool15 = bool12;
  1630. bool13 = bool11;
  1631. str5 = str4;
  1632. bool14 = bool10;
  1633. bool16 = bool9;
  1634. str6 = str3;
  1635. bool17 = bool8;
  1636. bool20 = bool7;
  1637. str7 = str1;
  1638. bool21 = bool6;
  1639. bool18 = bool5;
  1640. bool19 = bool4;
  1641. bool22 = bool3;
  1642. bool23 = bool2;
  1643. bool24 = bool1;
  1644. if (watchFaceComponentItem.getType().equals("point")) {
  1645. k = watchFaceComponentItem.getX();
  1646. j = watchFaceComponentItem.getY();
  1647. str2 = watchFaceComponentItem.getConfig();
  1648. bool15 = bool12;
  1649. bool13 = bool11;
  1650. str5 = str4;
  1651. bool14 = bool10;
  1652. bool16 = bool9;
  1653. str6 = str3;
  1654. bool17 = bool8;
  1655. bool20 = bool7;
  1656. str7 = str1;
  1657. bool21 = bool6;
  1658. bool18 = bool5;
  1659. bool19 = bool4;
  1660. bool22 = bool3;
  1661. bool23 = bool2;
  1662. bool24 = bool1;
  1663. }
  1664. }
  1665. i++;
  1666. bool12 = bool15;
  1667. bool11 = bool13;
  1668. str4 = str5;
  1669. bool10 = bool14;
  1670. bool9 = bool16;
  1671. str3 = str6;
  1672. bool8 = bool17;
  1673. bool7 = bool20;
  1674. str1 = str7;
  1675. bool6 = bool21;
  1676. bool5 = bool18;
  1677. bool4 = bool19;
  1678. bool3 = bool22;
  1679. bool2 = bool23;
  1680. bool1 = bool24;
  1681. }
  1682. this.mGtrTimehand = new GtrTimehand(bool12, bool11, str4, bool10, bool9, str3, bool8, bool7, str1);
  1683. this.mGtrTimehand.setCenterHourX(bool6);
  1684. this.mGtrTimehand.setCenterHourY(bool5);
  1685. this.mGtrTimehand.setCenterMinX(bool4);
  1686. this.mGtrTimehand.setCenterMinY(bool3);
  1687. this.mGtrTimehand.setCenterSecX(bool2);
  1688. this.mGtrTimehand.setCenterSecY(bool1);
  1689. this.mGtrTimehand.setPointX(k);
  1690. this.mGtrTimehand.setPointY(j);
  1691. this.mGtrTimehand.setmPointConfig(str2);
  1692. this.mGtrTimehand.GtrTimehandParseDrawable();
  1693. this.mGtrTimehand.GtrTimehandParseBitmap();
  1694. }
  1695.  
  1696. private void parseGtrWidget(WatchFaceComponent paramWatchFaceComponent) {
  1697. if (paramWatchFaceComponent.getDataType() == 10) {
  1698. String str9 = null;
  1699. int i25 = 0;
  1700. int i24 = 0;
  1701. int i23 = 0;
  1702. int i22 = 0;
  1703. int i21 = 0;
  1704. int i20 = 0;
  1705. boolean bool25 = false;
  1706. boolean bool24 = false;
  1707. boolean bool23 = false;
  1708. boolean bool22 = false;
  1709. boolean bool21 = false;
  1710. boolean bool20 = false;
  1711. boolean bool19 = false;
  1712. boolean bool18 = false;
  1713. String str6 = null;
  1714. boolean bool14 = false;
  1715. boolean bool13 = false;
  1716. boolean bool15 = false;
  1717. String str8 = "0";
  1718. String str7 = null;
  1719. boolean bool12 = false;
  1720. boolean bool11 = false;
  1721. boolean bool16 = false;
  1722. boolean bool17 = false;
  1723. String str5 = null;
  1724. int i15 = 0;
  1725. int i13 = 0;
  1726. int i19 = 0;
  1727. int i17 = 0;
  1728. int i18 = 0;
  1729. int i16 = 0;
  1730. int i26 = paramWatchFaceComponent.getId();
  1731. int i27 = paramWatchFaceComponent.getDataType();
  1732. int i14 = 0;
  1733. while (i14 < paramWatchFaceComponent.ItemList.size()) {
  1734. int i28;
  1735. int i29;
  1736. boolean bool26;
  1737. int i30;
  1738. int i31;
  1739. int i32;
  1740. int i33;
  1741. boolean bool27;
  1742. boolean bool28;
  1743. boolean bool29;
  1744. boolean bool30;
  1745. boolean bool31;
  1746. boolean bool32;
  1747. boolean bool33;
  1748. boolean bool34;
  1749. boolean bool35;
  1750. boolean bool36;
  1751. boolean bool37;
  1752. boolean bool38;
  1753. boolean bool39;
  1754. boolean bool40;
  1755. int i34;
  1756. int i35;
  1757. int i36;
  1758. int i37;
  1759. int i38;
  1760. int i39;
  1761. String str10;
  1762. String str11;
  1763. String str12;
  1764. String str13;
  1765. String str14;
  1766. WatchFaceComponentItem watchFaceComponentItem = paramWatchFaceComponent.ItemList.get(i14);
  1767. if (watchFaceComponentItem.getType().equals("level")) {
  1768. i25 = watchFaceComponentItem.getX0();
  1769. i20 = watchFaceComponentItem.getY0();
  1770. i24 = watchFaceComponentItem.getX1();
  1771. i21 = watchFaceComponentItem.getY1();
  1772. i22 = watchFaceComponentItem.getAlign();
  1773. i23 = watchFaceComponentItem.getSpace();
  1774. str9 = watchFaceComponentItem.getFontConfig();
  1775. i29 = i25;
  1776. i33 = i20;
  1777. i28 = i24;
  1778. i30 = i21;
  1779. i31 = i22;
  1780. str10 = str9;
  1781. i32 = i23;
  1782. bool27 = bool25;
  1783. bool28 = bool24;
  1784. bool29 = bool23;
  1785. bool30 = bool22;
  1786. str11 = str8;
  1787. bool31 = bool21;
  1788. bool32 = bool20;
  1789. bool33 = bool19;
  1790. bool34 = bool18;
  1791. bool26 = bool17;
  1792. str12 = str7;
  1793. bool35 = bool16;
  1794. bool36 = bool15;
  1795. bool37 = bool14;
  1796. bool38 = bool13;
  1797. str13 = str6;
  1798. bool39 = bool12;
  1799. bool40 = bool11;
  1800. str14 = str5;
  1801. i34 = i19;
  1802. i35 = i18;
  1803. i36 = i17;
  1804. i37 = i16;
  1805. i38 = i15;
  1806. i39 = i13;
  1807. if ((i22 & 0x8) > 0) {
  1808. i29 = i25 - 20;
  1809. i28 = i24 + 20;
  1810. i39 = i13;
  1811. i38 = i15;
  1812. i37 = i16;
  1813. i36 = i17;
  1814. i35 = i18;
  1815. i34 = i19;
  1816. str14 = str5;
  1817. bool40 = bool11;
  1818. bool39 = bool12;
  1819. str13 = str6;
  1820. bool38 = bool13;
  1821. bool37 = bool14;
  1822. bool36 = bool15;
  1823. bool35 = bool16;
  1824. str12 = str7;
  1825. bool26 = bool17;
  1826. bool34 = bool18;
  1827. bool33 = bool19;
  1828. bool32 = bool20;
  1829. bool31 = bool21;
  1830. str11 = str8;
  1831. bool30 = bool22;
  1832. bool29 = bool23;
  1833. bool28 = bool24;
  1834. bool27 = bool25;
  1835. i32 = i23;
  1836. str10 = str9;
  1837. i31 = i22;
  1838. i30 = i21;
  1839. i33 = i20;
  1840. }
  1841. } else if (watchFaceComponentItem.getType().equals("Arc")) {
  1842. bool27 = watchFaceComponentItem.getXCenter();
  1843. bool28 = watchFaceComponentItem.getYCenter();
  1844. bool29 = watchFaceComponentItem.getRx();
  1845. bool30 = watchFaceComponentItem.getRy();
  1846. str11 = watchFaceComponentItem.getColor();
  1847. bool31 = watchFaceComponentItem.getSize();
  1848. bool32 = watchFaceComponentItem.getCap();
  1849. bool33 = watchFaceComponentItem.getA0();
  1850. bool34 = watchFaceComponentItem.getA1();
  1851. i29 = i25;
  1852. i33 = i24;
  1853. i28 = i23;
  1854. i30 = i22;
  1855. i31 = i21;
  1856. str10 = str9;
  1857. i32 = i20;
  1858. bool26 = bool17;
  1859. str12 = str7;
  1860. bool35 = bool16;
  1861. bool36 = bool15;
  1862. bool37 = bool14;
  1863. bool38 = bool13;
  1864. str13 = str6;
  1865. bool39 = bool12;
  1866. bool40 = bool11;
  1867. str14 = str5;
  1868. i34 = i19;
  1869. i35 = i18;
  1870. i36 = i17;
  1871. i37 = i16;
  1872. i38 = i15;
  1873. i39 = i13;
  1874. } else if (watchFaceComponentItem.getType().equals("percent")) {
  1875. IconWidget iconWidget = new IconWidget(watchFaceComponentItem.getX(), watchFaceComponentItem.getY(), watchFaceComponentItem.getConfig());
  1876. this.mIconWidgets.add(iconWidget);
  1877. i29 = i25;
  1878. i33 = i24;
  1879. i28 = i23;
  1880. i30 = i22;
  1881. i31 = i21;
  1882. str10 = str9;
  1883. i32 = i20;
  1884. bool27 = bool25;
  1885. bool28 = bool24;
  1886. bool29 = bool23;
  1887. bool30 = bool22;
  1888. str11 = str8;
  1889. bool31 = bool21;
  1890. bool32 = bool20;
  1891. bool33 = bool19;
  1892. bool34 = bool18;
  1893. bool26 = bool17;
  1894. str12 = str7;
  1895. bool35 = bool16;
  1896. bool36 = bool15;
  1897. bool37 = bool14;
  1898. bool38 = bool13;
  1899. str13 = str6;
  1900. bool39 = bool12;
  1901. bool40 = bool11;
  1902. str14 = str5;
  1903. i34 = i19;
  1904. i35 = i18;
  1905. i36 = i17;
  1906. i37 = i16;
  1907. i38 = i15;
  1908. i39 = i13;
  1909. } else if (watchFaceComponentItem.getType().equals("batteryimage")) {
  1910. str13 = watchFaceComponentItem.getBitmaparray();
  1911. bool36 = watchFaceComponentItem.getBitmaparray_count();
  1912. bool35 = watchFaceComponentItem.getNewDisplayStyle();
  1913. bool26 = watchFaceComponentItem.getNewDisplayStyle();
  1914. bool37 = watchFaceComponentItem.getX();
  1915. bool38 = watchFaceComponentItem.getY();
  1916. i29 = i25;
  1917. i33 = i24;
  1918. i28 = i23;
  1919. i30 = i22;
  1920. i31 = i21;
  1921. str10 = str9;
  1922. i32 = i20;
  1923. bool27 = bool25;
  1924. bool28 = bool24;
  1925. bool29 = bool23;
  1926. bool30 = bool22;
  1927. str11 = str8;
  1928. bool31 = bool21;
  1929. bool32 = bool20;
  1930. bool33 = bool19;
  1931. bool34 = bool18;
  1932. str12 = str7;
  1933. bool39 = bool12;
  1934. bool40 = bool11;
  1935. str14 = str5;
  1936. i34 = i19;
  1937. i35 = i18;
  1938. i36 = i17;
  1939. i37 = i16;
  1940. i38 = i15;
  1941. i39 = i13;
  1942. } else if (watchFaceComponentItem.getType().equals("AdditiveImage")) {
  1943. str12 = watchFaceComponentItem.getAdditiveBitmapConfig();
  1944. bool40 = watchFaceComponentItem.getNewDisplayStyle();
  1945. bool26 = watchFaceComponentItem.getAdditiveBitmapCount();
  1946. bool39 = watchFaceComponentItem.getContinueMode();
  1947. i29 = i25;
  1948. i33 = i24;
  1949. i28 = i23;
  1950. i30 = i22;
  1951. i31 = i21;
  1952. str10 = str9;
  1953. i32 = i20;
  1954. bool27 = bool25;
  1955. bool28 = bool24;
  1956. bool29 = bool23;
  1957. bool30 = bool22;
  1958. str11 = str8;
  1959. bool31 = bool21;
  1960. bool32 = bool20;
  1961. bool33 = bool19;
  1962. bool34 = bool18;
  1963. bool35 = bool16;
  1964. bool36 = bool15;
  1965. bool37 = bool14;
  1966. bool38 = bool13;
  1967. str13 = str6;
  1968. str14 = str5;
  1969. i34 = i19;
  1970. i35 = i18;
  1971. i36 = i17;
  1972. i37 = i16;
  1973. i38 = i15;
  1974. i39 = i13;
  1975. } else {
  1976. i29 = i25;
  1977. i33 = i24;
  1978. i28 = i23;
  1979. i30 = i22;
  1980. i31 = i21;
  1981. str10 = str9;
  1982. i32 = i20;
  1983. bool27 = bool25;
  1984. bool28 = bool24;
  1985. bool29 = bool23;
  1986. bool30 = bool22;
  1987. str11 = str8;
  1988. bool31 = bool21;
  1989. bool32 = bool20;
  1990. bool33 = bool19;
  1991. bool34 = bool18;
  1992. bool26 = bool17;
  1993. str12 = str7;
  1994. bool35 = bool16;
  1995. bool36 = bool15;
  1996. bool37 = bool14;
  1997. bool38 = bool13;
  1998. str13 = str6;
  1999. bool39 = bool12;
  2000. bool40 = bool11;
  2001. str14 = str5;
  2002. i34 = i19;
  2003. i35 = i18;
  2004. i36 = i17;
  2005. i37 = i16;
  2006. i38 = i15;
  2007. i39 = i13;
  2008. if (watchFaceComponentItem.getType().equals("pointer")) {
  2009. i34 = watchFaceComponentItem.getX();
  2010. i36 = watchFaceComponentItem.getY();
  2011. str14 = watchFaceComponentItem.getConfig();
  2012. i35 = watchFaceComponentItem.getXCenter();
  2013. i37 = watchFaceComponentItem.getYCenter();
  2014. i38 = watchFaceComponentItem.getA0();
  2015. i39 = watchFaceComponentItem.getA1();
  2016. i29 = i25;
  2017. i33 = i24;
  2018. i28 = i23;
  2019. i30 = i22;
  2020. i31 = i21;
  2021. str10 = str9;
  2022. i32 = i20;
  2023. bool27 = bool25;
  2024. bool28 = bool24;
  2025. bool29 = bool23;
  2026. bool30 = bool22;
  2027. str11 = str8;
  2028. bool31 = bool21;
  2029. bool32 = bool20;
  2030. bool33 = bool19;
  2031. bool34 = bool18;
  2032. bool26 = bool17;
  2033. str12 = str7;
  2034. bool35 = bool16;
  2035. bool36 = bool15;
  2036. bool37 = bool14;
  2037. bool38 = bool13;
  2038. str13 = str6;
  2039. bool39 = bool12;
  2040. bool40 = bool11;
  2041. }
  2042. }
  2043. i14++;
  2044. i25 = i29;
  2045. i24 = i33;
  2046. i23 = i28;
  2047. i22 = i30;
  2048. i21 = i31;
  2049. str9 = str10;
  2050. i20 = i32;
  2051. bool25 = bool27;
  2052. bool24 = bool28;
  2053. bool23 = bool29;
  2054. bool22 = bool30;
  2055. str8 = str11;
  2056. bool21 = bool31;
  2057. bool20 = bool32;
  2058. bool19 = bool33;
  2059. bool18 = bool34;
  2060. bool17 = bool26;
  2061. str7 = str12;
  2062. bool16 = bool35;
  2063. bool15 = bool36;
  2064. bool14 = bool37;
  2065. bool13 = bool38;
  2066. str6 = str13;
  2067. bool12 = bool39;
  2068. bool11 = bool40;
  2069. str5 = str14;
  2070. i19 = i34;
  2071. i18 = i35;
  2072. i17 = i36;
  2073. i16 = i37;
  2074. i15 = i38;
  2075. i13 = i39;
  2076. }
  2077. gtrWidgetConfig = new GtrWidgetConfig(i26, i27, i25, i24, i23, i22, i21, str9, i20, 0);
  2078. gtrWidgetConfig.parseImageFontInfo();
  2079. if (bool25 || bool24 || bool23 || bool22)
  2080. gtrWidgetConfig.setmArc(new Arc(bool25, bool24, bool23, bool22, str8, bool21, bool20, bool19, bool18));
  2081. if (str6 != null && bool15) {
  2082. gtrWidgetConfig.setBitmaparray_count(bool15);
  2083. gtrWidgetConfig.setBitmaparrayConfig(str6);
  2084. gtrWidgetConfig.setBitmapArrayX(bool14);
  2085. gtrWidgetConfig.setBitmapArrayY(bool13);
  2086. gtrWidgetConfig.setBitmapNewDisplayStyle(bool16);
  2087. gtrWidgetConfig.parseBitmaparray();
  2088. }
  2089. if (str7 != null) {
  2090. gtrWidgetConfig.setAdditiveImageConfig(str7);
  2091. gtrWidgetConfig.setAdditiveCount(bool17);
  2092. gtrWidgetConfig.setNewDisplayStyle(bool11);
  2093. gtrWidgetConfig.parseAdditiveImages();
  2094. gtrWidgetConfig.setContinueMode(bool12);
  2095. }
  2096. if (str5 != null) {
  2097. gtrWidgetConfig.setPointerConfig(str5);
  2098. gtrWidgetConfig.setPointerX(i19);
  2099. gtrWidgetConfig.setPointerY(i17);
  2100. gtrWidgetConfig.setPointerCenterX(i18);
  2101. gtrWidgetConfig.setPointerCenterY(i16);
  2102. gtrWidgetConfig.setPointerA0(i15);
  2103. gtrWidgetConfig.setPointerA1(i13);
  2104. gtrWidgetConfig.parsePointerBitmap();
  2105. }
  2106. this.mGtrWidgets.add(gtrWidgetConfig);
  2107. return;
  2108. }
  2109. if (gtrWidgetConfig.getDataType() == 1 && gtrWidgetConfig.getType().equals("goal") == true) {
  2110. gtrWidgetConfig = new GtrWidgetConfig(0, 0, 0, gtrWidgetConfig.getConfig(), 0);
  2111. this.mGtrWidgets.add(gtrWidgetConfig);
  2112. return;
  2113. }
  2114. if (gtrWidgetConfig.getDataType() == 1048584) {
  2115. int i13 = gtrWidgetConfig.getDataType();
  2116. int i14 = gtrWidgetConfig.getId();
  2117. if (((WatchFaceComponent)gtrWidgetConfig).ItemList.size() > 0) {
  2118. WatchFaceComponentItem watchFaceComponentItem = ((WatchFaceComponent)gtrWidgetConfig).ItemList.get(0);
  2119. gtrWidgetConfig = new GtrWidgetConfig(i14, i13, watchFaceComponentItem.getX(), watchFaceComponentItem.getY(), watchFaceComponentItem.getBitmaparray(), watchFaceComponentItem.getBitmaparray_count());
  2120. gtrWidgetConfig.parseBitmaparray();
  2121. this.mGtrWidgets.add(gtrWidgetConfig);
  2122. return;
  2123. }
  2124. return;
  2125. }
  2126. boolean bool10 = false;
  2127. boolean bool9 = false;
  2128. boolean bool8 = false;
  2129. boolean bool7 = false;
  2130. boolean bool6 = false;
  2131. boolean bool5 = false;
  2132. boolean bool4 = false;
  2133. int i5 = 0;
  2134. String str3 = null;
  2135. String str1 = null;
  2136. boolean bool1 = false;
  2137. boolean bool3 = false;
  2138. boolean bool2 = false;
  2139. int i4 = 0;
  2140. int i2 = 0;
  2141. int i3 = 0;
  2142. int i1 = 0;
  2143. int n = 0;
  2144. int m = 1;
  2145. String str2 = null;
  2146. int i7 = gtrWidgetConfig.getId();
  2147. int i8 = gtrWidgetConfig.getDataType();
  2148. int i6 = gtrWidgetConfig.getX0();
  2149. int i9 = gtrWidgetConfig.getY0();
  2150. int k = gtrWidgetConfig.getX1();
  2151. int i10 = gtrWidgetConfig.getY1();
  2152. int i11 = gtrWidgetConfig.getSpace();
  2153. int i12 = gtrWidgetConfig.getAlign();
  2154. String str4 = gtrWidgetConfig.getFontConfig();
  2155. int j = i6;
  2156. int i = k;
  2157. if ((i12 & 0x8) > 0) {
  2158. j = i6 - 20;
  2159. i = k + 20;
  2160. }
  2161. k = 0;
  2162. while (k < ((WatchFaceComponent)gtrWidgetConfig).ItemList.size()) {
  2163. boolean bool11;
  2164. boolean bool12;
  2165. boolean bool13;
  2166. boolean bool14;
  2167. boolean bool15;
  2168. boolean bool16;
  2169. boolean bool17;
  2170. boolean bool18;
  2171. boolean bool19;
  2172. boolean bool20;
  2173. String str5;
  2174. String str6;
  2175. WatchFaceComponentItem watchFaceComponentItem = ((WatchFaceComponent)gtrWidgetConfig).ItemList.get(k);
  2176. if (watchFaceComponentItem.getType().equals("Arc")) {
  2177. bool20 = watchFaceComponentItem.getXCenter();
  2178. bool19 = watchFaceComponentItem.getYCenter();
  2179. bool18 = watchFaceComponentItem.getRx();
  2180. bool17 = watchFaceComponentItem.getRy();
  2181. str5 = watchFaceComponentItem.getColor();
  2182. bool16 = watchFaceComponentItem.getSize();
  2183. bool14 = watchFaceComponentItem.getCap();
  2184. bool12 = watchFaceComponentItem.getA0();
  2185. i6 = watchFaceComponentItem.getA1();
  2186. bool15 = bool1;
  2187. bool13 = bool2;
  2188. str6 = str1;
  2189. bool11 = bool3;
  2190. } else if (watchFaceComponentItem.getType().equals("AdditiveImage")) {
  2191. str6 = watchFaceComponentItem.getAdditiveBitmapConfig();
  2192. bool15 = watchFaceComponentItem.getNewDisplayStyle();
  2193. bool11 = watchFaceComponentItem.getAdditiveBitmapCount();
  2194. bool13 = watchFaceComponentItem.getContinueMode();
  2195. bool20 = bool10;
  2196. bool19 = bool9;
  2197. bool18 = bool8;
  2198. bool17 = bool7;
  2199. str5 = str3;
  2200. bool16 = bool6;
  2201. bool14 = bool5;
  2202. bool12 = bool4;
  2203. i6 = i5;
  2204. } else {
  2205. bool20 = bool10;
  2206. bool19 = bool9;
  2207. bool18 = bool8;
  2208. bool17 = bool7;
  2209. str5 = str3;
  2210. bool16 = bool6;
  2211. bool14 = bool5;
  2212. bool12 = bool4;
  2213. i6 = i5;
  2214. bool11 = bool3;
  2215. str6 = str1;
  2216. bool13 = bool2;
  2217. bool15 = bool1;
  2218. if (watchFaceComponentItem.getType().equals("pointer")) {
  2219. i4 = watchFaceComponentItem.getX();
  2220. i2 = watchFaceComponentItem.getY();
  2221. str2 = watchFaceComponentItem.getConfig();
  2222. i3 = watchFaceComponentItem.getXCenter();
  2223. i1 = watchFaceComponentItem.getYCenter();
  2224. n = watchFaceComponentItem.getA0();
  2225. m = watchFaceComponentItem.getA1();
  2226. bool20 = bool10;
  2227. bool19 = bool9;
  2228. bool18 = bool8;
  2229. bool17 = bool7;
  2230. str5 = str3;
  2231. bool16 = bool6;
  2232. bool14 = bool5;
  2233. bool12 = bool4;
  2234. i6 = i5;
  2235. bool11 = bool3;
  2236. str6 = str1;
  2237. bool13 = bool2;
  2238. bool15 = bool1;
  2239. }
  2240. }
  2241. k++;
  2242. bool10 = bool20;
  2243. bool9 = bool19;
  2244. bool8 = bool18;
  2245. bool7 = bool17;
  2246. str3 = str5;
  2247. bool6 = bool16;
  2248. bool5 = bool14;
  2249. bool4 = bool12;
  2250. i5 = i6;
  2251. bool3 = bool11;
  2252. str1 = str6;
  2253. bool2 = bool13;
  2254. bool1 = bool15;
  2255. }
  2256. GtrWidgetConfig gtrWidgetConfig = new GtrWidgetConfig(i7, i8, j, i9, i, i10, i12, str4, i11, 0);
  2257. gtrWidgetConfig.parseImageFontInfo();
  2258. if (bool10 || bool9 || bool8 || bool7)
  2259. gtrWidgetConfig.setmArc(new Arc(bool10, bool9, bool8, bool7, str3, bool6, bool5, bool4, i5));
  2260. if (str1 != null) {
  2261. gtrWidgetConfig.setAdditiveImageConfig(str1);
  2262. gtrWidgetConfig.setAdditiveCount(bool3);
  2263. gtrWidgetConfig.setNewDisplayStyle(bool1);
  2264. gtrWidgetConfig.parseAdditiveImages();
  2265. gtrWidgetConfig.setContinueMode(bool2);
  2266. }
  2267. if (str2 != null) {
  2268. gtrWidgetConfig.setPointerConfig(str2);
  2269. gtrWidgetConfig.setPointerX(i4);
  2270. gtrWidgetConfig.setPointerY(i2);
  2271. gtrWidgetConfig.setPointerCenterX(i3);
  2272. gtrWidgetConfig.setPointerCenterY(i1);
  2273. gtrWidgetConfig.setPointerA0(n);
  2274. gtrWidgetConfig.setPointerA1(m);
  2275. gtrWidgetConfig.parsePointerBitmap();
  2276. }
  2277. this.mGtrWidgets.add(gtrWidgetConfig);
  2278. }
  2279.  
  2280. private void parseIcon(WatchFaceComponent paramWatchFaceComponent) {
  2281. IconWidget iconWidget = new IconWidget(paramWatchFaceComponent.getX(), paramWatchFaceComponent.getY(), paramWatchFaceComponent.getConfig());
  2282. this.mIconWidgets.add(iconWidget);
  2283. }
  2284.  
  2285. private void parseLowPower(Context paramContext, String paramString) {
  2286. if (paramString != null) {
  2287. if (paramString.startsWith("@assets/")) {
  2288. String str1 = paramString.substring("@assets/".length());
  2289. paramString = getParent(str1);
  2290. String str2 = getFileName(str1);
  2291. if (isAssetsFileExist(this.mContext, paramString, str2)) {
  2292. this.mLowPowerIconSlptPath = str1;
  2293. this.mLowPowerIconType = 2;
  2294. }
  2295. return;
  2296. }
  2297. } else {
  2298. return;
  2299. }
  2300. if (paramString.startsWith("@wfz/")) {
  2301. String str = paramString.substring("@wfz/".length());
  2302. if (this.mExternalLoader != null && this.mExternalLoader.exists(str)) {
  2303. this.mLowPowerIconSlptPath = str;
  2304. this.mLowPowerIconType = 6;
  2305. return;
  2306. }
  2307. }
  2308. }
  2309.  
  2310. private void parseTimeDigital(Context paramContext, String paramString) {
  2311. if (paramString != null && paramString.length() > 2)
  2312. try {
  2313. TimeDigital timeDigital = new TimeDigital(paramString);
  2314. timeDigital.parseImageFontInfo();
  2315. Log.d("WatchFaceConfig", "parseTimeDigital success: " + timeDigital);
  2316. this.mTimeDigital = timeDigital;
  2317. return;
  2318. } catch (JSONException jSONException) {
  2319. Log.d("WatchFaceConfig", "parseTimeDigital failure: " + paramString);
  2320. return;
  2321. }
  2322. }
  2323.  
  2324. private void parseTimeDigital(WatchFaceModuleItem paramWatchFaceModuleItem) {
  2325. this.mTimeDigital = new TimeDigital(paramWatchFaceModuleItem.getModel(), paramWatchFaceModuleItem.getX(), paramWatchFaceModuleItem.getY(), paramWatchFaceModuleItem.getWidth(), paramWatchFaceModuleItem.getHeight(), paramWatchFaceModuleItem.getFontConfig(), paramWatchFaceModuleItem.getGap(), paramWatchFaceModuleItem.getColor());
  2326. this.mTimeDigital.parseImageFontInfo();
  2327. }
  2328.  
  2329. private void parseTimeDis(WatchFaceComponent paramWatchFaceComponent) {
  2330. boolean bool18 = false;
  2331. boolean bool17 = false;
  2332. boolean bool16 = false;
  2333. boolean bool15 = false;
  2334. boolean bool14 = false;
  2335. boolean bool13 = false;
  2336. boolean bool12 = false;
  2337. boolean bool11 = false;
  2338. boolean bool10 = false;
  2339. boolean bool9 = false;
  2340. boolean bool8 = false;
  2341. boolean bool7 = false;
  2342. boolean bool4 = false;
  2343. boolean bool3 = false;
  2344. boolean bool2 = false;
  2345. boolean bool1 = false;
  2346. boolean bool6 = false;
  2347. boolean bool5 = false;
  2348. int k = 0;
  2349. int j = 0;
  2350. String str7 = null;
  2351. String str6 = null;
  2352. String str5 = null;
  2353. String str3 = null;
  2354. String str1 = null;
  2355. String str4 = null;
  2356. String str2 = null;
  2357. int i = 0;
  2358. while (i < paramWatchFaceComponent.ItemList.size()) {
  2359. boolean bool19;
  2360. boolean bool20;
  2361. boolean bool21;
  2362. boolean bool22;
  2363. boolean bool23;
  2364. boolean bool24;
  2365. boolean bool25;
  2366. boolean bool26;
  2367. boolean bool27;
  2368. boolean bool28;
  2369. boolean bool29;
  2370. boolean bool30;
  2371. boolean bool31;
  2372. boolean bool32;
  2373. boolean bool33;
  2374. boolean bool34;
  2375. boolean bool35;
  2376. boolean bool36;
  2377. String str8;
  2378. String str9;
  2379. String str10;
  2380. String str11;
  2381. String str12;
  2382. String str13;
  2383. WatchFaceComponentItem watchFaceComponentItem = paramWatchFaceComponent.ItemList.get(i);
  2384. String str14 = watchFaceComponentItem.getType();
  2385. if (str14.equals("hour")) {
  2386. bool25 = watchFaceComponentItem.getHigh_x();
  2387. bool23 = watchFaceComponentItem.getHigh_y();
  2388. bool21 = watchFaceComponentItem.getLow_x();
  2389. bool19 = watchFaceComponentItem.getLow_y();
  2390. str8 = watchFaceComponentItem.getFontConfig();
  2391. bool36 = bool1;
  2392. bool35 = bool2;
  2393. str13 = str1;
  2394. bool34 = bool3;
  2395. bool33 = bool4;
  2396. str12 = str3;
  2397. bool32 = bool5;
  2398. bool31 = bool6;
  2399. str11 = str4;
  2400. str10 = str5;
  2401. bool30 = bool7;
  2402. bool29 = bool8;
  2403. bool28 = bool9;
  2404. bool27 = bool10;
  2405. str9 = str6;
  2406. bool26 = bool11;
  2407. bool24 = bool12;
  2408. bool22 = bool13;
  2409. bool20 = bool14;
  2410. } else if (str14.equals("min")) {
  2411. bool20 = watchFaceComponentItem.getHigh_x();
  2412. bool22 = watchFaceComponentItem.getHigh_y();
  2413. bool24 = watchFaceComponentItem.getLow_x();
  2414. bool26 = watchFaceComponentItem.getLow_y();
  2415. str9 = watchFaceComponentItem.getFontConfig();
  2416. bool25 = bool18;
  2417. bool23 = bool17;
  2418. bool21 = bool16;
  2419. bool19 = bool15;
  2420. str8 = str7;
  2421. bool27 = bool10;
  2422. bool28 = bool9;
  2423. bool29 = bool8;
  2424. bool30 = bool7;
  2425. str10 = str5;
  2426. str11 = str4;
  2427. bool31 = bool6;
  2428. bool32 = bool5;
  2429. str12 = str3;
  2430. bool33 = bool4;
  2431. bool34 = bool3;
  2432. str13 = str1;
  2433. bool35 = bool2;
  2434. bool36 = bool1;
  2435. } else if (str14.equals("sec")) {
  2436. bool27 = watchFaceComponentItem.getHigh_x();
  2437. bool28 = watchFaceComponentItem.getHigh_y();
  2438. bool29 = watchFaceComponentItem.getLow_x();
  2439. bool30 = watchFaceComponentItem.getLow_y();
  2440. str10 = watchFaceComponentItem.getFontConfig();
  2441. bool25 = bool18;
  2442. bool23 = bool17;
  2443. bool21 = bool16;
  2444. bool19 = bool15;
  2445. str8 = str7;
  2446. bool20 = bool14;
  2447. bool22 = bool13;
  2448. bool24 = bool12;
  2449. bool26 = bool11;
  2450. str9 = str6;
  2451. str11 = str4;
  2452. bool31 = bool6;
  2453. bool32 = bool5;
  2454. str12 = str3;
  2455. bool33 = bool4;
  2456. bool34 = bool3;
  2457. str13 = str1;
  2458. bool35 = bool2;
  2459. bool36 = bool1;
  2460. } else if (str14.equals("colon_hm")) {
  2461. bool33 = watchFaceComponentItem.getX();
  2462. bool34 = watchFaceComponentItem.getY();
  2463. str12 = watchFaceComponentItem.getConfig();
  2464. bool25 = bool18;
  2465. bool23 = bool17;
  2466. bool21 = bool16;
  2467. bool19 = bool15;
  2468. str8 = str7;
  2469. bool20 = bool14;
  2470. bool22 = bool13;
  2471. bool24 = bool12;
  2472. bool26 = bool11;
  2473. str9 = str6;
  2474. bool27 = bool10;
  2475. bool28 = bool9;
  2476. bool29 = bool8;
  2477. bool30 = bool7;
  2478. str10 = str5;
  2479. str11 = str4;
  2480. bool31 = bool6;
  2481. bool32 = bool5;
  2482. str13 = str1;
  2483. bool35 = bool2;
  2484. bool36 = bool1;
  2485. } else if (str14.equals("colon_ms")) {
  2486. bool35 = watchFaceComponentItem.getX();
  2487. bool36 = watchFaceComponentItem.getY();
  2488. str13 = watchFaceComponentItem.getConfig();
  2489. bool25 = bool18;
  2490. bool23 = bool17;
  2491. bool21 = bool16;
  2492. bool19 = bool15;
  2493. str8 = str7;
  2494. bool20 = bool14;
  2495. bool22 = bool13;
  2496. bool24 = bool12;
  2497. bool26 = bool11;
  2498. str9 = str6;
  2499. bool27 = bool10;
  2500. bool28 = bool9;
  2501. bool29 = bool8;
  2502. bool30 = bool7;
  2503. str10 = str5;
  2504. str11 = str4;
  2505. bool31 = bool6;
  2506. bool32 = bool5;
  2507. str12 = str3;
  2508. bool33 = bool4;
  2509. bool34 = bool3;
  2510. } else if (str14.equals("AM")) {
  2511. bool31 = watchFaceComponentItem.getX();
  2512. bool32 = watchFaceComponentItem.getY();
  2513. str11 = watchFaceComponentItem.getConfig();
  2514. bool25 = bool18;
  2515. bool23 = bool17;
  2516. bool21 = bool16;
  2517. bool19 = bool15;
  2518. str8 = str7;
  2519. bool20 = bool14;
  2520. bool22 = bool13;
  2521. bool24 = bool12;
  2522. bool26 = bool11;
  2523. str9 = str6;
  2524. bool27 = bool10;
  2525. bool28 = bool9;
  2526. bool29 = bool8;
  2527. bool30 = bool7;
  2528. str10 = str5;
  2529. str12 = str3;
  2530. bool33 = bool4;
  2531. bool34 = bool3;
  2532. str13 = str1;
  2533. bool35 = bool2;
  2534. bool36 = bool1;
  2535. } else {
  2536. bool25 = bool18;
  2537. bool23 = bool17;
  2538. bool21 = bool16;
  2539. bool19 = bool15;
  2540. str8 = str7;
  2541. bool20 = bool14;
  2542. bool22 = bool13;
  2543. bool24 = bool12;
  2544. bool26 = bool11;
  2545. str9 = str6;
  2546. bool27 = bool10;
  2547. bool28 = bool9;
  2548. bool29 = bool8;
  2549. bool30 = bool7;
  2550. str10 = str5;
  2551. str11 = str4;
  2552. bool31 = bool6;
  2553. bool32 = bool5;
  2554. str12 = str3;
  2555. bool33 = bool4;
  2556. bool34 = bool3;
  2557. str13 = str1;
  2558. bool35 = bool2;
  2559. bool36 = bool1;
  2560. if (str14.equals("PM")) {
  2561. k = watchFaceComponentItem.getX();
  2562. j = watchFaceComponentItem.getY();
  2563. str2 = watchFaceComponentItem.getConfig();
  2564. bool25 = bool18;
  2565. bool23 = bool17;
  2566. bool21 = bool16;
  2567. bool19 = bool15;
  2568. str8 = str7;
  2569. bool20 = bool14;
  2570. bool22 = bool13;
  2571. bool24 = bool12;
  2572. bool26 = bool11;
  2573. str9 = str6;
  2574. bool27 = bool10;
  2575. bool28 = bool9;
  2576. bool29 = bool8;
  2577. bool30 = bool7;
  2578. str10 = str5;
  2579. str11 = str4;
  2580. bool31 = bool6;
  2581. bool32 = bool5;
  2582. str12 = str3;
  2583. bool33 = bool4;
  2584. bool34 = bool3;
  2585. str13 = str1;
  2586. bool35 = bool2;
  2587. bool36 = bool1;
  2588. }
  2589. }
  2590. i++;
  2591. bool18 = bool25;
  2592. bool17 = bool23;
  2593. bool16 = bool21;
  2594. bool15 = bool19;
  2595. str7 = str8;
  2596. bool14 = bool20;
  2597. bool13 = bool22;
  2598. bool12 = bool24;
  2599. bool11 = bool26;
  2600. str6 = str9;
  2601. bool10 = bool27;
  2602. bool9 = bool28;
  2603. bool8 = bool29;
  2604. bool7 = bool30;
  2605. str5 = str10;
  2606. str4 = str11;
  2607. bool6 = bool31;
  2608. bool5 = bool32;
  2609. str3 = str12;
  2610. bool4 = bool33;
  2611. bool3 = bool34;
  2612. str1 = str13;
  2613. bool2 = bool35;
  2614. bool1 = bool36;
  2615. }
  2616. this.mTimeDis = new TimeDisplay(paramWatchFaceComponent.getModel(), bool18, bool17, bool16, bool15, str7, bool14, bool13, bool12, bool11, str6, bool10, bool9, bool8, bool7, str5);
  2617. this.mTimeDis.parseImageFontInfo();
  2618. if (str3 != null) {
  2619. this.mTimeDis.setColon_hm_config(str3);
  2620. this.mTimeDis.setColon_hm_x(bool4);
  2621. this.mTimeDis.setColon_hm_y(bool3);
  2622. }
  2623. if (str1 != null) {
  2624. this.mTimeDis.setColon_ms_config(str1);
  2625. this.mTimeDis.setColon_ms_x(bool2);
  2626. this.mTimeDis.setColon_ms_y(bool1);
  2627. }
  2628. this.mTimeDis.parseColonBitmap();
  2629. if (str4 != null) {
  2630. this.mTimeDis.setAm_x(bool6);
  2631. this.mTimeDis.setAm_y(bool5);
  2632. this.mTimeDis.setAmConfig(str4);
  2633. }
  2634. if (str2 != null) {
  2635. this.mTimeDis.setPm_x(k);
  2636. this.mTimeDis.setPm_y(j);
  2637. this.mTimeDis.setPmConfig(str2);
  2638. }
  2639. this.mTimeDis.parseAMorPMBitmap();
  2640. }
  2641.  
  2642. private void parseTimeHand(Context paramContext, String paramString) {
  2643. Drawable drawable;
  2644. if (paramString.startsWith("@assets/")) {
  2645. String str = paramString.substring("@assets/".length());
  2646. drawable = parseDrawable(2, str + File.separator + "hour.png");
  2647. if (drawable != null) {
  2648. Drawable drawable1 = parseDrawable(2, str + File.separator + "minute.png");
  2649. if (drawable1 != null) {
  2650. Drawable drawable2 = parseDrawable(2, str + File.separator + "seconds.png");
  2651. this.mTimeHand = new TimeHand();
  2652. this.mTimeHand.mHours = drawable;
  2653. this.mTimeHand.mMinute = drawable1;
  2654. this.mTimeHand.mSeconds = drawable2;
  2655. this.mTimeHandType = 2;
  2656. this.mTimeHandHourSlptPath = str + "/8c/hour/%d.png.color_map";
  2657. this.mTimeHandMinuteSlptPath = str + "/8c/minute/%d.png.color_map";
  2658. if (isAssetsFileExist(this.mContext, str + "/8c/seconds", "0.png.color_map"))
  2659. this.mTimeHandSecondsSlptPath = str + "/8c/seconds/%d.png.color_map";
  2660. if (this.mSupport26W) {
  2661. if (isAssetsFileExist(this.mContext, str + "/26w/hour", "0.png.color_map"))
  2662. this.mTimeHandHourSlpt26WPath = str + "/26w/hour/%d.png.color_map";
  2663. if (isAssetsFileExist(this.mContext, str + "/26w/minute", "0.png.color_map"))
  2664. this.mTimeHandMinuteSlpt26WPath = str + "/26w/minute/%d.png.color_map";
  2665. if (isAssetsFileExist(this.mContext, str + "/26w/seconds", "0.png.color_map")) {
  2666. this.mTimeHandSecondsSlpt26WPath = str + "/26w/seconds/%d.png.color_map";
  2667. return;
  2668. }
  2669. }
  2670. }
  2671. }
  2672. return;
  2673. }
  2674. if (drawable.startsWith("@wfz/")) {
  2675. String str = drawable.substring("@wfz/".length());
  2676. drawable = parseDrawable(6, str + File.separator + "hour.png");
  2677. if (drawable != null) {
  2678. Drawable drawable1 = parseDrawable(6, str + File.separator + "minute.png");
  2679. if (drawable1 != null) {
  2680. Drawable drawable2 = parseDrawable(6, str + File.separator + "seconds.png");
  2681. this.mTimeHand = new TimeHand();
  2682. this.mTimeHand.mHours = drawable;
  2683. this.mTimeHand.mMinute = drawable1;
  2684. this.mTimeHand.mSeconds = drawable2;
  2685. this.mTimeHandType = 6;
  2686. if (this.mExternalLoader != null) {
  2687. if (this.mExternalLoader.exists(str + "/8c/hour.png")) {
  2688. this.mTimeHandHourSlptPath = str + "/8c/hour.png";
  2689. } else if (this.mExternalLoader.exists(str + "/8c/hour/0.png.color_map")) {
  2690. this.mTimeHandHourSlptPath = str + "/8c/hour/%d.png.color_map";
  2691. }
  2692. if (this.mExternalLoader.exists(str + "/8c/minute.png")) {
  2693. this.mTimeHandMinuteSlptPath = str + "/8c/minute.png";
  2694. } else if (this.mExternalLoader.exists(str + "/8c/minute/0.png.color_map")) {
  2695. this.mTimeHandMinuteSlptPath = str + "/8c/minute/%d.png.color_map";
  2696. }
  2697. if (this.mExternalLoader.exists(str + "/8c/seconds.png")) {
  2698. this.mTimeHandSecondsSlptPath = str + "/8c/seconds.png";
  2699. } else if (this.mExternalLoader.exists(str + "/8c/seconds/0.png.color_map")) {
  2700. this.mTimeHandSecondsSlptPath = str + "/8c/seconds/%d.png.color_map";
  2701. }
  2702. if (this.mSupport26W) {
  2703. if (this.mExternalLoader.exists(str + "/26w/" + "hour.png")) {
  2704. this.mTimeHandHourSlpt26WPath = str + "/26w/" + "hour.png";
  2705. } else if (this.mExternalLoader.exists(str + "/26w/hour/0.png.color_map")) {
  2706. this.mTimeHandHourSlpt26WPath = str + "/26w/hour/%d.png.color_map";
  2707. }
  2708. if (this.mExternalLoader.exists(str + "/26w/" + "minute.png")) {
  2709. this.mTimeHandMinuteSlpt26WPath = str + "/26w/" + "minute.png";
  2710. } else if (this.mExternalLoader.exists(str + "/26w/minute/0.png.color_map")) {
  2711. this.mTimeHandMinuteSlpt26WPath = str + "/26w/minute/%d.png.color_map";
  2712. }
  2713. if (this.mExternalLoader.exists(str + "/26w/" + "seconds.png")) {
  2714. this.mTimeHandSecondsSlpt26WPath = str + "/26w/" + "seconds.png";
  2715. return;
  2716. }
  2717. if (this.mExternalLoader.exists(str + "/26w/seconds/0.png.color_map")) {
  2718. this.mTimeHandSecondsSlpt26WPath = str + "/26w/seconds/%d.png.color_map";
  2719. return;
  2720. }
  2721. }
  2722. }
  2723. }
  2724. }
  2725. }
  2726. }
  2727.  
  2728. private void parseWeather(WatchFaceComponent paramWatchFaceComponent) {
  2729. int i12 = 0;
  2730. int i11 = 0;
  2731. int i10 = 0;
  2732. int i9 = 0;
  2733. int i8 = 0;
  2734. byte b2 = 0;
  2735. String str3 = null;
  2736. int i7 = 0;
  2737. int i6 = 0;
  2738. int i5 = 0;
  2739. int i4 = 0;
  2740. int i3 = 0;
  2741. byte b1 = 0;
  2742. String str2 = null;
  2743. int i2 = 0;
  2744. int i1 = 0;
  2745. int n = 0;
  2746. int m = 0;
  2747. int k = 0;
  2748. int j = 0;
  2749. String str1 = null;
  2750. int i = 0;
  2751. if (paramWatchFaceComponent != null) {
  2752. int i14 = paramWatchFaceComponent.getDataType();
  2753. int i13 = 0;
  2754. while (i13 < paramWatchFaceComponent.ItemList.size()) {
  2755. int i15;
  2756. int i16;
  2757. int i17;
  2758. int i18;
  2759. int i19;
  2760. int i20;
  2761. int i21;
  2762. int i22;
  2763. byte b3;
  2764. int i23;
  2765. int i24;
  2766. int i25;
  2767. int i26;
  2768. byte b4;
  2769. int i27;
  2770. int i28;
  2771. int i29;
  2772. int i30;
  2773. String str4;
  2774. String str5;
  2775. String str6;
  2776. WatchFaceComponentItem watchFaceComponentItem = paramWatchFaceComponent.ItemList.get(i13);
  2777. if (watchFaceComponentItem.getType().equals("High")) {
  2778. b2 = 1;
  2779. int i31 = watchFaceComponentItem.getX0();
  2780. i8 = watchFaceComponentItem.getY0();
  2781. i12 = watchFaceComponentItem.getX1();
  2782. i9 = watchFaceComponentItem.getY1();
  2783. i10 = watchFaceComponentItem.getAlign();
  2784. i11 = watchFaceComponentItem.getSpace();
  2785. str3 = watchFaceComponentItem.getFontConfig();
  2786. i17 = i31;
  2787. i23 = i8;
  2788. i15 = i12;
  2789. i21 = i9;
  2790. i22 = i10;
  2791. b3 = i11;
  2792. str4 = str3;
  2793. i16 = i7;
  2794. i24 = i6;
  2795. i18 = i5;
  2796. i25 = i4;
  2797. i26 = i3;
  2798. b4 = b1;
  2799. str5 = str2;
  2800. i19 = i2;
  2801. i27 = i1;
  2802. i20 = n;
  2803. i28 = m;
  2804. i29 = k;
  2805. i30 = j;
  2806. str6 = str1;
  2807. i = b2;
  2808. if ((i10 & 0x8) > 0) {
  2809. i17 = i31 - 20;
  2810. i15 = i12 + 20;
  2811. i = b2;
  2812. str6 = str1;
  2813. i30 = j;
  2814. i29 = k;
  2815. i28 = m;
  2816. i20 = n;
  2817. i27 = i1;
  2818. i19 = i2;
  2819. str5 = str2;
  2820. b4 = b1;
  2821. i26 = i3;
  2822. i25 = i4;
  2823. i18 = i5;
  2824. i24 = i6;
  2825. i16 = i7;
  2826. str4 = str3;
  2827. b3 = i11;
  2828. i22 = i10;
  2829. i21 = i9;
  2830. i23 = i8;
  2831. }
  2832. } else if (watchFaceComponentItem.getType().equals("Low")) {
  2833. b1 = 1;
  2834. int i31 = watchFaceComponentItem.getX0();
  2835. i3 = watchFaceComponentItem.getY0();
  2836. i7 = watchFaceComponentItem.getX1();
  2837. i4 = watchFaceComponentItem.getY1();
  2838. i5 = watchFaceComponentItem.getAlign();
  2839. i6 = watchFaceComponentItem.getSpace();
  2840. str2 = watchFaceComponentItem.getFontConfig();
  2841. i17 = i12;
  2842. i23 = i11;
  2843. i15 = i10;
  2844. i21 = i9;
  2845. i22 = i8;
  2846. b3 = b2;
  2847. str4 = str3;
  2848. i16 = i31;
  2849. i24 = i3;
  2850. i18 = i7;
  2851. i25 = i4;
  2852. i26 = i5;
  2853. b4 = i6;
  2854. str5 = str2;
  2855. i19 = i2;
  2856. i27 = i1;
  2857. i20 = n;
  2858. i28 = m;
  2859. i29 = k;
  2860. i30 = j;
  2861. str6 = str1;
  2862. i = b1;
  2863. if ((i5 & 0x8) > 0) {
  2864. i16 = i31 - 20;
  2865. i18 = i7 + 20;
  2866. i17 = i12;
  2867. i23 = i11;
  2868. i15 = i10;
  2869. i21 = i9;
  2870. i22 = i8;
  2871. b3 = b2;
  2872. str4 = str3;
  2873. i24 = i3;
  2874. i25 = i4;
  2875. i26 = i5;
  2876. b4 = i6;
  2877. str5 = str2;
  2878. i19 = i2;
  2879. i27 = i1;
  2880. i20 = n;
  2881. i28 = m;
  2882. i29 = k;
  2883. i30 = j;
  2884. str6 = str1;
  2885. i = b1;
  2886. }
  2887. } else {
  2888. i17 = i12;
  2889. i23 = i11;
  2890. i15 = i10;
  2891. i21 = i9;
  2892. i22 = i8;
  2893. b3 = b2;
  2894. str4 = str3;
  2895. i16 = i7;
  2896. i24 = i6;
  2897. i18 = i5;
  2898. i25 = i4;
  2899. i26 = i3;
  2900. b4 = b1;
  2901. str5 = str2;
  2902. i19 = i2;
  2903. i27 = i1;
  2904. i20 = n;
  2905. i28 = m;
  2906. i29 = k;
  2907. i30 = j;
  2908. str6 = str1;
  2909. if (watchFaceComponentItem.getType().equals("H&L")) {
  2910. j = 1;
  2911. int i31 = watchFaceComponentItem.getX0();
  2912. k = watchFaceComponentItem.getY0();
  2913. i2 = watchFaceComponentItem.getX1();
  2914. m = watchFaceComponentItem.getY1();
  2915. n = watchFaceComponentItem.getAlign();
  2916. i1 = watchFaceComponentItem.getSpace();
  2917. str1 = watchFaceComponentItem.getFontConfig();
  2918. i17 = i12;
  2919. i23 = i11;
  2920. i15 = i10;
  2921. i21 = i9;
  2922. i22 = i8;
  2923. b3 = b2;
  2924. str4 = str3;
  2925. i16 = i7;
  2926. i24 = i6;
  2927. i18 = i5;
  2928. i25 = i4;
  2929. i26 = i3;
  2930. b4 = b1;
  2931. str5 = str2;
  2932. i19 = i31;
  2933. i27 = k;
  2934. i20 = i2;
  2935. i28 = m;
  2936. i29 = n;
  2937. i30 = i1;
  2938. str6 = str1;
  2939. i = j;
  2940. if ((n & 0x8) > 0) {
  2941. i19 = i31 - 20;
  2942. i20 = i2 + 20;
  2943. i17 = i12;
  2944. i23 = i11;
  2945. i15 = i10;
  2946. i21 = i9;
  2947. i22 = i8;
  2948. b3 = b2;
  2949. str4 = str3;
  2950. i16 = i7;
  2951. i24 = i6;
  2952. i18 = i5;
  2953. i25 = i4;
  2954. i26 = i3;
  2955. b4 = b1;
  2956. str5 = str2;
  2957. i27 = k;
  2958. i28 = m;
  2959. i29 = n;
  2960. i30 = i1;
  2961. str6 = str1;
  2962. i = j;
  2963. }
  2964. }
  2965. }
  2966. i13++;
  2967. i12 = i17;
  2968. i11 = i23;
  2969. i10 = i15;
  2970. i9 = i21;
  2971. i8 = i22;
  2972. b2 = b3;
  2973. str3 = str4;
  2974. i7 = i16;
  2975. i6 = i24;
  2976. i5 = i18;
  2977. i4 = i25;
  2978. i3 = i26;
  2979. b1 = b4;
  2980. str2 = str5;
  2981. i2 = i19;
  2982. i1 = i27;
  2983. n = i20;
  2984. m = i28;
  2985. k = i29;
  2986. j = i30;
  2987. str1 = str6;
  2988. }
  2989. if (i != 0) {
  2990. this.mGtrWeather = new GtrWeather(i14);
  2991. if (str3 != null)
  2992. this.mGtrWeather.setHighTemp(i12, i11, i10, i9, i8, b2, str3);
  2993. if (str2 != null)
  2994. this.mGtrWeather.setLowTemp(i7, i6, i5, i4, i3, b1, str2);
  2995. if (str1 != null)
  2996. this.mGtrWeather.setHighLowTemp(i2, i1, n, m, k, j, str1);
  2997. this.mGtrWeather.parseImageFontInfo();
  2998. }
  2999. }
  3000. }
  3001.  
  3002. public static void recycleBitmap(Bitmap paramBitmap) {
  3003. if (paramBitmap != null && !paramBitmap.isRecycled())
  3004. paramBitmap.recycle();
  3005. }
  3006.  
  3007. public static void recycleBitmapArray(Bitmap[] paramArrayOfBitmap) {
  3008. if (paramArrayOfBitmap != null) {
  3009. int j = paramArrayOfBitmap.length;
  3010. for (int i = 0; i < j; i++)
  3011. recycleBitmap(paramArrayOfBitmap[i]);
  3012. }
  3013. }
  3014.  
  3015. public Drawable getBgDrawable() {
  3016. return this.mBgDrawable;
  3017. }
  3018.  
  3019. public String getBgPathSlpt() {
  3020. return this.mBgPathSlpt;
  3021. }
  3022.  
  3023. public String getBgPathSlpt26W() {
  3024. return this.mBgPathSlpt26W;
  3025. }
  3026.  
  3027. public int getBgType() {
  3028. return this.mBgType;
  3029. }
  3030.  
  3031. public ArrayList<WatchFaceConfigTemplate.DataWidgetConfig> getDataWidgets() {
  3032. return this.mWidgets;
  3033. }
  3034.  
  3035. public DateDigital getDateDigital() {
  3036. return mDateDigital;
  3037. }
  3038.  
  3039. public Drawable getGraduation() {
  3040. return this.mGraduation;
  3041. }
  3042.  
  3043. public String getGraduationPathSlpt() {
  3044. return this.mGraduationSlptPath;
  3045. }
  3046.  
  3047. public String getGraduationPathSlpt26W() {
  3048. return this.mGraduationSlptPath26W;
  3049. }
  3050.  
  3051. public int getGraduationType() {
  3052. return this.mGraduationType;
  3053. }
  3054.  
  3055. public ArrayList<GtrWidgetConfig> getGtrWidgets() {
  3056. return this.mGtrWidgets;
  3057. }
  3058.  
  3059. public String getHourPathSlpt() {
  3060. return this.mTimeHandHourSlptPath;
  3061. }
  3062.  
  3063. public String getHourPathSlpt26W() {
  3064. return this.mTimeHandHourSlpt26WPath;
  3065. }
  3066.  
  3067. public List<IconWidget> getIconWidgets() {
  3068. return this.mIconWidgets;
  3069. }
  3070.  
  3071. public String getLowPowerIconPath() {
  3072. return this.mLowPowerIconSlptPath;
  3073. }
  3074.  
  3075. public int getLowPowerIconType() {
  3076. return this.mLowPowerIconType;
  3077. }
  3078.  
  3079. public int getLowPowerX() {
  3080. return this.mLowPowerX;
  3081. }
  3082.  
  3083. public int getLowPowerY() {
  3084. return this.mLowPowerY;
  3085. }
  3086.  
  3087. public String getMinutePathSlpt() {
  3088. return this.mTimeHandMinuteSlptPath;
  3089. }
  3090.  
  3091. public String getMinutePathSlpt26W() {
  3092. return this.mTimeHandMinuteSlpt26WPath;
  3093. }
  3094.  
  3095. public String getParent(String paramString) {
  3096. int k = paramString.length();
  3097. int j = paramString.lastIndexOf(File.separatorChar);
  3098. int i = j;
  3099. if (j == -1) {
  3100. i = j;
  3101. if (false)
  3102. i = 2;
  3103. }
  3104. return (i == -1 || paramString.charAt(k - 1) == File.separatorChar) ? null : ((paramString.indexOf(File.separatorChar) == i && paramString.charAt(0) == File.separatorChar) ? paramString.substring(0, i + 1) : paramString.substring(0, i));
  3105. }
  3106.  
  3107. public String getSecondsPathSlpt() {
  3108. return this.mTimeHandSecondsSlptPath;
  3109. }
  3110.  
  3111. public String getSecondsPathSlpt26W() {
  3112. return this.mTimeHandSecondsSlpt26WPath;
  3113. }
  3114.  
  3115. public int getStatusBarPosX() {
  3116. return this.mStatusBarPosX;
  3117. }
  3118.  
  3119. public int getStatusBarPosY() {
  3120. return this.mStatusBarPosY;
  3121. }
  3122.  
  3123. public TimeDigital getTimeDigital() {
  3124. return this.mTimeDigital;
  3125. }
  3126.  
  3127. public TimeDisplay getTimeDis() {
  3128. return this.mTimeDis;
  3129. }
  3130.  
  3131. public TimeHand getTimeHand() {
  3132. return this.mTimeHand;
  3133. }
  3134.  
  3135. public int getTimeHandType() {
  3136. return this.mTimeHandType;
  3137. }
  3138.  
  3139. public GtrDatehand getmGtrDatehand() {
  3140. return this.mGtrDatehand;
  3141. }
  3142.  
  3143. public GtrTimehand getmGtrTimehand() {
  3144. return this.mGtrTimehand;
  3145. }
  3146.  
  3147. public boolean isSupport26W() {
  3148. return this.mSupport26W;
  3149. }
  3150.  
  3151. public void onDestroy() {
  3152. if (this.mGtrTimehand != null) {
  3153. this.mGtrTimehand.onDestory();
  3154. this.mGtrTimehand = null;
  3155. }
  3156. if (this.mGtrWidgets != null) {
  3157. Iterator<GtrWidgetConfig> iterator = this.mGtrWidgets.iterator();
  3158. while (iterator.hasNext())
  3159. ((GtrWidgetConfig)iterator.next()).onDestroy();
  3160. this.mGtrWidgets = null;
  3161. }
  3162. if (this.mGtrDatehand != null) {
  3163. this.mGtrDatehand.onDestroy();
  3164. this.mGtrDatehand = null;
  3165. }
  3166. if (this.mTimeDigital != null)
  3167. this.mTimeDigital.onDestroy();
  3168. if (this.mIconWidgets != null) {
  3169. Iterator<IconWidget> iterator = this.mIconWidgets.iterator();
  3170. while (iterator.hasNext())
  3171. ((IconWidget)iterator.next()).onDestroy();
  3172. this.mIconWidgets = null;
  3173. }
  3174. if (this.mTimeDis != null) {
  3175. this.mTimeDis.onDestroy();
  3176. this.mTimeDis = null;
  3177. }
  3178. if (mDateDigital != null) {
  3179. mDateDigital.onDestory();
  3180. mDateDigital = null;
  3181. }
  3182. if (this.mGtrWeather != null) {
  3183. this.mGtrWeather.onDestory();
  3184. this.mGtrWeather = null;
  3185. }
  3186. }
  3187.  
  3188. public byte[] parseCacheFile(String paramString) {
  3189. return getByteStream(new File(paramString));
  3190. }
  3191.  
  3192. public byte[] parseFile(int paramInt, String paramString) {
  3193. if (paramString != null && paramString.length() > 0) {
  3194. switch (paramInt) {
  3195. default:
  3196. return null;
  3197. case 6:
  3198. break;
  3199. }
  3200. if (this.mExternalLoader != null)
  3201. return this.mExternalLoader.readFile(paramString);
  3202. }
  3203. }
  3204.  
  3205. public Bitmap parseFileToBitmap(int paramInt, String paramString) {
  3206. if (paramString != null && paramString.length() > 0) {
  3207. switch (paramInt) {
  3208. default:
  3209. return null;
  3210. case 6:
  3211. break;
  3212. }
  3213. if (this.mExternalLoader != null) {
  3214. InputStream inputStream = this.mExternalLoader.readFileInputStream(paramString);
  3215. Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
  3216. WatchFaceExternalLoader.closeInputStream(inputStream);
  3217. return bitmap;
  3218. }
  3219. }
  3220. }
  3221.  
  3222. public byte[] parseFileToColorMap(int paramInt, String paramString) {
  3223. Log.d("WatchFaceConfig", "parseFile type:" + paramInt + " path=" + paramString);
  3224. if (paramString != null && paramString.length() > 0) {
  3225. switch (paramInt) {
  3226. default:
  3227. return null;
  3228. case 6:
  3229. break;
  3230. }
  3231. if (this.mExternalLoader != null)
  3232. return (new pngToColorMap.ColorMap(new pngToColorMap.RgbArray(this.mExternalLoader.readFile(paramString)))).getByte();
  3233. }
  3234. }
  3235.  
  3236. public class AdditiveImage {
  3237. Bitmap Image = null;
  3238.  
  3239. private String filePath = null;
  3240.  
  3241. private String filePath_Slpt = null;
  3242.  
  3243. private String filePath_Slpt26W = null;
  3244.  
  3245. private int x = 0;
  3246.  
  3247. private int y = 0;
  3248.  
  3249. public String getFilePath_Slpt() {
  3250. return this.filePath_Slpt;
  3251. }
  3252.  
  3253. public String getFilePath_Slpt26W() {
  3254. return this.filePath_Slpt26W;
  3255. }
  3256.  
  3257. public Bitmap getImage() {
  3258. return this.Image;
  3259. }
  3260.  
  3261. public int getX() {
  3262. return this.x;
  3263. }
  3264.  
  3265. public int getY() {
  3266. return this.y;
  3267. }
  3268.  
  3269. void onDestroy() {
  3270. this.filePath = null;
  3271. this.filePath_Slpt = null;
  3272. this.filePath_Slpt26W = null;
  3273. WatchFaceConfig.recycleBitmap(this.Image);
  3274. }
  3275.  
  3276. public void setFilePath(String param1String) {
  3277. this.filePath = param1String;
  3278. this.filePath_Slpt = WatchFaceConfig.getSlptConfig(param1String);
  3279. this.filePath_Slpt26W = WatchFaceConfig.getSlpt26WConfig(param1String);
  3280. }
  3281.  
  3282. public void setImage(Bitmap param1Bitmap) {
  3283. this.Image = param1Bitmap;
  3284. }
  3285.  
  3286. public void setX(int param1Int) {
  3287. this.x = param1Int;
  3288. }
  3289.  
  3290. public void setY(int param1Int) {
  3291. this.y = param1Int;
  3292. }
  3293. }
  3294.  
  3295. public class Arc {
  3296. private int Cap;
  3297.  
  3298. private int MaxDegree;
  3299.  
  3300. private int Rx;
  3301.  
  3302. private int Ry;
  3303.  
  3304. private int Size;
  3305.  
  3306. private int StartDegree;
  3307.  
  3308. private int XCenter;
  3309.  
  3310. private int YCenter;
  3311.  
  3312. private String arcSlpt26wConfig = null;
  3313.  
  3314. private String arcSlptConfig = null;
  3315.  
  3316. private final String dir = WatchFaceConfig.this.mContext.getCacheDir().getAbsolutePath();
  3317.  
  3318. private int imageQuality = 100;
  3319.  
  3320. private int index = 0;
  3321.  
  3322. private int mColor;
  3323.  
  3324. private String slpt26WSuffix = "_slpt26wArc.png";
  3325.  
  3326. private String slptSuffix = "_8cArc.png";
  3327.  
  3328. public Arc(int param1Int1, int param1Int2, int param1Int3, int param1Int4, String param1String, int param1Int5, int param1Int6, int param1Int7, int param1Int8) {
  3329. this.index = WatchFaceConfig.access$108();
  3330. this.XCenter = param1Int1;
  3331. this.YCenter = param1Int2;
  3332. this.Rx = param1Int3;
  3333. this.Ry = param1Int4;
  3334. this.mColor = Integer.parseInt(param1String);
  3335. this.Size = param1Int5;
  3336. this.Cap = param1Int6;
  3337. this.StartDegree = param1Int7;
  3338. this.MaxDegree = param1Int8;
  3339. createSlptArcPng();
  3340. createSlpt26WArcPng();
  3341. }
  3342.  
  3343. private int ARBG8888toARBG1111(int param1Int) {
  3344. byte b1;
  3345. byte b2;
  3346. if ((param1Int >> 16 & 0xFF) > 127) {
  3347. b1 = 255;
  3348. } else {
  3349. b1 = 0;
  3350. }
  3351. if ((param1Int >> 8 & 0xFF) > 127) {
  3352. b2 = 255;
  3353. } else {
  3354. b2 = 0;
  3355. }
  3356. if ((param1Int & 0xFF) > 127) {
  3357. char c = ';
  3358. return param1Int >> 24 << 24 | b1 << 16 | b2 << 8 | c;
  3359. }
  3360. boolean bool = false;
  3361. return param1Int >> 24 << 24 | b1 << 16 | b2 << 8 | bool;
  3362. }
  3363.  
  3364. private void createSlpt26WArcPng() {
  3365. Bitmap bitmap = Bitmap.createBitmap(this.Rx * 2 + this.Size, this.Rx * 2 + this.Size, Bitmap.Config.ARGB_8888);
  3366. Canvas canvas = new Canvas(bitmap);
  3367. Paint paint = new Paint();
  3368. paint.setStyle(Paint.Style.STROKE);
  3369. paint.setColor(this.mColor);
  3370. paint.setStrokeWidth(this.Size);
  3371. RectF rectF = new RectF((this.Size / 2), (this.Size / 2), (this.Rx * 2 + this.Size / 2), (this.Rx * 2 + this.Size / 2));
  3372. int i = this.MaxDegree;
  3373. int j = this.StartDegree;
  3374. canvas.drawArc(rectF, (this.StartDegree - 90), (i - j), false, paint);
  3375. this.arcSlpt26wConfig = this.dir + "/" + Integer.toString(this.index) + this.slpt26WSuffix;
  3376. try {
  3377. FileOutputStream fileOutputStream = new FileOutputStream(this.arcSlpt26wConfig);
  3378. bitmap.compress(Bitmap.CompressFormat.PNG, this.imageQuality, fileOutputStream);
  3379. return;
  3380. } catch (FileNotFoundException fileNotFoundException) {
  3381. fileNotFoundException.printStackTrace();
  3382. this.arcSlpt26wConfig = null;
  3383. return;
  3384. }
  3385. }
  3386.  
  3387. private void createSlptArcPng() {
  3388. Bitmap bitmap = Bitmap.createBitmap(this.Rx * 2 + this.Size, this.Rx * 2 + this.Size, Bitmap.Config.ARGB_8888);
  3389. Canvas canvas = new Canvas(bitmap);
  3390. Paint paint = new Paint();
  3391. paint.setStyle(Paint.Style.STROKE);
  3392. paint.setColor(ARBG8888toARBG1111(this.mColor));
  3393. paint.setStrokeWidth(this.Size);
  3394. RectF rectF = new RectF((this.Size / 2), (this.Size / 2), (this.Rx * 2 + this.Size / 2), (this.Rx * 2 + this.Size / 2));
  3395. int i = this.MaxDegree;
  3396. int j = this.StartDegree;
  3397. canvas.drawArc(rectF, (this.StartDegree - 90), (i - j), false, paint);
  3398. this.arcSlptConfig = this.dir + "/" + Integer.toString(this.index) + this.slptSuffix;
  3399. try {
  3400. FileOutputStream fileOutputStream = new FileOutputStream(this.arcSlptConfig);
  3401. bitmap.compress(Bitmap.CompressFormat.PNG, this.imageQuality, fileOutputStream);
  3402. return;
  3403. } catch (FileNotFoundException fileNotFoundException) {
  3404. fileNotFoundException.printStackTrace();
  3405. this.arcSlptConfig = null;
  3406. return;
  3407. }
  3408. }
  3409.  
  3410. public String getArcSlpt26wConfig() {
  3411. return this.arcSlpt26wConfig;
  3412. }
  3413.  
  3414. public String getArcSlptConfig() {
  3415. return this.arcSlptConfig;
  3416. }
  3417.  
  3418. public int getColor() {
  3419. return this.mColor;
  3420. }
  3421.  
  3422. public int getMaxDegree() {
  3423. return this.MaxDegree;
  3424. }
  3425.  
  3426. public int getRx() {
  3427. return this.Rx;
  3428. }
  3429.  
  3430. public int getRy() {
  3431. return this.Ry;
  3432. }
  3433.  
  3434. public int getSize() {
  3435. return this.Size;
  3436. }
  3437.  
  3438. public int getStartDegree() {
  3439. return this.StartDegree;
  3440. }
  3441.  
  3442. public int getXCenter() {
  3443. return this.XCenter;
  3444. }
  3445.  
  3446. public int getYCenter() {
  3447. return this.YCenter;
  3448. }
  3449.  
  3450. void onDestory() {
  3451. this.arcSlptConfig = null;
  3452. this.arcSlpt26wConfig = null;
  3453. }
  3454. }
  3455.  
  3456. public class DateDigital {
  3457. int color = 0;
  3458.  
  3459. String config;
  3460.  
  3461. int dayAlign;
  3462.  
  3463. boolean dayFillZero = true;
  3464.  
  3465. String dayFontConfig = null;
  3466.  
  3467. WatchFaceConfig.ImageFontInfo dayFontInfo = null;
  3468.  
  3469. boolean dayHasEnd = false;
  3470.  
  3471. int daySpace = 0;
  3472.  
  3473. int day_x0 = 0;
  3474.  
  3475. int day_x1 = 0;
  3476.  
  3477. int day_y0 = 0;
  3478.  
  3479. int day_y1 = 0;
  3480.  
  3481. String fontConfig = null;
  3482.  
  3483. WatchFaceConfig.ImageFontInfo fontInfo;
  3484.  
  3485. int gap;
  3486.  
  3487. int height;
  3488.  
  3489. Bitmap[] mMonthImage = null;
  3490.  
  3491. Bitmap[] mWeeks = null;
  3492.  
  3493. int m_dAlign = 0;
  3494.  
  3495. int m_dSpace = 0;
  3496.  
  3497. int m_dX0 = 0;
  3498.  
  3499. int m_dX1 = 0;
  3500.  
  3501. int m_dY0 = 0;
  3502.  
  3503. int m_dY1 = 0;
  3504.  
  3505. int model;
  3506.  
  3507. int monAlign;
  3508.  
  3509. boolean monFillZero = true;
  3510.  
  3511. String monFontConfig = null;
  3512.  
  3513. WatchFaceConfig.ImageFontInfo monFontInfo = null;
  3514.  
  3515. int monSpace = 0;
  3516.  
  3517. String mon_dayFontConfig = null;
  3518.  
  3519. WatchFaceConfig.ImageFontInfo mon_dayFontInfo = null;
  3520.  
  3521. int mon_x0 = 0;
  3522.  
  3523. int mon_x1 = 0;
  3524.  
  3525. int mon_y0 = 0;
  3526.  
  3527. int mon_y1 = 0;
  3528.  
  3529. String monthImageConfig = null;
  3530.  
  3531. String[] monthImageConfig_Slpt = null;
  3532.  
  3533. String[] monthImageConfig_Slpt26W = null;
  3534.  
  3535. int monthImageX = 0;
  3536.  
  3537. int monthImageY = 0;
  3538.  
  3539. String weekConfig = null;
  3540.  
  3541. String weekConfig_Slpt = null;
  3542.  
  3543. String weekConfig_Slpt26W = null;
  3544.  
  3545. String weekFloatConfig = null;
  3546.  
  3547. WatchFaceConfig.AdditiveImage[] weekFloatImage = null;
  3548.  
  3549. private int week_x = 0;
  3550.  
  3551. private int week_y = 0;
  3552.  
  3553. int width;
  3554.  
  3555. int x;
  3556.  
  3557. int y;
  3558.  
  3559. int yearAlign = 0;
  3560.  
  3561. String yearFontConfig = null;
  3562.  
  3563. WatchFaceConfig.ImageFontInfo yearFontInfo = null;
  3564.  
  3565. int yearSpace = 0;
  3566.  
  3567. int year_x0 = 0;
  3568.  
  3569. int year_x1 = 0;
  3570.  
  3571. int year_y0 = 0;
  3572.  
  3573. int year_y1 = 0;
  3574.  
  3575. public DateDigital(int param1Int1, int param1Int2, int param1Int3, int param1Int4, int param1Int5, int param1Int6, String param1String) {
  3576. this.m_dX0 = param1Int1;
  3577. this.m_dY0 = param1Int2;
  3578. this.m_dX1 = param1Int3;
  3579. this.m_dY1 = param1Int4;
  3580. this.mon_dayFontConfig = param1String;
  3581. this.m_dAlign = param1Int5;
  3582. this.m_dSpace = param1Int6;
  3583. encodeConfig();
  3584. }
  3585.  
  3586. public DateDigital(int param1Int1, int param1Int2, int param1Int3, int param1Int4, int param1Int5, int param1Int6, String param1String1, int param1Int7, int param1Int8, int param1Int9, int param1Int10, int param1Int11, int param1Int12, String param1String2, int param1Int13, int param1Int14, int param1Int15, int param1Int16, int param1Int17, int param1Int18, String param1String3) {
  3587. this.model = this.model;
  3588. this.year_x0 = param1Int1;
  3589. this.year_y0 = param1Int2;
  3590. this.year_x1 = param1Int3;
  3591. this.year_y1 = param1Int4;
  3592. this.yearAlign = param1Int5;
  3593. this.yearSpace = param1Int6;
  3594. this.yearFontConfig = param1String1;
  3595. this.mon_x0 = param1Int7;
  3596. this.mon_y0 = param1Int8;
  3597. this.mon_x1 = param1Int9;
  3598. this.mon_y1 = param1Int10;
  3599. this.monAlign = param1Int11;
  3600. this.monSpace = param1Int12;
  3601. this.monFontConfig = param1String2;
  3602. this.day_x0 = param1Int13;
  3603. this.day_y0 = param1Int14;
  3604. this.day_x1 = param1Int15;
  3605. this.day_y1 = param1Int16;
  3606. this.dayAlign = param1Int17;
  3607. this.daySpace = param1Int18;
  3608. this.dayFontConfig = param1String3;
  3609. encodeConfig();
  3610. }
  3611.  
  3612. private void encodeConfig() {
  3613. try {
  3614. JSONObject jSONObject = new JSONObject();
  3615. jSONObject.put("model", this.model);
  3616. jSONObject.put("x", this.x);
  3617. jSONObject.put("y", this.y);
  3618. jSONObject.put("width", this.width);
  3619. jSONObject.put("height", this.height);
  3620. jSONObject.put("fontConfig", this.fontConfig);
  3621. jSONObject.put("gap", this.gap);
  3622. jSONObject.put("color", this.color);
  3623. this.config = jSONObject.toString();
  3624. Log.d("WatchFaceConfig", "DateDigital.encodeConfig: " + this.config);
  3625. return;
  3626. } catch (JSONException jSONException) {
  3627. Log.d("WatchFaceConfig", "DateDigital.encodeConfig Error.");
  3628. jSONException.printStackTrace();
  3629. return;
  3630. }
  3631. }
  3632.  
  3633. private void parseImageFontInfo() {
  3634. if (this.yearFontConfig != null && this.yearFontConfig.startsWith("@wfz/")) {
  3635. String str = this.yearFontConfig.substring("@wfz/".length());
  3636. List<WatchFaceModuleItem> list = WatchFaceConfig.this.mExternalLoader.parseWatchFaceConfigList(str + "/font.xml");
  3637. if (list != null) {
  3638. this.yearFontInfo = new WatchFaceConfig.ImageFontInfo(this.yearFontConfig);
  3639. for (int i = 0; i < list.size(); i++) {
  3640. WatchFaceModuleItem watchFaceModuleItem = list.get(i);
  3641. if ("font".equals(watchFaceModuleItem.getType())) {
  3642. String str1 = watchFaceModuleItem.getCharset();
  3643. if (str1 != null && str1.length() == 1) {
  3644. char c = str1.charAt(0);
  3645. this.yearFontInfo.putChar(c, watchFaceModuleItem.getConfig());
  3646. } else {
  3647. Log.d("WatchFaceConfig", "parseImageFontInfo invalid charset: " + str1);
  3648. }
  3649. }
  3650. }
  3651. }
  3652. }
  3653. if (this.monFontConfig != null && this.monFontConfig.startsWith("@wfz/")) {
  3654. String str = this.monFontConfig.substring("@wfz/".length());
  3655. List<WatchFaceModuleItem> list = WatchFaceConfig.this.mExternalLoader.parseWatchFaceConfigList(str + "/font.xml");
  3656. if (list != null) {
  3657. this.monFontInfo = new WatchFaceConfig.ImageFontInfo(this.monFontConfig);
  3658. for (int i = 0; i < list.size(); i++) {
  3659. WatchFaceModuleItem watchFaceModuleItem = list.get(i);
  3660. if ("font".equals(watchFaceModuleItem.getType())) {
  3661. String str1 = watchFaceModuleItem.getCharset();
  3662. if (str1 != null && str1.length() == 1) {
  3663. char c = str1.charAt(0);
  3664. this.monFontInfo.putChar(c, watchFaceModuleItem.getConfig());
  3665. } else {
  3666. Log.d("WatchFaceConfig", "parseImageFontInfo invalid charset: " + str1);
  3667. }
  3668. }
  3669. }
  3670. }
  3671. }
  3672. if (this.dayFontConfig != null && this.dayFontConfig.startsWith("@wfz/")) {
  3673. String str = this.dayFontConfig.substring("@wfz/".length());
  3674. List<WatchFaceModuleItem> list = WatchFaceConfig.this.mExternalLoader.parseWatchFaceConfigList(str + "/font.xml");
  3675. if (list != null) {
  3676. this.dayFontInfo = new WatchFaceConfig.ImageFontInfo(this.dayFontConfig);
  3677. for (int i = 0; i < list.size(); i++) {
  3678. WatchFaceModuleItem watchFaceModuleItem = list.get(i);
  3679. if ("font".equals(watchFaceModuleItem.getType())) {
  3680. String str1 = watchFaceModuleItem.getCharset();
  3681. if (str1 != null && str1.length() == 1) {
  3682. char c = str1.charAt(0);
  3683. this.dayFontInfo.putChar(c, watchFaceModuleItem.getConfig());
  3684. } else {
  3685. Log.d("WatchFaceConfig", "parseImageFontInfo invalid charset: " + str1);
  3686. }
  3687. }
  3688. }
  3689. }
  3690. }
  3691. if (this.mon_dayFontConfig != null && this.mon_dayFontConfig.startsWith("@wfz/")) {
  3692. String str = this.mon_dayFontConfig.substring("@wfz/".length());
  3693. List<WatchFaceModuleItem> list = WatchFaceConfig.this.mExternalLoader.parseWatchFaceConfigList(str + "/font.xml");
  3694. if (list != null) {
  3695. this.mon_dayFontInfo = new WatchFaceConfig.ImageFontInfo(this.mon_dayFontConfig);
  3696. for (int i = 0; i < list.size(); i++) {
  3697. WatchFaceModuleItem watchFaceModuleItem = list.get(i);
  3698. if ("font".equals(watchFaceModuleItem.getType())) {
  3699. String str1 = watchFaceModuleItem.getCharset();
  3700. if (str1 != null && str1.length() == 1) {
  3701. char c = str1.charAt(0);
  3702. this.mon_dayFontInfo.putChar(c, watchFaceModuleItem.getConfig());
  3703. } else {
  3704. Log.d("WatchFaceConfig", "parseImageFontInfo invalid charset: " + str1);
  3705. }
  3706. }
  3707. }
  3708. }
  3709. }
  3710. }
  3711.  
  3712. public int getDayAlign() {
  3713. return this.dayAlign;
  3714. }
  3715.  
  3716. public boolean getDayFillZero() {
  3717. return this.dayFillZero;
  3718. }
  3719.  
  3720. public WatchFaceConfig.ImageFontInfo getDayFontInfo() {
  3721. return this.dayFontInfo;
  3722. }
  3723.  
  3724. public boolean getDayHasEnd() {
  3725. return this.dayHasEnd;
  3726. }
  3727.  
  3728. public int getDaySpace() {
  3729. return this.daySpace;
  3730. }
  3731.  
  3732. public int getDay_x0() {
  3733. return this.day_x0;
  3734. }
  3735.  
  3736. public int getDay_x1() {
  3737. return this.day_x1;
  3738. }
  3739.  
  3740. public int getDay_y0() {
  3741. return this.day_y0;
  3742. }
  3743.  
  3744. public int getDay_y1() {
  3745. return this.day_y1;
  3746. }
  3747.  
  3748. public int getM_dAlign() {
  3749. return this.m_dAlign;
  3750. }
  3751.  
  3752. public WatchFaceConfig.ImageFontInfo getM_dFontInfo() {
  3753. return this.mon_dayFontInfo;
  3754. }
  3755.  
  3756. public int getM_dSpace() {
  3757. return this.m_dSpace;
  3758. }
  3759.  
  3760. public int getM_d_x0() {
  3761. return this.m_dX0;
  3762. }
  3763.  
  3764. public int getM_d_x1() {
  3765. return this.m_dX1;
  3766. }
  3767.  
  3768. public int getM_d_y0() {
  3769. return this.m_dY0;
  3770. }
  3771.  
  3772. public int getM_d_y1() {
  3773. return this.m_dY1;
  3774. }
  3775.  
  3776. public int getMonAlign() {
  3777. return this.monAlign;
  3778. }
  3779.  
  3780. public boolean getMonFillZero() {
  3781. return this.monFillZero;
  3782. }
  3783.  
  3784. public WatchFaceConfig.ImageFontInfo getMonFontInfo() {
  3785. return this.monFontInfo;
  3786. }
  3787.  
  3788. public int getMonSpace() {
  3789. return this.monSpace;
  3790. }
  3791.  
  3792. public int getMon_x0() {
  3793. return this.mon_x0;
  3794. }
  3795.  
  3796. public int getMon_x1() {
  3797. return this.mon_x1;
  3798. }
  3799.  
  3800. public int getMon_y0() {
  3801. return this.mon_y0;
  3802. }
  3803.  
  3804. public int getMon_y1() {
  3805. return this.mon_y1;
  3806. }
  3807.  
  3808. public String getMonthImageConfig() {
  3809. return this.monthImageConfig;
  3810. }
  3811.  
  3812. public String[] getMonthImageConfig_Slpt() {
  3813. return this.monthImageConfig_Slpt;
  3814. }
  3815.  
  3816. public String[] getMonthImageConfig_Slpt26W() {
  3817. return this.monthImageConfig_Slpt26W;
  3818. }
  3819.  
  3820. public int getMonthImageX() {
  3821. return this.monthImageX;
  3822. }
  3823.  
  3824. public int getMonthImageY() {
  3825. return this.monthImageY;
  3826. }
  3827.  
  3828. public String getWeekConfig() {
  3829. return this.weekConfig;
  3830. }
  3831.  
  3832. public String getWeekConfig_Slpt() {
  3833. return this.weekConfig_Slpt;
  3834. }
  3835.  
  3836. public String getWeekConfig_Slpt26W() {
  3837. return this.weekConfig_Slpt26W;
  3838. }
  3839.  
  3840. public String getWeekFloatConfig() {
  3841. return this.weekFloatConfig;
  3842. }
  3843.  
  3844. public WatchFaceConfig.AdditiveImage[] getWeekFloatImage() {
  3845. return this.weekFloatImage;
  3846. }
  3847.  
  3848. public int getWeek_x() {
  3849. return this.week_x;
  3850. }
  3851.  
  3852. public int getWeek_y() {
  3853. return this.week_y;
  3854. }
  3855.  
  3856. public int getYearAlign() {
  3857. return this.yearAlign;
  3858. }
  3859.  
  3860. public WatchFaceConfig.ImageFontInfo getYearFontInfo() {
  3861. return this.yearFontInfo;
  3862. }
  3863.  
  3864. public int getYearSpace() {
  3865. return this.yearSpace;
  3866. }
  3867.  
  3868. public int getYear_x0() {
  3869. return this.year_x0;
  3870. }
  3871.  
  3872. public int getYear_x1() {
  3873. return this.year_x1;
  3874. }
  3875.  
  3876. public int getYear_y0() {
  3877. return this.year_y0;
  3878. }
  3879.  
  3880. public int getYear_y1() {
  3881. return this.year_y1;
  3882. }
  3883.  
  3884. public Bitmap[] getmMonthImage() {
  3885. return this.mMonthImage;
  3886. }
  3887.  
  3888. public Bitmap[] getmWeeks() {
  3889. return this.mWeeks;
  3890. }
  3891.  
  3892. void onDestory() {
  3893. this.fontConfig = null;
  3894. if (this.fontInfo != null)
  3895. this.fontInfo.onDestroy();
  3896. this.mon_dayFontConfig = null;
  3897. if (this.mon_dayFontInfo != null)
  3898. this.mon_dayFontInfo.onDestroy();
  3899. this.yearFontConfig = null;
  3900. if (this.yearFontInfo != null)
  3901. this.yearFontInfo.onDestroy();
  3902. this.monFontConfig = null;
  3903. if (this.monFontInfo != null)
  3904. this.monFontInfo.onDestroy();
  3905. this.dayFontConfig = null;
  3906. if (this.dayFontInfo != null) {
  3907. this.dayFontInfo.onDestroy();
  3908. this.dayFontInfo = null;
  3909. }
  3910. this.weekConfig = null;
  3911. this.weekConfig_Slpt = null;
  3912. this.weekConfig_Slpt26W = null;
  3913. if (this.mWeeks != null) {
  3914. for (Bitmap bitmap : this.mWeeks) {
  3915. if (bitmap != null && !bitmap.isRecycled())
  3916. bitmap.recycle();
  3917. }
  3918. this.mWeeks = null;
  3919. }
  3920. this.weekFloatConfig = null;
  3921. if (this.weekFloatImage != null) {
  3922. WatchFaceConfig.AdditiveImage[] arrayOfAdditiveImage = this.weekFloatImage;
  3923. int j = arrayOfAdditiveImage.length;
  3924. for (int i = 0; i < j; i++)
  3925. arrayOfAdditiveImage[i].onDestroy();
  3926. this.weekFloatImage = null;
  3927. }
  3928. }
  3929.  
  3930. public void parseMonthImageBitmap() {
  3931. if (this.monthImageConfig != null && this.monthImageConfig.startsWith("@wfz/")) {
  3932. String str = this.monthImageConfig.substring("@wfz/".length());
  3933. this.mMonthImage = new Bitmap[12];
  3934. this.monthImageConfig_Slpt = new String[12];
  3935. this.monthImageConfig_Slpt26W = new String[12];
  3936. for (int i = 0; i < 12; i++) {
  3937. String str1 = String.format("%s/%02d.png", new Object[] { str, Integer.valueOf(i) });
  3938. this.monthImageConfig_Slpt[i] = String.format("%s/8c/%02d.png", new Object[] { str, Integer.valueOf(i) });
  3939. this.monthImageConfig_Slpt26W[i] = String.format("%s/slpt/%02d.png", new Object[] { str, Integer.valueOf(i) });
  3940. Bitmap bitmap = WatchFaceConfig.this.parseBitmap(6, str1);
  3941. this.mMonthImage[i] = bitmap;
  3942. }
  3943. }
  3944. }
  3945.  
  3946. public void parseWeekBitmap() {
  3947. if (this.weekConfig != null && this.weekConfig.startsWith("@wfz/")) {
  3948. String str = this.weekConfig.substring("@wfz/".length());
  3949. this.mWeeks = new Bitmap[7];
  3950. for (int i = 0; i < 7; i++) {
  3951. String str1 = String.format("%s/%d.png", new Object[] { str, Integer.valueOf(i) });
  3952. Bitmap bitmap = WatchFaceConfig.this.parseBitmap(6, str1);
  3953. this.mWeeks[i] = bitmap;
  3954. }
  3955. }
  3956. }
  3957.  
  3958. public void parseWeekFloatImages() {
  3959. if (this.weekFloatConfig != null && this.weekFloatConfig.startsWith("@wfz/")) {
  3960. String str = this.weekFloatConfig.substring("@wfz/".length());
  3961. List<WatchFaceModuleItem> list = WatchFaceConfig.this.mExternalLoader.parseWatchFaceConfigList(str + "/WeekFloat.xml");
  3962. if (list != null) {
  3963. this.weekFloatImage = new WatchFaceConfig.AdditiveImage[list.size()];
  3964. for (int i = 0; i < list.size(); i++) {
  3965. WatchFaceModuleItem watchFaceModuleItem = list.get(i);
  3966. if ("weekFloat".equals(watchFaceModuleItem.getType())) {
  3967. watchFaceModuleItem.getIndex();
  3968. this.weekFloatImage[i] = new WatchFaceConfig.AdditiveImage();
  3969. if (this.weekFloatImage[i] != null) {
  3970. String str1 = watchFaceModuleItem.getConfig();
  3971. if (str1 != null && str1.startsWith("@wfz/")) {
  3972. String str2 = str1.substring("@wfz/".length());
  3973. this.weekFloatImage[i].setFilePath(str1);
  3974. this.weekFloatImage[i].setX(watchFaceModuleItem.getX());
  3975. this.weekFloatImage[i].setY(watchFaceModuleItem.getY());
  3976. Bitmap bitmap = WatchFaceConfig.this.parseBitmap(6, str2);
  3977. this.weekFloatImage[i].setImage(bitmap);
  3978. }
  3979. }
  3980. }
  3981. }
  3982. }
  3983. }
  3984. }
  3985.  
  3986. public void setDayFillZero(boolean param1Boolean) {
  3987. this.dayFillZero = param1Boolean;
  3988. }
  3989.  
  3990. public void setDayHasEnd(boolean param1Boolean) {
  3991. this.dayHasEnd = param1Boolean;
  3992. }
  3993.  
  3994. public void setMonFillZero(boolean param1Boolean) {
  3995. this.monFillZero = param1Boolean;
  3996. }
  3997.  
  3998. public void setMonthImageConfig(String param1String) {
  3999. this.monthImageConfig = param1String;
  4000. }
  4001.  
  4002. public void setMonthImageX(int param1Int) {
  4003. this.monthImageX = param1Int;
  4004. }
  4005.  
  4006. public void setMonthImageY(int param1Int) {
  4007. this.monthImageY = param1Int;
  4008. }
  4009.  
  4010. public void setWeekConfig(String param1String) {
  4011. param1String = param1String + "/" + Util.getWfzLocal();
  4012. Log.i("WatchFaceConfig", "WatchFaceWeekConfig:" + param1String);
  4013. this.weekConfig = param1String;
  4014. if (param1String.startsWith("@wfz/")) {
  4015. param1String = param1String.substring("@wfz/".length());
  4016. this.weekConfig_Slpt = param1String + "/" + "8c/";
  4017. this.weekConfig_Slpt26W = param1String + "/" + "slpt/";
  4018. }
  4019. }
  4020.  
  4021. public void setWeekFloatConfig(String param1String) {
  4022. this.weekFloatConfig = param1String;
  4023. }
  4024.  
  4025. public void setWeek_x(int param1Int) {
  4026. this.week_x = param1Int;
  4027. }
  4028.  
  4029. public void setWeek_y(int param1Int) {
  4030. this.week_y = param1Int;
  4031. }
  4032.  
  4033. public void setYearAlign(int param1Int) {
  4034. this.yearAlign = param1Int;
  4035. }
  4036.  
  4037. public void setYearFontConfig(String param1String) {
  4038. this.yearFontConfig = param1String;
  4039. }
  4040.  
  4041. public void setYearSpace(int param1Int) {
  4042. this.yearSpace = param1Int;
  4043. }
  4044.  
  4045. public void setYear_x0(int param1Int) {
  4046. this.year_x0 = param1Int;
  4047. }
  4048.  
  4049. public void setYear_x1(int param1Int) {
  4050. this.year_x1 = param1Int;
  4051. }
  4052.  
  4053. public void setYear_y0(int param1Int) {
  4054. this.year_y0 = param1Int;
  4055. }
  4056.  
  4057. public void setYear_y1(int param1Int) {
  4058. this.year_y1 = param1Int;
  4059. }
  4060.  
  4061. public String toString() {
  4062. return "DateDigital: " + this.config;
  4063. }
  4064. }
  4065.  
  4066. public class GtrDatehand {
  4067. private int centerDayX = 0;
  4068.  
  4069. private int centerDayY = 0;
  4070.  
  4071. private int centerMonX = 0;
  4072.  
  4073. private int centerMonY = 0;
  4074.  
  4075. private int centerWeekX = 0;
  4076.  
  4077. private int centerWeekY = 0;
  4078.  
  4079. String dayConfig = null;
  4080.  
  4081. String dayConfig_Slpt = null;
  4082.  
  4083. String dayConfig_Slpt26W = null;
  4084.  
  4085. private int dayEndDegree = 0;
  4086.  
  4087. private Bitmap dayPointer = null;
  4088.  
  4089. private int dayStartDegree = 0;
  4090.  
  4091. private int dayX = 0;
  4092.  
  4093. private int dayY = 0;
  4094.  
  4095. String monConfig = null;
  4096.  
  4097. String monConfig_Slpt = null;
  4098.  
  4099. String monConfig_Slpt26W = null;
  4100.  
  4101. private int monEndDegree = 0;
  4102.  
  4103. private Bitmap monPointer = null;
  4104.  
  4105. private int monStartDegree = 0;
  4106.  
  4107. private int monX = 0;
  4108.  
  4109. private int monY = 0;
  4110.  
  4111. String weekConfig = null;
  4112.  
  4113. String weekConfig_Slpt = null;
  4114.  
  4115. String weekConfig_Slpt26W = null;
  4116.  
  4117. private int weekEndDegree = 0;
  4118.  
  4119. private Bitmap weekPointer = null;
  4120.  
  4121. private int weekStartDegree = 0;
  4122.  
  4123. private int weekX = 0;
  4124.  
  4125. private int weekY = 0;
  4126.  
  4127. public GtrDatehand(int param1Int1, int param1Int2, int param1Int3, int param1Int4, int param1Int5, int param1Int6, String param1String1, int param1Int7, int param1Int8, int param1Int9, int param1Int10, int param1Int11, int param1Int12, String param1String2, int param1Int13, int param1Int14, int param1Int15, int param1Int16, int param1Int17, int param1Int18, String param1String3) {
  4128. this.monX = param1Int1;
  4129. this.monY = param1Int2;
  4130. this.centerMonX = param1Int3;
  4131. this.centerMonY = param1Int4;
  4132. this.monStartDegree = param1Int5;
  4133. this.monEndDegree = param1Int6;
  4134. this.monConfig = param1String1;
  4135. this.monConfig_Slpt = WatchFaceConfig.getSlptConfig(param1String1);
  4136. this.monConfig_Slpt26W = WatchFaceConfig.getSlpt26WConfig(param1String1);
  4137. this.dayX = param1Int7;
  4138. this.dayY = param1Int8;
  4139. this.centerDayX = param1Int9;
  4140. this.centerDayY = param1Int10;
  4141. this.dayStartDegree = param1Int11;
  4142. this.dayEndDegree = param1Int12;
  4143. this.dayConfig = param1String2;
  4144. this.dayConfig_Slpt = WatchFaceConfig.getSlptConfig(param1String2);
  4145. this.dayConfig_Slpt26W = WatchFaceConfig.getSlpt26WConfig(param1String2);
  4146. this.weekX = param1Int13;
  4147. this.weekY = param1Int14;
  4148. this.centerWeekX = param1Int15;
  4149. this.centerWeekY = param1Int16;
  4150. this.weekStartDegree = param1Int17;
  4151. this.weekEndDegree = param1Int18;
  4152. this.weekConfig = param1String3;
  4153. this.weekConfig_Slpt = WatchFaceConfig.getSlptConfig(param1String3);
  4154. this.weekConfig_Slpt26W = WatchFaceConfig.getSlpt26WConfig(param1String3);
  4155. }
  4156.  
  4157. public int getCenterDayX() {
  4158. return this.centerDayX;
  4159. }
  4160.  
  4161. public int getCenterDayY() {
  4162. return this.centerDayY;
  4163. }
  4164.  
  4165. public int getCenterMonX() {
  4166. return this.centerMonX;
  4167. }
  4168.  
  4169. public int getCenterMonY() {
  4170. return this.centerMonY;
  4171. }
  4172.  
  4173. public int getCenterWeekX() {
  4174. return this.centerWeekX;
  4175. }
  4176.  
  4177. public int getCenterWeekY() {
  4178. return this.centerWeekY;
  4179. }
  4180.  
  4181. public String getDayConfig() {
  4182. return this.dayConfig;
  4183. }
  4184.  
  4185. public String getDayConfig_Slpt() {
  4186. return this.dayConfig_Slpt;
  4187. }
  4188.  
  4189. public String getDayConfig_Slpt26W() {
  4190. return this.dayConfig_Slpt26W;
  4191. }
  4192.  
  4193. public int getDayEndDegree() {
  4194. return this.dayEndDegree;
  4195. }
  4196.  
  4197. public Bitmap getDayPointer() {
  4198. return this.dayPointer;
  4199. }
  4200.  
  4201. public int getDayStartDegree() {
  4202. return this.dayStartDegree;
  4203. }
  4204.  
  4205. public int getDayX() {
  4206. return this.dayX;
  4207. }
  4208.  
  4209. public int getDayY() {
  4210. return this.dayY;
  4211. }
  4212.  
  4213. public String getMonConfig() {
  4214. return this.monConfig;
  4215. }
  4216.  
  4217. public String getMonConfig_Slpt() {
  4218. return this.monConfig_Slpt;
  4219. }
  4220.  
  4221. public String getMonConfig_Slpt26W() {
  4222. return this.monConfig_Slpt26W;
  4223. }
  4224.  
  4225. public int getMonEndDegree() {
  4226. return this.monEndDegree;
  4227. }
  4228.  
  4229. public Bitmap getMonPointer() {
  4230. return this.monPointer;
  4231. }
  4232.  
  4233. public int getMonStartDegree() {
  4234. return this.monStartDegree;
  4235. }
  4236.  
  4237. public int getMonX() {
  4238. return this.monX;
  4239. }
  4240.  
  4241. public int getMonY() {
  4242. return this.monY;
  4243. }
  4244.  
  4245. public String getWeekConfig() {
  4246. return this.weekConfig;
  4247. }
  4248.  
  4249. public String getWeekConfig_Slpt() {
  4250. return this.weekConfig_Slpt;
  4251. }
  4252.  
  4253. public String getWeekConfig_Slpt26W() {
  4254. return this.weekConfig_Slpt26W;
  4255. }
  4256.  
  4257. public int getWeekEndDegree() {
  4258. return this.weekEndDegree;
  4259. }
  4260.  
  4261. public Bitmap getWeekPointer() {
  4262. return this.weekPointer;
  4263. }
  4264.  
  4265. public int getWeekStartDegree() {
  4266. return this.weekStartDegree;
  4267. }
  4268.  
  4269. public int getWeekX() {
  4270. return this.weekX;
  4271. }
  4272.  
  4273. public int getWeekY() {
  4274. return this.weekY;
  4275. }
  4276.  
  4277. void onDestroy() {
  4278. this.monConfig = null;
  4279. this.monConfig_Slpt = null;
  4280. this.monConfig_Slpt26W = null;
  4281. WatchFaceConfig.recycleBitmap(this.monPointer);
  4282. this.dayConfig = null;
  4283. this.dayConfig_Slpt = null;
  4284. this.dayConfig_Slpt26W = null;
  4285. WatchFaceConfig.recycleBitmap(this.dayPointer);
  4286. this.weekConfig = null;
  4287. this.weekConfig_Slpt = null;
  4288. this.weekConfig_Slpt26W = null;
  4289. WatchFaceConfig.recycleBitmap(this.weekPointer);
  4290. }
  4291.  
  4292. public void parseGtrDatehandBitmap() {
  4293. if (this.monConfig != null && this.monConfig.startsWith("@wfz/")) {
  4294. String str = this.monConfig.substring("@wfz/".length());
  4295. this.monPointer = WatchFaceConfig.this.parseBitmap(6, str);
  4296. }
  4297. if (this.dayConfig != null && this.dayConfig.startsWith("@wfz/")) {
  4298. String str = this.dayConfig.substring("@wfz/".length());
  4299. this.dayPointer = WatchFaceConfig.this.parseBitmap(6, str);
  4300. }
  4301. if (this.weekConfig != null && this.weekConfig.startsWith("@wfz/")) {
  4302. String str = this.weekConfig.substring("@wfz/".length());
  4303. this.weekPointer = WatchFaceConfig.this.parseBitmap(6, str);
  4304. }
  4305. }
  4306. }
  4307.  
  4308. public class GtrTimehand {
  4309. private int centerHourX = 0;
  4310.  
  4311. private int centerHourY = 0;
  4312.  
  4313. private int centerMinX = 0;
  4314.  
  4315. private int centerMinY = 0;
  4316.  
  4317. private int centerSecX = 0;
  4318.  
  4319. private int centerSecY = 0;
  4320.  
  4321. private int hourX = 0;
  4322.  
  4323. private int hourY = 0;
  4324.  
  4325. private Bitmap mHourBitmap = null;
  4326.  
  4327. String mHourConfig = null;
  4328.  
  4329. String mHourConfig_Slpt = null;
  4330.  
  4331. String mHourConfig_Slpt26W = null;
  4332.  
  4333. private Bitmap mMinBitmap = null;
  4334.  
  4335. String mMinConfig = null;
  4336.  
  4337. String mMinConfig_Slpt = null;
  4338.  
  4339. String mMinConfig_Slpt26W = null;
  4340.  
  4341. private Bitmap mPoint = null;
  4342.  
  4343. String mPointConfig = null;
  4344.  
  4345. String mPointConfig_Slpt = null;
  4346.  
  4347. String mPointConfig_Slpt26W = null;
  4348.  
  4349. private Bitmap mSecBitmap = null;
  4350.  
  4351. String mSecConfig = null;
  4352.  
  4353. String mSecConfig_Slpt = null;
  4354.  
  4355. String mSecConfig_Slpt26W = null;
  4356.  
  4357. private int minX = 0;
  4358.  
  4359. private int minY = 0;
  4360.  
  4361. private int pointX = 0;
  4362.  
  4363. private int pointY = 0;
  4364.  
  4365. private int secX = 0;
  4366.  
  4367. private int secY = 0;
  4368.  
  4369. public GtrTimehand(int param1Int1, int param1Int2, String param1String1, int param1Int3, int param1Int4, String param1String2, int param1Int5, int param1Int6, String param1String3) {
  4370. this.hourX = param1Int1;
  4371. this.hourY = param1Int2;
  4372. this.mHourConfig = param1String1;
  4373. this.mHourConfig_Slpt = WatchFaceConfig.getSlptConfig(param1String1);
  4374. this.mHourConfig_Slpt26W = WatchFaceConfig.getSlpt26WConfig(param1String1);
  4375. this.minX = param1Int3;
  4376. this.minY = param1Int4;
  4377. this.mMinConfig = param1String2;
  4378. this.mMinConfig_Slpt = WatchFaceConfig.getSlptConfig(param1String2);
  4379. this.mMinConfig_Slpt26W = WatchFaceConfig.getSlpt26WConfig(param1String2);
  4380. this.secX = param1Int5;
  4381. this.secY = param1Int6;
  4382. this.mSecConfig = param1String3;
  4383. this.mSecConfig_Slpt = WatchFaceConfig.getSlptConfig(param1String3);
  4384. this.mSecConfig_Slpt26W = WatchFaceConfig.getSlpt26WConfig(param1String3);
  4385. }
  4386.  
  4387. public void GtrTimehandParseBitmap() {
  4388. if (this.mPointConfig != null && this.mPointConfig.startsWith("@wfz/")) {
  4389. String str = this.mPointConfig.substring("@wfz/".length());
  4390. this.mPoint = WatchFaceConfig.this.parseBitmap(6, str);
  4391. }
  4392. }
  4393.  
  4394. public void GtrTimehandParseDrawable() {
  4395. if (this.mHourConfig != null && this.mHourConfig.startsWith("@wfz/")) {
  4396. String str = this.mHourConfig.substring("@wfz/".length());
  4397. this.mHourBitmap = WatchFaceConfig.this.parseBitmap(6, str);
  4398. }
  4399. if (this.mMinConfig != null && this.mMinConfig.startsWith("@wfz/")) {
  4400. String str = this.mMinConfig.substring("@wfz/".length());
  4401. this.mMinBitmap = WatchFaceConfig.this.parseBitmap(6, str);
  4402. }
  4403. if (this.mSecConfig != null && this.mSecConfig.startsWith("@wfz/")) {
  4404. String str = this.mSecConfig.substring("@wfz/".length());
  4405. this.mSecBitmap = WatchFaceConfig.this.parseBitmap(6, str);
  4406. }
  4407. }
  4408.  
  4409. public int getCenterHourX() {
  4410. return this.centerHourX;
  4411. }
  4412.  
  4413. public int getCenterHourY() {
  4414. return this.centerHourY;
  4415. }
  4416.  
  4417. public int getCenterMinX() {
  4418. return this.centerMinX;
  4419. }
  4420.  
  4421. public int getCenterMinY() {
  4422. return this.centerMinY;
  4423. }
  4424.  
  4425. public int getCenterSecX() {
  4426. return this.centerSecX;
  4427. }
  4428.  
  4429. public int getCenterSecY() {
  4430. return this.centerSecY;
  4431. }
  4432.  
  4433. public Bitmap getHourBitmap() {
  4434. return this.mHourBitmap;
  4435. }
  4436.  
  4437. public int getHourX() {
  4438. return this.hourX;
  4439. }
  4440.  
  4441. public int getHourY() {
  4442. return this.hourY;
  4443. }
  4444.  
  4445. public Bitmap getMinBitmap() {
  4446. return this.mMinBitmap;
  4447. }
  4448.  
  4449. public int getMinX() {
  4450. return this.minX;
  4451. }
  4452.  
  4453. public int getMinY() {
  4454. return this.minY;
  4455. }
  4456.  
  4457. public int getPointX() {
  4458. return this.pointX;
  4459. }
  4460.  
  4461. public int getPointY() {
  4462. return this.pointY;
  4463. }
  4464.  
  4465. public Bitmap getSecBitmap() {
  4466. return this.mSecBitmap;
  4467. }
  4468.  
  4469. public int getSecX() {
  4470. return this.secX;
  4471. }
  4472.  
  4473. public int getSecY() {
  4474. return this.secY;
  4475. }
  4476.  
  4477. public String getmHourConfig() {
  4478. return this.mHourConfig;
  4479. }
  4480.  
  4481. public String getmHourConfig_Slpt() {
  4482. return this.mHourConfig_Slpt;
  4483. }
  4484.  
  4485. public String getmHourConfig_Slpt26W() {
  4486. return this.mHourConfig_Slpt26W;
  4487. }
  4488.  
  4489. public String getmMinConfig() {
  4490. return this.mMinConfig;
  4491. }
  4492.  
  4493. public String getmMinConfig_Slpt() {
  4494. return this.mMinConfig_Slpt;
  4495. }
  4496.  
  4497. public String getmMinConfig_Slpt26W() {
  4498. return this.mMinConfig_Slpt26W;
  4499. }
  4500.  
  4501. public Bitmap getmPoint() {
  4502. return this.mPoint;
  4503. }
  4504.  
  4505. public String getmPointConfig() {
  4506. return this.mPointConfig;
  4507. }
  4508.  
  4509. public String getmPointConfig_Slpt() {
  4510. return this.mPointConfig_Slpt;
  4511. }
  4512.  
  4513. public String getmPointConfig_Slpt26W() {
  4514. return this.mPointConfig_Slpt26W;
  4515. }
  4516.  
  4517. public String getmSecConfig() {
  4518. return this.mSecConfig;
  4519. }
  4520.  
  4521. public String getmSecConfig_Slpt() {
  4522. return this.mSecConfig_Slpt;
  4523. }
  4524.  
  4525. public String getmSecConfig_Slpt26W() {
  4526. return this.mSecConfig_Slpt26W;
  4527. }
  4528.  
  4529. void onDestory() {
  4530. this.mPointConfig = null;
  4531. this.mPointConfig_Slpt = null;
  4532. this.mPointConfig_Slpt26W = null;
  4533. WatchFaceConfig.recycleBitmap(this.mPoint);
  4534. this.mHourConfig = null;
  4535. this.mHourConfig_Slpt = null;
  4536. this.mHourConfig_Slpt26W = null;
  4537. WatchFaceConfig.recycleBitmap(this.mHourBitmap);
  4538. this.mMinConfig = null;
  4539. this.mMinConfig_Slpt = null;
  4540. this.mMinConfig_Slpt26W = null;
  4541. WatchFaceConfig.recycleBitmap(this.mMinBitmap);
  4542. this.mSecConfig = null;
  4543. this.mSecConfig_Slpt = null;
  4544. this.mSecConfig_Slpt26W = null;
  4545. WatchFaceConfig.recycleBitmap(this.mSecBitmap);
  4546. }
  4547.  
  4548. public void setCenterHourX(int param1Int) {
  4549. this.centerHourX = param1Int;
  4550. }
  4551.  
  4552. public void setCenterHourY(int param1Int) {
  4553. this.centerHourY = param1Int;
  4554. }
  4555.  
  4556. public void setCenterMinX(int param1Int) {
  4557. this.centerMinX = param1Int;
  4558. }
  4559.  
  4560. public void setCenterMinY(int param1Int) {
  4561. this.centerMinY = param1Int;
  4562. }
  4563.  
  4564. public void setCenterSecX(int param1Int) {
  4565. this.centerSecX = param1Int;
  4566. }
  4567.  
  4568. public void setCenterSecY(int param1Int) {
  4569. this.centerSecY = param1Int;
  4570. }
  4571.  
  4572. public void setPointX(int param1Int) {
  4573. this.pointX = param1Int;
  4574. }
  4575.  
  4576. public void setPointY(int param1Int) {
  4577. this.pointY = param1Int;
  4578. }
  4579.  
  4580. public void setmPointConfig(String param1String) {
  4581. this.mPointConfig = param1String;
  4582. this.mPointConfig_Slpt = WatchFaceConfig.getSlptConfig(param1String);
  4583. this.mPointConfig_Slpt26W = WatchFaceConfig.getSlpt26WConfig(param1String);
  4584. }
  4585. }
  4586.  
  4587. public class GtrWeather {
  4588. private String curFontConfig = null;
  4589.  
  4590. private WatchFaceConfig.ImageFontInfo curFontInfo = null;
  4591.  
  4592. private int cur_align = 0;
  4593.  
  4594. private int cur_space = 0;
  4595.  
  4596. private int cur_x0 = 0;
  4597.  
  4598. private int cur_x1 = 0;
  4599.  
  4600. private int cur_y0 = 0;
  4601.  
  4602. private int cur_y1 = 0;
  4603.  
  4604. private int dataType = 0;
  4605.  
  4606. private String highFontConfig = null;
  4607.  
  4608. private WatchFaceConfig.ImageFontInfo highFontInfo = null;
  4609.  
  4610. private int high_align = 0;
  4611.  
  4612. private int high_space = 0;
  4613.  
  4614. private int high_x0 = 0;
  4615.  
  4616. private int high_x1 = 0;
  4617.  
  4618. private int high_y0 = 0;
  4619.  
  4620. private int high_y1 = 0;
  4621.  
  4622. private String highlowFontConfig = null;
  4623.  
  4624. private WatchFaceConfig.ImageFontInfo highlowFontInfo = null;
  4625.  
  4626. private int highlow_align = 0;
  4627.  
  4628. private int highlow_space = 0;
  4629.  
  4630. private int highlow_x0 = 0;
  4631.  
  4632. private int highlow_x1 = 0;
  4633.  
  4634. private int highlow_y0 = 0;
  4635.  
  4636. private int highlow_y1 = 0;
  4637.  
  4638. private String lowFontConfig = null;
  4639.  
  4640. private WatchFaceConfig.ImageFontInfo lowFontInfo = null;
  4641.  
  4642. private int low_align = 0;
  4643.  
  4644. private int low_space = 0;
  4645.  
  4646. private int low_x0 = 0;
  4647.  
  4648. private int low_x1 = 0;
  4649.  
  4650. private int low_y0 = 0;
  4651.  
  4652. private int low_y1 = 0;
  4653.  
  4654. public GtrWeather(int param1Int) {
  4655. this.dataType = param1Int;
  4656. }
  4657.  
  4658. private void parseImageFontInfo() {
  4659. if (this.curFontConfig != null && this.curFontConfig.startsWith("@wfz/")) {
  4660. String str = this.curFontConfig.substring("@wfz/".length());
  4661. List<WatchFaceModuleItem> list = WatchFaceConfig.this.mExternalLoader.parseWatchFaceConfigList(str + "/font.xml");
  4662. if (list != null) {
  4663. this.curFontInfo = new WatchFaceConfig.ImageFontInfo(this.curFontConfig);
  4664. for (int i = 0; i < list.size(); i++) {
  4665. WatchFaceModuleItem watchFaceModuleItem = list.get(i);
  4666. if ("font".equals(watchFaceModuleItem.getType())) {
  4667. String str1 = watchFaceModuleItem.getCharset();
  4668. if (str1 != null && str1.length() == 1) {
  4669. char c = str1.charAt(0);
  4670. this.curFontInfo.putChar(c, watchFaceModuleItem.getConfig());
  4671. } else {
  4672. Log.d("WatchFaceConfig", "parseImageFontInfo invalid charset: " + str1);
  4673. }
  4674. }
  4675. }
  4676. }
  4677. }
  4678. if (this.highFontConfig != null && this.highFontConfig.startsWith("@wfz/")) {
  4679. String str = this.highFontConfig.substring("@wfz/".length());
  4680. List<WatchFaceModuleItem> list = WatchFaceConfig.this.mExternalLoader.parseWatchFaceConfigList(str + "/font.xml");
  4681. if (list != null) {
  4682. this.highFontInfo = new WatchFaceConfig.ImageFontInfo(this.highFontConfig);
  4683. for (int i = 0; i < list.size(); i++) {
  4684. WatchFaceModuleItem watchFaceModuleItem = list.get(i);
  4685. if ("font".equals(watchFaceModuleItem.getType())) {
  4686. String str1 = watchFaceModuleItem.getCharset();
  4687. if (str1 != null && str1.length() == 1) {
  4688. char c = str1.charAt(0);
  4689. this.highFontInfo.putChar(c, watchFaceModuleItem.getConfig());
  4690. } else {
  4691. Log.d("WatchFaceConfig", "parseImageFontInfo invalid charset: " + str1);
  4692. }
  4693. }
  4694. }
  4695. }
  4696. }
  4697. if (this.lowFontConfig != null && this.lowFontConfig.startsWith("@wfz/")) {
  4698. String str = this.lowFontConfig.substring("@wfz/".length());
  4699. List<WatchFaceModuleItem> list = WatchFaceConfig.this.mExternalLoader.parseWatchFaceConfigList(str + "/font.xml");
  4700. if (list != null) {
  4701. this.lowFontInfo = new WatchFaceConfig.ImageFontInfo(this.lowFontConfig);
  4702. for (int i = 0; i < list.size(); i++) {
  4703. WatchFaceModuleItem watchFaceModuleItem = list.get(i);
  4704. if ("font".equals(watchFaceModuleItem.getType())) {
  4705. String str1 = watchFaceModuleItem.getCharset();
  4706. if (str1 != null && str1.length() == 1) {
  4707. char c = str1.charAt(0);
  4708. this.lowFontInfo.putChar(c, watchFaceModuleItem.getConfig());
  4709. } else {
  4710. Log.d("WatchFaceConfig", "parseImageFontInfo invalid charset: " + str1);
  4711. }
  4712. }
  4713. }
  4714. }
  4715. }
  4716. if (this.highlowFontConfig != null && this.highlowFontConfig.startsWith("@wfz/")) {
  4717. String str = this.highlowFontConfig.substring("@wfz/".length());
  4718. List<WatchFaceModuleItem> list = WatchFaceConfig.this.mExternalLoader.parseWatchFaceConfigList(str + "/font.xml");
  4719. if (list != null) {
  4720. this.highlowFontInfo = new WatchFaceConfig.ImageFontInfo(this.highlowFontConfig);
  4721. for (int i = 0; i < list.size(); i++) {
  4722. WatchFaceModuleItem watchFaceModuleItem = list.get(i);
  4723. if ("font".equals(watchFaceModuleItem.getType())) {
  4724. String str1 = watchFaceModuleItem.getCharset();
  4725. if (str1 != null && str1.length() == 1) {
  4726. char c = str1.charAt(0);
  4727. this.highlowFontInfo.putChar(c, watchFaceModuleItem.getConfig());
  4728. } else {
  4729. Log.d("WatchFaceConfig", "parseImageFontInfo invalid charset: " + str1);
  4730. }
  4731. }
  4732. }
  4733. }
  4734. }
  4735. }
  4736.  
  4737. private void setHighLowTemp(int param1Int1, int param1Int2, int param1Int3, int param1Int4, int param1Int5, int param1Int6, String param1String) {
  4738. this.highlow_x0 = param1Int1;
  4739. this.highlow_y0 = param1Int2;
  4740. this.highlow_x1 = param1Int3;
  4741. this.highlow_y1 = param1Int4;
  4742. this.highlow_align = param1Int5;
  4743. this.highlow_space = param1Int6;
  4744. this.highlowFontConfig = param1String;
  4745. }
  4746.  
  4747. private void setHighTemp(int param1Int1, int param1Int2, int param1Int3, int param1Int4, int param1Int5, int param1Int6, String param1String) {
  4748. this.high_x0 = param1Int1;
  4749. this.high_y0 = param1Int2;
  4750. this.high_x1 = param1Int3;
  4751. this.high_y1 = param1Int4;
  4752. this.high_align = param1Int5;
  4753. this.high_space = param1Int6;
  4754. this.highFontConfig = param1String;
  4755. }
  4756.  
  4757. private void setLowTemp(int param1Int1, int param1Int2, int param1Int3, int param1Int4, int param1Int5, int param1Int6, String param1String) {
  4758. this.low_x0 = param1Int1;
  4759. this.low_y0 = param1Int2;
  4760. this.low_x1 = param1Int3;
  4761. this.low_y1 = param1Int4;
  4762. this.low_align = param1Int5;
  4763. this.low_space = param1Int6;
  4764. this.lowFontConfig = param1String;
  4765. }
  4766.  
  4767. void onDestory() {
  4768. this.highFontConfig = null;
  4769. if (this.highFontInfo != null)
  4770. this.highFontInfo.onDestroy();
  4771. this.lowFontConfig = null;
  4772. if (this.lowFontInfo != null)
  4773. this.lowFontInfo.onDestroy();
  4774. this.highlowFontConfig = null;
  4775. if (this.highlowFontInfo != null)
  4776. this.highlowFontInfo.onDestroy();
  4777. this.curFontConfig = null;
  4778. if (this.curFontInfo != null)
  4779. this.curFontInfo.onDestroy();
  4780. }
  4781. }
  4782.  
  4783. public class GtrWidgetConfig {
  4784. private Bitmap Icon;
  4785.  
  4786. private String KEY;
  4787.  
  4788. public String KEY_PREFIX = "GtrWidgetConfig";
  4789.  
  4790. int additiveCount = 0;
  4791.  
  4792. String additiveImageConfig = null;
  4793.  
  4794. WatchFaceConfig.AdditiveImage[] additiveImages = null;
  4795.  
  4796. private int align;
  4797.  
  4798. int bitmapArrayX = 0;
  4799.  
  4800. int bitmapArrayY = 0;
  4801.  
  4802. private int bitmapNewDisplayStyle;
  4803.  
  4804. Bitmap[] bitmaparray = null;
  4805.  
  4806. String bitmaparrayConfig = null;
  4807.  
  4808. String[] bitmaparrayConfig_Slpt = null;
  4809.  
  4810. String[] bitmaparrayConfig_Slpt26W = null;
  4811.  
  4812. int bitmaparray_count = 0;
  4813.  
  4814. int continueMode = 0;
  4815.  
  4816. private int dataType;
  4817.  
  4818. String fontConfig = null;
  4819.  
  4820. WatchFaceConfig.ImageFontInfo fontInfo;
  4821.  
  4822. Bitmap goalBitmap = null;
  4823.  
  4824. String goalBitmapConfig = null;
  4825.  
  4826. String goalBitmapConfig_Slpt = null;
  4827.  
  4828. String goalBitmapConfig_Slpt26W = null;
  4829.  
  4830. private int id;
  4831.  
  4832. private WatchFaceConfig.Arc mArc = null;
  4833.  
  4834. private int model;
  4835.  
  4836. private int newDisplayStyle;
  4837.  
  4838. int pointerA0 = 0;
  4839.  
  4840. int pointerA1 = 0;
  4841.  
  4842. int pointerCenterX = 0;
  4843.  
  4844. int pointerCenterY = 0;
  4845.  
  4846. String pointerConfig = null;
  4847.  
  4848. String pointerConfig_Slpt = null;
  4849.  
  4850. String pointerConfig_Slpt26W = null;
  4851.  
  4852. int pointerX = 0;
  4853.  
  4854. int pointerY = 0;
  4855.  
  4856. Bitmap ponterBitmap = null;
  4857.  
  4858. private int space = 0;
  4859.  
  4860. private int x;
  4861.  
  4862. private int x0;
  4863.  
  4864. private int x1;
  4865.  
  4866. private int y;
  4867.  
  4868. private int y0;
  4869.  
  4870. private int y1;
  4871.  
  4872. public GtrWidgetConfig(int param1Int1, int param1Int2, int param1Int3, int param1Int4, int param1Int5, int param1Int6, int param1Int7, String param1String, int param1Int8, int param1Int9) {
  4873. this.KEY = this.KEY_PREFIX + param1Int1;
  4874. this.id = param1Int1;
  4875. this.dataType = param1Int2;
  4876. this.x0 = param1Int3;
  4877. this.y0 = param1Int4;
  4878. this.x1 = param1Int5;
  4879. this.y1 = param1Int6;
  4880. this.align = param1Int7;
  4881. this.fontConfig = param1String;
  4882. this.space = param1Int8;
  4883. }
  4884.  
  4885. public GtrWidgetConfig(int param1Int1, int param1Int2, int param1Int3, int param1Int4, String param1String, int param1Int5) {
  4886. this.id = param1Int1;
  4887. this.dataType = param1Int2;
  4888. this.bitmapArrayX = param1Int3;
  4889. this.bitmapArrayY = param1Int4;
  4890. this.bitmaparrayConfig = param1String;
  4891. this.bitmaparray_count = param1Int5;
  4892. }
  4893.  
  4894. public GtrWidgetConfig(int param1Int1, int param1Int2, int param1Int3, String param1String, int param1Int4) {
  4895. this.dataType = param1Int1;
  4896. this.x = param1Int2;
  4897. this.y = param1Int3;
  4898. this.goalBitmapConfig = param1String;
  4899. this.goalBitmapConfig_Slpt = WatchFaceConfig.getSlptConfig(param1String);
  4900. this.goalBitmapConfig_Slpt26W = WatchFaceConfig.getSlpt26WConfig(param1String);
  4901. if (this.goalBitmapConfig != null && this.goalBitmapConfig.startsWith("@wfz/"))
  4902. this.goalBitmap = WatchFaceConfig.this.parseBitmap(6, this.goalBitmapConfig.substring("@wfz/".length()));
  4903. }
  4904.  
  4905. private void parseImageFontInfo() {
  4906. if (this.fontConfig != null && this.fontConfig.startsWith("@wfz/")) {
  4907. String str = this.fontConfig.substring("@wfz/".length());
  4908. List<WatchFaceModuleItem> list = WatchFaceConfig.this.mExternalLoader.parseWatchFaceConfigList(str + "/font.xml");
  4909. if (list != null) {
  4910. this.fontInfo = new WatchFaceConfig.ImageFontInfo(this.fontConfig);
  4911. for (int i = 0; i < list.size(); i++) {
  4912. WatchFaceModuleItem watchFaceModuleItem = list.get(i);
  4913. if ("font".equals(watchFaceModuleItem.getType())) {
  4914. String str1 = watchFaceModuleItem.getCharset();
  4915. if (str1 != null && str1.length() == 1) {
  4916. char c = str1.charAt(0);
  4917. this.fontInfo.putChar(c, watchFaceModuleItem.getConfig());
  4918. } else {
  4919. Log.d("WatchFaceConfig", "parseImageFontInfo invalid charset: " + str1);
  4920. }
  4921. }
  4922. }
  4923. }
  4924. }
  4925. }
  4926.  
  4927. public int getAdditiveCount() {
  4928. return this.additiveCount;
  4929. }
  4930.  
  4931. public String getAdditiveImageConfig() {
  4932. return this.additiveImageConfig;
  4933. }
  4934.  
  4935. public WatchFaceConfig.AdditiveImage[] getAdditiveImages() {
  4936. return this.additiveImages;
  4937. }
  4938.  
  4939. public int getAlign() {
  4940. return this.align;
  4941. }
  4942.  
  4943. public int getBitmapArrayX() {
  4944. return this.bitmapArrayX;
  4945. }
  4946.  
  4947. public int getBitmapArrayY() {
  4948. return this.bitmapArrayY;
  4949. }
  4950.  
  4951. public int getBitmapNewDisplayStyle() {
  4952. return this.bitmapNewDisplayStyle;
  4953. }
  4954.  
  4955. public Bitmap[] getBitmaparray() {
  4956. return this.bitmaparray;
  4957. }
  4958.  
  4959. public String getBitmaparrayConfig() {
  4960. return this.bitmaparrayConfig;
  4961. }
  4962.  
  4963. public String[] getBitmaparrayConfig_Slpt() {
  4964. return this.bitmaparrayConfig_Slpt;
  4965. }
  4966.  
  4967. public String[] getBitmaparrayConfig_Slpt26W() {
  4968. return this.bitmaparrayConfig_Slpt26W;
  4969. }
  4970.  
  4971. public int getBitmaparray_count() {
  4972. return this.bitmaparray_count;
  4973. }
  4974.  
  4975. public int getContinueMode() {
  4976. return this.continueMode;
  4977. }
  4978.  
  4979. public int getDataType() {
  4980. return this.dataType;
  4981. }
  4982.  
  4983. public String getFontConfig() {
  4984. return this.fontConfig;
  4985. }
  4986.  
  4987. public Bitmap getGoalBitmap() {
  4988. return this.goalBitmap;
  4989. }
  4990.  
  4991. public String getGoalBitmapConfig() {
  4992. return this.goalBitmapConfig;
  4993. }
  4994.  
  4995. public String getGoalBitmapConfig_Slpt() {
  4996. return this.goalBitmapConfig_Slpt;
  4997. }
  4998.  
  4999. public String getGoalBitmapConfig_Slpt26W() {
  5000. return this.goalBitmapConfig_Slpt26W;
  5001. }
  5002.  
  5003. public WatchFaceConfig.ImageFontInfo getImageFontInfo() {
  5004. return this.fontInfo;
  5005. }
  5006.  
  5007. public int getNewDisplayStyle() {
  5008. return this.newDisplayStyle;
  5009. }
  5010.  
  5011. public int getPointerA0() {
  5012. return this.pointerA0;
  5013. }
  5014.  
  5015. public int getPointerA1() {
  5016. return this.pointerA1;
  5017. }
  5018.  
  5019. public int getPointerCenterX() {
  5020. return this.pointerCenterX;
  5021. }
  5022.  
  5023. public int getPointerCenterY() {
  5024. return this.pointerCenterY;
  5025. }
  5026.  
  5027. public String getPointerConfig() {
  5028. return this.pointerConfig;
  5029. }
  5030.  
  5031. public String getPointerConfig_Slpt() {
  5032. return this.pointerConfig_Slpt;
  5033. }
  5034.  
  5035. public String getPointerConfig_Slpt26W() {
  5036. return this.pointerConfig_Slpt26W;
  5037. }
  5038.  
  5039. public int getPointerX() {
  5040. return this.pointerX;
  5041. }
  5042.  
  5043. public int getPointerY() {
  5044. return this.pointerY;
  5045. }
  5046.  
  5047. public Bitmap getPonterBitmap() {
  5048. return this.ponterBitmap;
  5049. }
  5050.  
  5051. public int getSpace() {
  5052. return this.space;
  5053. }
  5054.  
  5055. public int getX() {
  5056. return this.x;
  5057. }
  5058.  
  5059. public int getX0() {
  5060. return this.x0;
  5061. }
  5062.  
  5063. public int getX1() {
  5064. return this.x1;
  5065. }
  5066.  
  5067. public int getY() {
  5068. return this.y;
  5069. }
  5070.  
  5071. public int getY0() {
  5072. return this.y0;
  5073. }
  5074.  
  5075. public int getY1() {
  5076. return this.y1;
  5077. }
  5078.  
  5079. public WatchFaceConfig.Arc getmArc() {
  5080. return this.mArc;
  5081. }
  5082.  
  5083. void onDestroy() {
  5084. WatchFaceConfig.recycleBitmap(this.Icon);
  5085. this.fontConfig = null;
  5086. if (this.fontInfo != null)
  5087. this.fontInfo.onDestroy();
  5088. this.goalBitmapConfig = null;
  5089. this.goalBitmapConfig_Slpt = null;
  5090. this.goalBitmapConfig_Slpt26W = null;
  5091. WatchFaceConfig.recycleBitmap(this.goalBitmap);
  5092. this.pointerConfig = null;
  5093. this.pointerConfig_Slpt = null;
  5094. this.pointerConfig_Slpt26W = null;
  5095. WatchFaceConfig.recycleBitmap(this.ponterBitmap);
  5096. this.bitmaparrayConfig = null;
  5097. this.bitmaparrayConfig_Slpt = null;
  5098. this.bitmaparrayConfig_Slpt26W = null;
  5099. WatchFaceConfig.recycleBitmapArray(this.bitmaparray);
  5100. this.additiveImageConfig = null;
  5101. if (this.additiveImages != null) {
  5102. WatchFaceConfig.AdditiveImage[] arrayOfAdditiveImage = this.additiveImages;
  5103. int j = arrayOfAdditiveImage.length;
  5104. for (int i = 0; i < j; i++)
  5105. arrayOfAdditiveImage[i].onDestroy();
  5106. }
  5107. if (this.mArc != null) {
  5108. this.mArc.onDestory();
  5109. this.mArc = null;
  5110. }
  5111. }
  5112.  
  5113. public void parseAdditiveImages() {
  5114. if (this.additiveImageConfig != null && this.additiveImageConfig.startsWith("@wfz/")) {
  5115. String str = this.additiveImageConfig.substring("@wfz/".length());
  5116. List<WatchFaceModuleItem> list = WatchFaceConfig.this.mExternalLoader.parseWatchFaceConfigList(str + "/additive.xml");
  5117. if (list != null) {
  5118. this.additiveImages = new WatchFaceConfig.AdditiveImage[this.additiveCount];
  5119. for (int i = 0; i < list.size(); i++) {
  5120. WatchFaceModuleItem watchFaceModuleItem = list.get(i);
  5121. if ("addtiveImage".equals(watchFaceModuleItem.getType())) {
  5122. watchFaceModuleItem.getIndex();
  5123. this.additiveImages[i] = new WatchFaceConfig.AdditiveImage();
  5124. if (this.additiveImages[i] != null) {
  5125. String str1 = watchFaceModuleItem.getConfig();
  5126. if (str1 != null && str1.startsWith("@wfz/")) {
  5127. String str2 = str1.substring("@wfz/".length());
  5128. this.additiveImages[i].setFilePath(str1);
  5129. this.additiveImages[i].setX(watchFaceModuleItem.getX());
  5130. this.additiveImages[i].setY(watchFaceModuleItem.getY());
  5131. this.additiveImages[i].setImage(WatchFaceConfig.this.parseBitmap(6, str2));
  5132. }
  5133. }
  5134. }
  5135. }
  5136. }
  5137. }
  5138. }
  5139.  
  5140. public void parseBitmaparray() {
  5141. if (this.bitmaparrayConfig != null && this.bitmaparrayConfig.startsWith("@wfz/")) {
  5142. String str = this.bitmaparrayConfig.substring("@wfz/".length());
  5143. this.bitmaparray = new Bitmap[this.bitmaparray_count];
  5144. this.bitmaparrayConfig_Slpt = new String[this.bitmaparray_count];
  5145. this.bitmaparrayConfig_Slpt26W = new String[this.bitmaparray_count];
  5146. for (int i = 0; i < this.bitmaparray_count; i++) {
  5147. String str1 = str + "/" + String.format("%02d", new Object[] { Integer.valueOf(i) }) + ".png";
  5148. this.bitmaparrayConfig_Slpt[i] = str + "/8c/" + String.format("%02d", new Object[] { Integer.valueOf(i) }) + ".png";
  5149. this.bitmaparrayConfig_Slpt26W[i] = str + "/slpt/" + String.format("%02d", new Object[] { Integer.valueOf(i) }) + ".png";
  5150. this.bitmaparray[i] = WatchFaceConfig.this.parseBitmap(6, str1);
  5151. }
  5152. }
  5153. }
  5154.  
  5155. public void parsePointerBitmap() {
  5156. if (this.pointerConfig != null && this.pointerConfig.startsWith("@wfz/")) {
  5157. String str = this.pointerConfig.substring("@wfz/".length());
  5158. this.ponterBitmap = WatchFaceConfig.this.parseBitmap(6, str);
  5159. }
  5160. }
  5161.  
  5162. public void setAdditiveCount(int param1Int) {
  5163. this.additiveCount = param1Int;
  5164. }
  5165.  
  5166. public void setAdditiveImageConfig(String param1String) {
  5167. this.additiveImageConfig = param1String;
  5168. }
  5169.  
  5170. public void setBitmapArrayX(int param1Int) {
  5171. this.bitmapArrayX = param1Int;
  5172. }
  5173.  
  5174. public void setBitmapArrayY(int param1Int) {
  5175. this.bitmapArrayY = param1Int;
  5176. }
  5177.  
  5178. public void setBitmapNewDisplayStyle(int param1Int) {
  5179. this.bitmapNewDisplayStyle = param1Int;
  5180. }
  5181.  
  5182. public void setBitmaparrayConfig(String param1String) {
  5183. this.bitmaparrayConfig = param1String;
  5184. }
  5185.  
  5186. public void setBitmaparray_count(int param1Int) {
  5187. this.bitmaparray_count = param1Int;
  5188. }
  5189.  
  5190. public void setContinueMode(int param1Int) {
  5191. this.continueMode = param1Int;
  5192. }
  5193.  
  5194. public void setNewDisplayStyle(int param1Int) {
  5195. this.newDisplayStyle = param1Int;
  5196. }
  5197.  
  5198. public void setPointerA0(int param1Int) {
  5199. this.pointerA0 = param1Int;
  5200. }
  5201.  
  5202. public void setPointerA1(int param1Int) {
  5203. this.pointerA1 = param1Int;
  5204. }
  5205.  
  5206. public void setPointerCenterX(int param1Int) {
  5207. this.pointerCenterX = param1Int;
  5208. }
  5209.  
  5210. public void setPointerCenterY(int param1Int) {
  5211. this.pointerCenterY = param1Int;
  5212. }
  5213.  
  5214. public void setPointerConfig(String param1String) {
  5215. this.pointerConfig = param1String;
  5216. this.pointerConfig_Slpt = WatchFaceConfig.getSlptConfig(param1String);
  5217. this.pointerConfig_Slpt26W = WatchFaceConfig.getSlpt26WConfig(param1String);
  5218. }
  5219.  
  5220. public void setPointerX(int param1Int) {
  5221. this.pointerX = param1Int;
  5222. }
  5223.  
  5224. public void setPointerY(int param1Int) {
  5225. this.pointerY = param1Int;
  5226. }
  5227.  
  5228. public void setmArc(WatchFaceConfig.Arc param1Arc) {
  5229. this.mArc = param1Arc;
  5230. }
  5231.  
  5232. public String toString() {
  5233. return this.KEY + " dataType:" + this.dataType + " model:" + this.model + " x:" + this.x + " y:" + this.y;
  5234. }
  5235. }
  5236.  
  5237. public class IconWidget {
  5238. Bitmap icon;
  5239.  
  5240. String iconBmpConfig = null;
  5241.  
  5242. String iconBmpConfig_Slpt = null;
  5243.  
  5244. String iconBmpConfig_Slpt26W = null;
  5245.  
  5246. int x = 0;
  5247.  
  5248. int y = 0;
  5249.  
  5250. public IconWidget(int param1Int1, int param1Int2, String param1String) {
  5251. this.x = param1Int1;
  5252. this.y = param1Int2;
  5253. String str = param1String;
  5254. if (param1String != null) {
  5255. str = param1String;
  5256. if (param1String.contains("CN")) {
  5257. str = param1String;
  5258. if (!"CN".equals(Util.getWfzLocal()))
  5259. str = param1String.replace("CN", Util.getWfzLocal());
  5260. }
  5261. }
  5262. this.iconBmpConfig = str;
  5263. this.iconBmpConfig_Slpt = WatchFaceConfig.getSlptConfig(str);
  5264. this.iconBmpConfig_Slpt26W = WatchFaceConfig.getSlpt26WConfig(str);
  5265. if (this.iconBmpConfig.startsWith("@wfz/"))
  5266. this.icon = WatchFaceConfig.this.parseBitmap(6, this.iconBmpConfig.substring("@wfz/".length()));
  5267. }
  5268.  
  5269. public Bitmap getIcon() {
  5270. return this.icon;
  5271. }
  5272.  
  5273. public String getIconBmpConfig_Slpt() {
  5274. return this.iconBmpConfig_Slpt;
  5275. }
  5276.  
  5277. public String getIconBmpConfig_Slpt26W() {
  5278. return this.iconBmpConfig_Slpt26W;
  5279. }
  5280.  
  5281. public int getX() {
  5282. return this.x;
  5283. }
  5284.  
  5285. public int getY() {
  5286. return this.y;
  5287. }
  5288.  
  5289. void onDestroy() {
  5290. this.iconBmpConfig = null;
  5291. this.iconBmpConfig_Slpt = null;
  5292. this.iconBmpConfig_Slpt26W = null;
  5293. if (this.icon != null)
  5294. WatchFaceConfig.recycleBitmap(this.icon);
  5295. }
  5296. }
  5297.  
  5298. public class ImageFontInfo {
  5299. private Canvas canvas;
  5300.  
  5301. private PorterDuffColorFilter colorFilter = new PorterDuffColorFilter(0, PorterDuff.Mode.SRC_ATOP);
  5302.  
  5303. private String configs;
  5304.  
  5305. private SparseArray<String> fontConfigs = new SparseArray();
  5306.  
  5307. private ImageFont imageFont;
  5308.  
  5309. private Paint paint;
  5310.  
  5311. private ImageFontInfo(String param1String) {
  5312. this.configs = param1String;
  5313. this.paint = new Paint(6);
  5314. this.canvas = new Canvas();
  5315. }
  5316.  
  5317. private byte[] bitmap2Bytes(Bitmap param1Bitmap) {
  5318. ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
  5319. param1Bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
  5320. return byteArrayOutputStream.toByteArray();
  5321. }
  5322.  
  5323. private void putChar(char param1Char, String param1String) {
  5324. this.fontConfigs.put(param1Char, param1String);
  5325. }
  5326.  
  5327. void onDestroy() {
  5328. if (this.imageFont != null)
  5329. this.imageFont.destroy();
  5330. }
  5331.  
  5332. public byte[] parseCharData(char param1Char) {
  5333. String str2 = null;
  5334. String str3 = (String)this.fontConfigs.get(param1Char);
  5335. String str1 = str2;
  5336. if (str3 != null) {
  5337. if (str3.startsWith("@assets/")) {
  5338. str1 = str3.substring("@assets/".length());
  5339. str2 = WatchFaceConfig.this.getParent(str1);
  5340. String str4 = WatchFaceConfig.getFileName(str1);
  5341. String str5 = str2 + "8c";
  5342. if (WatchFaceConfig.isAssetsFileExist(WatchFaceConfig.this.mContext, str5, str4))
  5343. return SimpleFile.readFileFromAssets(WatchFaceConfig.this.mContext, str5 + File.separator + str4);
  5344. if (WatchFaceConfig.isAssetsFileExist(WatchFaceConfig.this.mContext, str2, str4))
  5345. return SimpleFile.readFileFromAssets(WatchFaceConfig.this.mContext, str1);
  5346. Log.d("WatchFaceConfig", "parseCharData failure. No file found " + str3);
  5347. return null;
  5348. }
  5349. } else {
  5350. return (byte[])str1;
  5351. }
  5352. str1 = str2;
  5353. if (str3.startsWith("@wfz/")) {
  5354. str1 = str3.substring("@wfz/".length());
  5355. int i = str1.lastIndexOf(File.separator);
  5356. str2 = (new StringBuffer(str1)).insert(i + 1, "8c/").toString();
  5357. if (WatchFaceConfig.this.mExternalLoader != null) {
  5358. if (WatchFaceConfig.this.mExternalLoader.exists(str2))
  5359. return WatchFaceConfig.this.parseFile(6, str2);
  5360. if (WatchFaceConfig.this.mExternalLoader.exists(str1))
  5361. return WatchFaceConfig.this.parseFile(6, str1);
  5362. Log.d("WatchFaceConfig", "parseCharData failure. No file found " + str3);
  5363. return null;
  5364. }
  5365. Log.d("WatchFaceConfig", "parseCharData failure. ExternalLoader not init.");
  5366. return null;
  5367. }
  5368. return (byte[])str1;
  5369. }
  5370.  
  5371. public byte[] parseCharData(char param1Char, int param1Int) {
  5372. Bitmap bitmap2;
  5373. byte[] arrayOfByte2 = parseCharData(param1Char);
  5374. byte[] arrayOfByte1 = arrayOfByte2;
  5375. if (param1Int != 0) {
  5376. arrayOfByte1 = arrayOfByte2;
  5377. if (arrayOfByte2 != null) {
  5378. bitmap2 = BitmapFactory.decodeByteArray(arrayOfByte2, 0, arrayOfByte2.length);
  5379. arrayOfByte1 = arrayOfByte2;
  5380. if (bitmap2 != null) {
  5381. this.colorFilter.setColor(param1Int);
  5382. this.paint.setColorFilter((ColorFilter)this.colorFilter);
  5383. Bitmap bitmap = Bitmap.createBitmap(bitmap2.getWidth(), bitmap2.getHeight(), bitmap2.getConfig());
  5384. this.canvas.setBitmap(bitmap);
  5385. this.canvas.drawBitmap(bitmap2, 0.0F, 0.0F, this.paint);
  5386. this.canvas.setBitmap(null);
  5387. if (Util.isSlptSupportColor(param1Int))
  5388. return bitmap2Bytes(bitmap);
  5389. } else {
  5390. return arrayOfByte1;
  5391. }
  5392. } else {
  5393. return arrayOfByte1;
  5394. }
  5395. } else {
  5396. return arrayOfByte1;
  5397. }
  5398. Bitmap bitmap1 = Bitmap.createBitmap(bitmap2.getWidth(), bitmap2.getHeight(), bitmap2.getConfig());
  5399. Util.ditherBitmap((Bitmap)arrayOfByte1, bitmap1, 0.7F);
  5400. return bitmap2Bytes(bitmap1);
  5401. }
  5402.  
  5403. public Bitmap parseCharDataToBitmap(char param1Char, String param1String) {
  5404. String str = (String)this.fontConfigs.get(param1Char);
  5405. if (str != null && str.startsWith("@wfz/")) {
  5406. String str1 = str.substring("@wfz/".length());
  5407. int i = str1.lastIndexOf(File.separator);
  5408. param1String = (new StringBuffer(str1)).insert(i + 1, param1String).toString();
  5409. if (WatchFaceConfig.this.mExternalLoader != null) {
  5410. if (WatchFaceConfig.this.mExternalLoader.exists(param1String))
  5411. return WatchFaceConfig.this.parseFileToBitmap(6, param1String);
  5412. if (WatchFaceConfig.this.mExternalLoader.exists(str1))
  5413. return WatchFaceConfig.this.parseFileToBitmap(6, str1);
  5414. Log.d("WatchFaceConfig", "parseCharData failure. No file found " + str);
  5415. return null;
  5416. }
  5417. } else {
  5418. return null;
  5419. }
  5420. Log.d("WatchFaceConfig", "parseCharData failure. ExternalLoader not init.");
  5421. return null;
  5422. }
  5423.  
  5424. public ImageFont parseImageFont() {
  5425. if (this.imageFont != null)
  5426. return this.imageFont;
  5427. this.imageFont = new ImageFont(this.configs);
  5428. for (int i = 0; i < this.fontConfigs.size(); i++) {
  5429. String str = (String)this.fontConfigs.valueAt(i);
  5430. char c = (char)this.fontConfigs.keyAt(i);
  5431. Log.d("WatchFaceConfig", "parseImageFont found char '" + c + "' config: " + str);
  5432. if (str != null) {
  5433. Bitmap bitmap;
  5434. String str1 = null;
  5435. if (str.startsWith("@assets/")) {
  5436. str1 = str.substring("@assets/".length());
  5437. bitmap = WatchFaceConfig.this.parseBitmap(2, str1);
  5438. } else if (str.startsWith("@drawable/")) {
  5439. str1 = str.substring("@drawable/".length());
  5440. bitmap = WatchFaceConfig.this.parseBitmap(1, str1);
  5441. } else if (str.startsWith("@wfz/")) {
  5442. str1 = str.substring("@wfz/".length());
  5443. bitmap = WatchFaceConfig.this.parseBitmap(6, str1);
  5444. }
  5445. if (bitmap != null) {
  5446. this.imageFont.addChar(c, bitmap);
  5447. Log.d("WatchFaceConfig", " parse done.");
  5448. }
  5449. }
  5450. }
  5451. return this.imageFont;
  5452. }
  5453. }
  5454.  
  5455. public class TimeDigital {
  5456. int color = 0;
  5457.  
  5458. String config;
  5459.  
  5460. String fontConfig;
  5461.  
  5462. WatchFaceConfig.ImageFontInfo fontInfo;
  5463.  
  5464. int gap;
  5465.  
  5466. int height;
  5467.  
  5468. int model;
  5469.  
  5470. int width;
  5471.  
  5472. int x;
  5473.  
  5474. int y;
  5475.  
  5476. public TimeDigital(int param1Int1, int param1Int2, int param1Int3, int param1Int4, int param1Int5, String param1String1, int param1Int6, String param1String2) {
  5477. this.model = param1Int1;
  5478. this.x = param1Int2;
  5479. this.y = param1Int3;
  5480. this.width = param1Int4;
  5481. this.height = param1Int5;
  5482. this.fontConfig = param1String1;
  5483. this.gap = param1Int6;
  5484. if (param1String2 != null)
  5485. try {
  5486. this.color = Color.parseColor(param1String2);
  5487. } catch (Exception exception) {}
  5488. encodeConfig();
  5489. }
  5490.  
  5491. public TimeDigital(String param1String) throws JSONException {
  5492. this.config = param1String;
  5493. decodeConfig();
  5494. }
  5495.  
  5496. private void decodeConfig() throws JSONException {
  5497. JSONObject jSONObject = new JSONObject(this.config);
  5498. this.model = jSONObject.getInt("model");
  5499. this.x = jSONObject.getInt("x");
  5500. this.y = jSONObject.getInt("y");
  5501. this.width = jSONObject.getInt("width");
  5502. this.height = jSONObject.getInt("height");
  5503. this.fontConfig = jSONObject.getString("fontConfig");
  5504. this.gap = jSONObject.getInt("gap");
  5505. this.color = jSONObject.getInt("color");
  5506. Log.d("WatchFaceConfig", "TimeDigital.decodeConfig: " + this);
  5507. }
  5508.  
  5509. private void encodeConfig() {
  5510. try {
  5511. JSONObject jSONObject = new JSONObject();
  5512. jSONObject.put("model", this.model);
  5513. jSONObject.put("x", this.x);
  5514. jSONObject.put("y", this.y);
  5515. jSONObject.put("width", this.width);
  5516. jSONObject.put("height", this.height);
  5517. jSONObject.put("fontConfig", this.fontConfig);
  5518. jSONObject.put("gap", this.gap);
  5519. jSONObject.put("color", this.color);
  5520. this.config = jSONObject.toString();
  5521. Log.d("WatchFaceConfig", "TimeDigital.encodeConfig: " + this.config);
  5522. return;
  5523. } catch (JSONException jSONException) {
  5524. Log.d("WatchFaceConfig", "TimeDigital.encodeConfig Error.");
  5525. jSONException.printStackTrace();
  5526. return;
  5527. }
  5528. }
  5529.  
  5530. private void parseImageFontInfo() {
  5531. if (this.fontConfig != null && this.fontConfig.startsWith("@wfz/")) {
  5532. String str = this.fontConfig.substring("@wfz/".length());
  5533. List<WatchFaceModuleItem> list = WatchFaceConfig.this.mExternalLoader.parseWatchFaceConfigList(str + "/font.xml");
  5534. if (list != null) {
  5535. this.fontInfo = new WatchFaceConfig.ImageFontInfo(this.fontConfig);
  5536. for (int i = 0; i < list.size(); i++) {
  5537. WatchFaceModuleItem watchFaceModuleItem = list.get(i);
  5538. if ("font".equals(watchFaceModuleItem.getType())) {
  5539. String str1 = watchFaceModuleItem.getCharset();
  5540. if (str1 != null && str1.length() == 1) {
  5541. char c = str1.charAt(0);
  5542. this.fontInfo.putChar(c, watchFaceModuleItem.getConfig());
  5543. } else {
  5544. Log.d("WatchFaceConfig", "parseImageFontInfo invalid charset: " + str1);
  5545. }
  5546. }
  5547. }
  5548. }
  5549. }
  5550. }
  5551.  
  5552. public int getColor() {
  5553. return this.color;
  5554. }
  5555.  
  5556. public int getGap() {
  5557. return this.gap;
  5558. }
  5559.  
  5560. public int getHeight() {
  5561. return this.height;
  5562. }
  5563.  
  5564. public WatchFaceConfig.ImageFontInfo getImageFontInfo() {
  5565. return this.fontInfo;
  5566. }
  5567.  
  5568. public int getModel() {
  5569. return this.model;
  5570. }
  5571.  
  5572. public int getWidth() {
  5573. return this.width;
  5574. }
  5575.  
  5576. public int getX() {
  5577. return this.x;
  5578. }
  5579.  
  5580. public int getY() {
  5581. return this.y;
  5582. }
  5583.  
  5584. void onDestroy() {
  5585. if (this.fontInfo != null)
  5586. this.fontInfo.onDestroy();
  5587. }
  5588.  
  5589. public String toString() {
  5590. return "TimeDigital: " + this.config;
  5591. }
  5592. }
  5593.  
  5594. public class TimeDisplay {
  5595. Bitmap AMBitmap = null;
  5596.  
  5597. Bitmap Colon_hm_bitmap = null;
  5598.  
  5599. String Colon_hm_config = null;
  5600.  
  5601. String Colon_hm_config_Slpt = null;
  5602.  
  5603. String Colon_hm_config_Slpt26W = null;
  5604.  
  5605. Bitmap Colon_ms_bitmap = null;
  5606.  
  5607. String Colon_ms_config = null;
  5608.  
  5609. String Colon_ms_config_Slpt = null;
  5610.  
  5611. String Colon_ms_config_Slpt26W = null;
  5612.  
  5613. Bitmap PMBitmap = null;
  5614.  
  5615. String amConfig = null;
  5616.  
  5617. String amConfig_Slpt = null;
  5618.  
  5619. String amConfig_Slpt26W = null;
  5620.  
  5621. int am_x = 0;
  5622.  
  5623. int am_y = 0;
  5624.  
  5625. int colon_hm_x = 0;
  5626.  
  5627. int colon_hm_y = 0;
  5628.  
  5629. int colon_ms_x = 0;
  5630.  
  5631. int colon_ms_y = 0;
  5632.  
  5633. int color = 0;
  5634.  
  5635. int hour_high_x = 0;
  5636.  
  5637. int hour_high_y = 0;
  5638.  
  5639. int hour_low_x = 0;
  5640.  
  5641. int hour_low_y = 0;
  5642.  
  5643. String mHourFontConfig = null;
  5644.  
  5645. WatchFaceConfig.ImageFontInfo mHourImageFontInfo = null;
  5646.  
  5647. String mMinFontConfig = null;
  5648.  
  5649. WatchFaceConfig.ImageFontInfo mMinImageFontInfo = null;
  5650.  
  5651. String mSecFontConfig = null;
  5652.  
  5653. WatchFaceConfig.ImageFontInfo mSecImageFontInfo = null;
  5654.  
  5655. int min_high_x = 0;
  5656.  
  5657. int min_high_y = 0;
  5658.  
  5659. int min_low_x = 0;
  5660.  
  5661. int min_low_y = 0;
  5662.  
  5663. int model;
  5664.  
  5665. String pmConfig = null;
  5666.  
  5667. String pmConfig_Slpt = null;
  5668.  
  5669. String pmConfig_Slpt26W = null;
  5670.  
  5671. int pm_x = 0;
  5672.  
  5673. int pm_y = 0;
  5674.  
  5675. int sec_high_x = 0;
  5676.  
  5677. int sec_high_y = 0;
  5678.  
  5679. int sec_low_x = 0;
  5680.  
  5681. int sec_low_y = 0;
  5682.  
  5683. public TimeDisplay(int param1Int1, int param1Int2, int param1Int3, int param1Int4, int param1Int5, String param1String1, int param1Int6, int param1Int7, int param1Int8, int param1Int9, String param1String2, int param1Int10, int param1Int11, int param1Int12, int param1Int13, String param1String3) {
  5684. this.model = param1Int1;
  5685. this.hour_high_x = param1Int2;
  5686. this.hour_high_y = param1Int3;
  5687. this.hour_low_x = param1Int4;
  5688. this.hour_low_y = param1Int5;
  5689. this.mHourFontConfig = param1String1;
  5690. this.min_high_x = param1Int6;
  5691. this.min_high_y = param1Int7;
  5692. this.min_low_x = param1Int8;
  5693. this.min_low_y = param1Int9;
  5694. this.mMinFontConfig = param1String2;
  5695. this.sec_high_x = param1Int10;
  5696. this.sec_high_y = param1Int11;
  5697. this.sec_low_x = param1Int12;
  5698. this.sec_low_y = param1Int13;
  5699. this.mSecFontConfig = param1String3;
  5700. }
  5701.  
  5702. private void parseImageFontInfo() {
  5703. if (this.mHourFontConfig != null && this.mHourFontConfig.startsWith("@wfz/")) {
  5704. String str = this.mHourFontConfig.substring("@wfz/".length());
  5705. List<WatchFaceModuleItem> list = WatchFaceConfig.this.mExternalLoader.parseWatchFaceConfigList(str + "/font.xml");
  5706. if (list != null) {
  5707. this.mHourImageFontInfo = new WatchFaceConfig.ImageFontInfo(this.mHourFontConfig);
  5708. for (int i = 0; i < list.size(); i++) {
  5709. WatchFaceModuleItem watchFaceModuleItem = list.get(i);
  5710. if ("font".equals(watchFaceModuleItem.getType())) {
  5711. String str1 = watchFaceModuleItem.getCharset();
  5712. if (str1 != null && str1.length() == 1) {
  5713. char c = str1.charAt(0);
  5714. this.mHourImageFontInfo.putChar(c, watchFaceModuleItem.getConfig());
  5715. } else {
  5716. Log.d("WatchFaceConfig", "parseImageFontInfo invalid charset: " + str1);
  5717. }
  5718. }
  5719. }
  5720. }
  5721. }
  5722. if (this.mMinFontConfig != null && this.mMinFontConfig.startsWith("@wfz/")) {
  5723. String str = this.mMinFontConfig.substring("@wfz/".length());
  5724. List<WatchFaceModuleItem> list = WatchFaceConfig.this.mExternalLoader.parseWatchFaceConfigList(str + "/font.xml");
  5725. if (list != null) {
  5726. this.mMinImageFontInfo = new WatchFaceConfig.ImageFontInfo(this.mMinFontConfig);
  5727. for (int i = 0; i < list.size(); i++) {
  5728. WatchFaceModuleItem watchFaceModuleItem = list.get(i);
  5729. if ("font".equals(watchFaceModuleItem.getType())) {
  5730. String str1 = watchFaceModuleItem.getCharset();
  5731. if (str1 != null && str1.length() == 1) {
  5732. char c = str1.charAt(0);
  5733. this.mMinImageFontInfo.putChar(c, watchFaceModuleItem.getConfig());
  5734. } else {
  5735. Log.d("WatchFaceConfig", "parseImageFontInfo invalid charset: " + str1);
  5736. }
  5737. }
  5738. }
  5739. }
  5740. }
  5741. if (this.mSecFontConfig != null && this.mSecFontConfig.startsWith("@wfz/")) {
  5742. String str = this.mSecFontConfig.substring("@wfz/".length());
  5743. List<WatchFaceModuleItem> list = WatchFaceConfig.this.mExternalLoader.parseWatchFaceConfigList(str + "/font.xml");
  5744. if (list != null) {
  5745. this.mSecImageFontInfo = new WatchFaceConfig.ImageFontInfo(this.mSecFontConfig);
  5746. for (int i = 0; i < list.size(); i++) {
  5747. WatchFaceModuleItem watchFaceModuleItem = list.get(i);
  5748. if ("font".equals(watchFaceModuleItem.getType())) {
  5749. String str1 = watchFaceModuleItem.getCharset();
  5750. if (str1 != null && str1.length() == 1) {
  5751. char c = str1.charAt(0);
  5752. this.mSecImageFontInfo.putChar(c, watchFaceModuleItem.getConfig());
  5753. } else {
  5754. Log.d("WatchFaceConfig", "parseImageFontInfo invalid charset: " + str1);
  5755. }
  5756. }
  5757. }
  5758. }
  5759. }
  5760. }
  5761.  
  5762. public Bitmap getAmBitmap() {
  5763. return this.AMBitmap;
  5764. }
  5765.  
  5766. public String getAmConfig() {
  5767. return this.amConfig;
  5768. }
  5769.  
  5770. public String getAmConfig_Slpt() {
  5771. return this.amConfig_Slpt;
  5772. }
  5773.  
  5774. public String getAmConfig_Slpt26W() {
  5775. return this.amConfig_Slpt26W;
  5776. }
  5777.  
  5778. public int getAm_x() {
  5779. return this.am_x;
  5780. }
  5781.  
  5782. public int getAm_y() {
  5783. return this.am_y;
  5784. }
  5785.  
  5786. public Bitmap getColon_hm_bitmap() {
  5787. return this.Colon_hm_bitmap;
  5788. }
  5789.  
  5790. public String getColon_hm_config() {
  5791. return this.Colon_hm_config;
  5792. }
  5793.  
  5794. public String getColon_hm_config_Slpt() {
  5795. return this.Colon_hm_config_Slpt;
  5796. }
  5797.  
  5798. public String getColon_hm_config_Slpt26W() {
  5799. return this.Colon_hm_config_Slpt26W;
  5800. }
  5801.  
  5802. public int getColon_hm_x() {
  5803. return this.colon_hm_x;
  5804. }
  5805.  
  5806. public int getColon_hm_y() {
  5807. return this.colon_hm_y;
  5808. }
  5809.  
  5810. public Bitmap getColon_ms_bitmap() {
  5811. return this.Colon_ms_bitmap;
  5812. }
  5813.  
  5814. public String getColon_ms_config() {
  5815. return this.Colon_ms_config;
  5816. }
  5817.  
  5818. public String getColon_ms_config_Slpt() {
  5819. return this.Colon_ms_config_Slpt;
  5820. }
  5821.  
  5822. public String getColon_ms_config_Slpt26W() {
  5823. return this.Colon_ms_config_Slpt26W;
  5824. }
  5825.  
  5826. public int getColon_ms_x() {
  5827. return this.colon_ms_x;
  5828. }
  5829.  
  5830. public int getColon_ms_y() {
  5831. return this.colon_ms_y;
  5832. }
  5833.  
  5834. public WatchFaceConfig.ImageFontInfo getHourImageFontInfo() {
  5835. return this.mHourImageFontInfo;
  5836. }
  5837.  
  5838. public int getHour_high_x() {
  5839. return this.hour_high_x;
  5840. }
  5841.  
  5842. public int getHour_high_y() {
  5843. return this.hour_high_y;
  5844. }
  5845.  
  5846. public int getHour_low_x() {
  5847. return this.hour_low_x;
  5848. }
  5849.  
  5850. public int getHour_low_y() {
  5851. return this.hour_low_y;
  5852. }
  5853.  
  5854. public WatchFaceConfig.ImageFontInfo getMinImageFontInfo() {
  5855. return this.mMinImageFontInfo;
  5856. }
  5857.  
  5858. public int getMin_high_x() {
  5859. return this.min_high_x;
  5860. }
  5861.  
  5862. public int getMin_high_y() {
  5863. return this.min_high_y;
  5864. }
  5865.  
  5866. public int getMin_low_x() {
  5867. return this.min_low_x;
  5868. }
  5869.  
  5870. public int getMin_low_y() {
  5871. return this.min_low_y;
  5872. }
  5873.  
  5874. public Bitmap getPMBitmap() {
  5875. return this.PMBitmap;
  5876. }
  5877.  
  5878. public String getPmConfig_Slpt() {
  5879. return this.pmConfig_Slpt;
  5880. }
  5881.  
  5882. public String getPmConfig_Slpt26W() {
  5883. return this.pmConfig_Slpt26W;
  5884. }
  5885.  
  5886. public int getPm_x() {
  5887. return this.pm_x;
  5888. }
  5889.  
  5890. public int getPm_y() {
  5891. return this.pm_y;
  5892. }
  5893.  
  5894. public WatchFaceConfig.ImageFontInfo getSecImageFontInfo() {
  5895. return this.mSecImageFontInfo;
  5896. }
  5897.  
  5898. public int getSec_high_x() {
  5899. return this.sec_high_x;
  5900. }
  5901.  
  5902. public int getSec_high_y() {
  5903. return this.sec_high_y;
  5904. }
  5905.  
  5906. public int getSec_low_x() {
  5907. return this.sec_low_x;
  5908. }
  5909.  
  5910. public int getSec_low_y() {
  5911. return this.sec_low_y;
  5912. }
  5913.  
  5914. void onDestroy() {
  5915. this.mHourFontConfig = null;
  5916. if (this.mHourImageFontInfo != null)
  5917. this.mHourImageFontInfo.onDestroy();
  5918. this.mMinFontConfig = null;
  5919. if (this.mMinImageFontInfo != null)
  5920. this.mMinImageFontInfo.onDestroy();
  5921. this.mSecFontConfig = null;
  5922. if (this.mSecImageFontInfo != null)
  5923. this.mSecImageFontInfo.onDestroy();
  5924. this.Colon_hm_config = null;
  5925. this.Colon_hm_config_Slpt = null;
  5926. this.Colon_hm_config_Slpt26W = null;
  5927. WatchFaceConfig.recycleBitmap(this.Colon_hm_bitmap);
  5928. this.Colon_ms_config = null;
  5929. this.Colon_ms_config_Slpt = null;
  5930. this.Colon_ms_config_Slpt26W = null;
  5931. WatchFaceConfig.recycleBitmap(this.Colon_ms_bitmap);
  5932. this.amConfig = null;
  5933. this.amConfig_Slpt = null;
  5934. this.amConfig_Slpt26W = null;
  5935. WatchFaceConfig.recycleBitmap(this.AMBitmap);
  5936. this.pmConfig = null;
  5937. this.pmConfig_Slpt = null;
  5938. this.pmConfig_Slpt26W = null;
  5939. WatchFaceConfig.recycleBitmap(this.PMBitmap);
  5940. }
  5941.  
  5942. public void parseAMorPMBitmap() {
  5943. if (this.amConfig != null && this.amConfig.startsWith("@wfz/")) {
  5944. String str = this.amConfig.substring("@wfz/".length());
  5945. this.AMBitmap = WatchFaceConfig.this.parseBitmap(6, str);
  5946. }
  5947. if (this.pmConfig != null && this.pmConfig.startsWith("@wfz/")) {
  5948. String str = this.pmConfig.substring("@wfz/".length());
  5949. this.PMBitmap = WatchFaceConfig.this.parseBitmap(6, str);
  5950. }
  5951. }
  5952.  
  5953. public void parseColonBitmap() {
  5954. if (this.Colon_hm_config != null && this.Colon_hm_config.startsWith("@wfz/")) {
  5955. String str = this.Colon_hm_config.substring("@wfz/".length());
  5956. this.Colon_hm_bitmap = WatchFaceConfig.this.parseBitmap(6, str);
  5957. }
  5958. if (this.Colon_ms_config != null && this.Colon_ms_config.startsWith("@wfz/")) {
  5959. String str = this.Colon_ms_config.substring("@wfz/".length());
  5960. this.Colon_ms_bitmap = WatchFaceConfig.this.parseBitmap(6, str);
  5961. }
  5962. }
  5963.  
  5964. public void setAmConfig(String param1String) {
  5965. this.amConfig = param1String;
  5966. this.amConfig_Slpt = WatchFaceConfig.getSlptConfig(param1String);
  5967. this.amConfig_Slpt26W = WatchFaceConfig.getSlpt26WConfig(param1String);
  5968. }
  5969.  
  5970. public void setAm_x(int param1Int) {
  5971. this.am_x = param1Int;
  5972. }
  5973.  
  5974. public void setAm_y(int param1Int) {
  5975. this.am_y = param1Int;
  5976. }
  5977.  
  5978. public void setColon_hm_config(String param1String) {
  5979. this.Colon_hm_config = param1String;
  5980. this.Colon_hm_config_Slpt = WatchFaceConfig.getSlptConfig(param1String);
  5981. this.Colon_hm_config_Slpt26W = WatchFaceConfig.getSlpt26WConfig(param1String);
  5982. }
  5983.  
  5984. public void setColon_hm_x(int param1Int) {
  5985. this.colon_hm_x = param1Int;
  5986. }
  5987.  
  5988. public void setColon_hm_y(int param1Int) {
  5989. this.colon_hm_y = param1Int;
  5990. }
  5991.  
  5992. public void setColon_ms_config(String param1String) {
  5993. this.Colon_ms_config = param1String;
  5994. this.Colon_ms_config_Slpt = WatchFaceConfig.getSlptConfig(param1String);
  5995. this.Colon_ms_config_Slpt26W = WatchFaceConfig.getSlpt26WConfig(param1String);
  5996. }
  5997.  
  5998. public void setColon_ms_x(int param1Int) {
  5999. this.colon_ms_x = param1Int;
  6000. }
  6001.  
  6002. public void setColon_ms_y(int param1Int) {
  6003. this.colon_ms_y = param1Int;
  6004. }
  6005.  
  6006. public void setPmConfig(String param1String) {
  6007. this.pmConfig = param1String;
  6008. this.pmConfig_Slpt = WatchFaceConfig.getSlptConfig(param1String);
  6009. this.pmConfig_Slpt26W = WatchFaceConfig.getSlpt26WConfig(param1String);
  6010. }
  6011.  
  6012. public void setPm_x(int param1Int) {
  6013. this.pm_x = param1Int;
  6014. }
  6015.  
  6016. public void setPm_y(int param1Int) {
  6017. this.pm_y = param1Int;
  6018. }
  6019.  
  6020. public String toString() {
  6021. return "GTRTimeDis";
  6022. }
  6023. }
  6024.  
  6025. public static class TimeHand {
  6026. Drawable mHours;
  6027.  
  6028. Drawable mMinute;
  6029.  
  6030. Drawable mSeconds;
  6031.  
  6032. public Drawable getHour() {
  6033. return this.mHours;
  6034. }
  6035.  
  6036. public Drawable getMinute() {
  6037. return this.mMinute;
  6038. }
  6039.  
  6040. public Drawable getSeconds() {
  6041. return this.mSeconds;
  6042. }
  6043. }
  6044. }
  6045.  
Add Comment
Please, Sign In to add comment