Android获取app应用程序大小的方法

2019-12-10 19:54:58王旭

下面是两个AIDL文件的代码。。。

步骤(Android Studio):

1、在main文件夹下,建立一个aidl文件夹的文件夹

2、建立一个包,包名为android.content.pm

3、结构图

Android获取app应用程序大小的方法

*******PackageStats.aidl文件***************

 

 
  1. /* //device/java/android/android/view/WindowManager.aidl  ** 
  2. ** Copyright 2007, The Android Open Source Project  ** 
  3. ** Licensed under the Apache License, Version 2.0 (the "License");   ** you may not use this file except in compliance with the License.  
  4. ** You may obtain a copy of the License at   ** 
  5. ** http://www.easck.com/licenses/LICENSE-2.0   ** 
  6. ** Unless required by applicable law or agreed to in writing, software   ** distributed under the License is distributed on an "AS IS" BASIS,  
  7. ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   ** See the License for the specific language governing permissions and  
  8. ** limitations under the License.  */ 
  9. package android.content.pm;  parcelable PackageStats;