Constants.java 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *http://www.apache.org/licenses/LICENSE-2.0
  7. * Unless required by applicable law or agreed to in writing, software
  8. * distributed under the License is distributed on an "AS IS" BASIS,
  9. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. * See the License for the specific language governing permissions and
  11. * limitations under the License.
  12. */
  13. package com.DrmSDK;
  14. /**
  15. * 公共常量定义类
  16. * Common constant definition class
  17. *
  18. * @since 2020/07/01
  19. */
  20. public class Constants {
  21. /**
  22. * Bundle key: 拉起Activity.
  23. * Bundle key: Pull up the activity
  24. */
  25. public static final String KEY_EXTRA_ACTION = "drm_key_extra_actiion";
  26. /**
  27. * Bundle key: 拉起Activity的包名
  28. * Bundle key: name of the package for starting the activity.
  29. */
  30. public static final String KEY_EXTRA_PACKAGE = "drm_key_extra_package";
  31. /**
  32. * Bundle key: Dialog类型
  33. * Bundle key: Dialog type
  34. */
  35. public static final String KEY_EXTRA_DIALOG = "drm_key_extra_dialog";
  36. /**
  37. * Bundle key: 错误码类型
  38. * Bundle key: error code type.
  39. */
  40. public static final String KEY_EXTRA_CODE = "drm_key_extra_code";
  41. /**
  42. * Bundle key: 其他信息
  43. * Bundle key: other information
  44. */
  45. public static final String KEY_EXTRA_EXTRA = "drm_key_extra_extra";
  46. /**
  47. * Bundle key: 向外部activity传递的通用参数
  48. * Bundle key: common parameter transferred to an external activity.
  49. */
  50. public static final String KEY_JSON_EXTRA = "json_extra";
  51. /**
  52. * 拉起详情页的action
  53. * Action for starting the details page
  54. */
  55. public static final String DOOR_TO_ALLY_OF_DETAIL = "com.huawei.appmarket.intent.action.AppDetail";
  56. /**
  57. * Activity返回码:同意用户使用协议
  58. * Activity return code: agreeing to the user agreement
  59. */
  60. public static final int RESULT_CODE_AGREEMENT_AGREED = 1001;
  61. /**
  62. * Activity返回码:不同意用户使用协议
  63. * Activity return code: The user agreement is not approved.
  64. */
  65. public static final int RESULT_CODE_AGREEMENT_DECLINED = 1002;
  66. /**
  67. * Activity返回码:账号登陆成功
  68. * Activity return code: The login is successful.
  69. */
  70. public static final int RESULT_CODE_LOGIN_SUCCESS = 10001;
  71. /**
  72. * Activity返回码:账号登陆失败
  73. * Activity return code: account login failure
  74. */
  75. public static final int RESULT_CODE_LOGIN_FAILED = 10002;
  76. /**
  77. * 加入会员成功
  78. * Member added successfully.
  79. */
  80. public static final int RESULT_CODE_JOIN_MEMBER_FAILED = 20001;
  81. /**
  82. * 加入会员失败
  83. * Failed to join the member.
  84. */
  85. public static final int RESULT_CODE_JOIN_MEMBER_SUCCESS = 20002;
  86. }