From c77749a3527b613ee45dc8e7c7a7ebe47e15567a Mon Sep 17 00:00:00 2001 From: wjt983049539 Date: Thu, 8 Jul 2021 14:16:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9checkstyle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/build.gradle | 11 +++++++++++ .../java/rebus/permissionutils/sample/AttrValue.java | 4 ++-- .../rebus/permissionutils/sample/FragmentAbility.java | 4 ++-- .../java/rebus/permissionutils/sample/InfoDialog.java | 2 +- .../java/rebus/permissionutils/sample/ListDialog.java | 2 +- .../rebus/permissionutils/sample/ListProvider.java | 3 +-- .../java/rebus/permissionutils/sample/LogUtils.java | 2 +- .../rebus/permissionutils/sample/MainAbility.java | 4 ++-- .../rebus/permissionutils/sample/MainFraction.java | 4 ++-- .../rebus/permissionutils/sample/MyApplication.java | 4 ++-- .../rebus/permissionutils/sample/OnItemClicker.java | 2 +- .../permissionutils/sample/RequestPermission.java | 4 ++-- .../rebus/permissionutils/sample/SuperButton.java | 2 +- .../sample/slice/FragmentAbilitySlice.java | 4 ++-- .../sample/slice/MainAbilitySlice.java | 4 ++-- .../rebus/permissionutils/sample/ExampleOhosTest.java | 6 +++--- 16 files changed, 36 insertions(+), 26 deletions(-) diff --git a/entry/build.gradle b/entry/build.gradle index 3897cb3..bc6d614 100644 --- a/entry/build.gradle +++ b/entry/build.gradle @@ -1,6 +1,17 @@ apply plugin: 'com.huawei.ohos.hap' apply plugin: 'com.huawei.ohos.decctest' ohos { + signingConfigs { + debug { + storeFile file('D:\\wjt\\WJT\\wangjiangtao.p12') + storePassword '00000018A224262BAD18420A001C4A97A96DC3D2395DD249DE3E55A07047F3964AB918FE1729DB27' + keyAlias = 'wjt' + keyPassword '00000018AE48BBA16F14B977B82E10C08ECD659BDF04F7198CD579BE9C3B9BED1DE9CCCE6DD2DDC8' + signAlg = 'SHA256withECDSA' + profile file('D:\\wjt\\WJT\\PermissionUtilsDebug.p7b') + certpath file('D:\\wjt\\WJT\\wangjiangtao.cer') + } + } compileSdkVersion 6 defaultConfig { compatibleSdkVersion 5 diff --git a/entry/src/main/java/rebus/permissionutils/sample/AttrValue.java b/entry/src/main/java/rebus/permissionutils/sample/AttrValue.java index 55c1095..47d3afd 100644 --- a/entry/src/main/java/rebus/permissionutils/sample/AttrValue.java +++ b/entry/src/main/java/rebus/permissionutils/sample/AttrValue.java @@ -2,8 +2,8 @@ * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain an copy of the License at - + * You may obtain a copy of the License at + * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software diff --git a/entry/src/main/java/rebus/permissionutils/sample/FragmentAbility.java b/entry/src/main/java/rebus/permissionutils/sample/FragmentAbility.java index 6f62550..ec342b5 100644 --- a/entry/src/main/java/rebus/permissionutils/sample/FragmentAbility.java +++ b/entry/src/main/java/rebus/permissionutils/sample/FragmentAbility.java @@ -2,8 +2,8 @@ * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain an copy of the License at - + * You may obtain a copy of the License at + * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software diff --git a/entry/src/main/java/rebus/permissionutils/sample/InfoDialog.java b/entry/src/main/java/rebus/permissionutils/sample/InfoDialog.java index 24a38f0..44320f3 100644 --- a/entry/src/main/java/rebus/permissionutils/sample/InfoDialog.java +++ b/entry/src/main/java/rebus/permissionutils/sample/InfoDialog.java @@ -2,7 +2,7 @@ * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain an copy of the License at + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/entry/src/main/java/rebus/permissionutils/sample/ListDialog.java b/entry/src/main/java/rebus/permissionutils/sample/ListDialog.java index c7d1a4a..7678693 100644 --- a/entry/src/main/java/rebus/permissionutils/sample/ListDialog.java +++ b/entry/src/main/java/rebus/permissionutils/sample/ListDialog.java @@ -2,7 +2,7 @@ * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain an copy of the License at + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/entry/src/main/java/rebus/permissionutils/sample/ListProvider.java b/entry/src/main/java/rebus/permissionutils/sample/ListProvider.java index 304ed76..de12ce6 100644 --- a/entry/src/main/java/rebus/permissionutils/sample/ListProvider.java +++ b/entry/src/main/java/rebus/permissionutils/sample/ListProvider.java @@ -1,9 +1,8 @@ - /* * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain an copy of the License at + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/entry/src/main/java/rebus/permissionutils/sample/LogUtils.java b/entry/src/main/java/rebus/permissionutils/sample/LogUtils.java index f892082..f90dfe9 100644 --- a/entry/src/main/java/rebus/permissionutils/sample/LogUtils.java +++ b/entry/src/main/java/rebus/permissionutils/sample/LogUtils.java @@ -2,7 +2,7 @@ * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain an copy of the License at + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/entry/src/main/java/rebus/permissionutils/sample/MainAbility.java b/entry/src/main/java/rebus/permissionutils/sample/MainAbility.java index 2e4def2..344318b 100644 --- a/entry/src/main/java/rebus/permissionutils/sample/MainAbility.java +++ b/entry/src/main/java/rebus/permissionutils/sample/MainAbility.java @@ -2,8 +2,8 @@ * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain an copy of the License at - + * You may obtain a copy of the License at + * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software diff --git a/entry/src/main/java/rebus/permissionutils/sample/MainFraction.java b/entry/src/main/java/rebus/permissionutils/sample/MainFraction.java index ab7aaed..a71386d 100644 --- a/entry/src/main/java/rebus/permissionutils/sample/MainFraction.java +++ b/entry/src/main/java/rebus/permissionutils/sample/MainFraction.java @@ -2,8 +2,8 @@ * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain an copy of the License at - + * You may obtain a copy of the License at + * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software diff --git a/entry/src/main/java/rebus/permissionutils/sample/MyApplication.java b/entry/src/main/java/rebus/permissionutils/sample/MyApplication.java index 0d0e469..8af42a4 100644 --- a/entry/src/main/java/rebus/permissionutils/sample/MyApplication.java +++ b/entry/src/main/java/rebus/permissionutils/sample/MyApplication.java @@ -2,8 +2,8 @@ * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain an copy of the License at - + * You may obtain a copy of the License at + * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software diff --git a/entry/src/main/java/rebus/permissionutils/sample/OnItemClicker.java b/entry/src/main/java/rebus/permissionutils/sample/OnItemClicker.java index 45a3ccf..73fbdae 100644 --- a/entry/src/main/java/rebus/permissionutils/sample/OnItemClicker.java +++ b/entry/src/main/java/rebus/permissionutils/sample/OnItemClicker.java @@ -2,7 +2,7 @@ * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain an copy of the License at + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/entry/src/main/java/rebus/permissionutils/sample/RequestPermission.java b/entry/src/main/java/rebus/permissionutils/sample/RequestPermission.java index 4f59607..f6aca74 100644 --- a/entry/src/main/java/rebus/permissionutils/sample/RequestPermission.java +++ b/entry/src/main/java/rebus/permissionutils/sample/RequestPermission.java @@ -2,8 +2,8 @@ * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain an copy of the License at - + * You may obtain a copy of the License at + * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software diff --git a/entry/src/main/java/rebus/permissionutils/sample/SuperButton.java b/entry/src/main/java/rebus/permissionutils/sample/SuperButton.java index 3bbb303..a93d5e2 100644 --- a/entry/src/main/java/rebus/permissionutils/sample/SuperButton.java +++ b/entry/src/main/java/rebus/permissionutils/sample/SuperButton.java @@ -2,7 +2,7 @@ * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain an copy of the License at + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/entry/src/main/java/rebus/permissionutils/sample/slice/FragmentAbilitySlice.java b/entry/src/main/java/rebus/permissionutils/sample/slice/FragmentAbilitySlice.java index 637be0b..9e0bcad 100644 --- a/entry/src/main/java/rebus/permissionutils/sample/slice/FragmentAbilitySlice.java +++ b/entry/src/main/java/rebus/permissionutils/sample/slice/FragmentAbilitySlice.java @@ -1,8 +1,8 @@ /* - * Copyright (C) 2021 The Chinese Software International Co., Ltd. + * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain an copy of the License at + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/entry/src/main/java/rebus/permissionutils/sample/slice/MainAbilitySlice.java b/entry/src/main/java/rebus/permissionutils/sample/slice/MainAbilitySlice.java index 43985ac..cc9b464 100644 --- a/entry/src/main/java/rebus/permissionutils/sample/slice/MainAbilitySlice.java +++ b/entry/src/main/java/rebus/permissionutils/sample/slice/MainAbilitySlice.java @@ -1,8 +1,8 @@ /* - * Copyright (C) 2021 The Chinese Software International Co., Ltd. + * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain an copy of the License at + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/entry/src/ohosTest/java/rebus/permissionutils/sample/ExampleOhosTest.java b/entry/src/ohosTest/java/rebus/permissionutils/sample/ExampleOhosTest.java index cee1c32..c30f6ff 100644 --- a/entry/src/ohosTest/java/rebus/permissionutils/sample/ExampleOhosTest.java +++ b/entry/src/ohosTest/java/rebus/permissionutils/sample/ExampleOhosTest.java @@ -2,8 +2,8 @@ * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain an copy of the License at - + * You may obtain a copy of the License at + * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -38,7 +38,7 @@ public class ExampleOhosTest { } @Test - public void isGranted(){ + public void isGranted(){ boolean granted = PermissionUtils.isGranted(AbilityDelegatorRegistry.getAbilityDelegator().getCurrentTopAbility(), PermissionEnum.WRITE_EXTERNAL_STORAGE); assertFalse(granted); } -- Gitee From fc8cf9b2747069813b246f33f032a35f6e58cb3b Mon Sep 17 00:00:00 2001 From: wjt983049539 Date: Thu, 8 Jul 2021 14:22:21 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9checkstyle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/build.gradle | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/entry/build.gradle b/entry/build.gradle index bc6d614..3897cb3 100644 --- a/entry/build.gradle +++ b/entry/build.gradle @@ -1,17 +1,6 @@ apply plugin: 'com.huawei.ohos.hap' apply plugin: 'com.huawei.ohos.decctest' ohos { - signingConfigs { - debug { - storeFile file('D:\\wjt\\WJT\\wangjiangtao.p12') - storePassword '00000018A224262BAD18420A001C4A97A96DC3D2395DD249DE3E55A07047F3964AB918FE1729DB27' - keyAlias = 'wjt' - keyPassword '00000018AE48BBA16F14B977B82E10C08ECD659BDF04F7198CD579BE9C3B9BED1DE9CCCE6DD2DDC8' - signAlg = 'SHA256withECDSA' - profile file('D:\\wjt\\WJT\\PermissionUtilsDebug.p7b') - certpath file('D:\\wjt\\WJT\\wangjiangtao.cer') - } - } compileSdkVersion 6 defaultConfig { compatibleSdkVersion 5 -- Gitee