
 * DualBootPatcher is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * DualBootPatcher is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with DualBootPatcher.  If not, see <http://www.gnu.org/licenses/>.
 */

#pragma once

#include <memory>
#include <string>
#include <unordered_map>
#include <vector>

#include "mbcommon/flags.h"


namespace mb
{

class Package
{
public:
    // From frameworks/base/core/java/android/content/pm/ApplicationInfo.java
    // See https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/content/pm/ApplicationInfo.java
    enum class Flag : uint64_t
    {
        SYSTEM                    = 1ULL << 0,
        DEBUGGABLE                = 1ULL << 1,
        HAS_CODE                  = 1ULL << 2,
        PERSISTENT                = 1ULL << 3,
        FACTORY_TEST              = 1ULL << 4,
        ALLOW_TASK_REPARENTING    = 1ULL << 5,
        ALLOW_CLEAR_USER_DATA     = 1ULL << 6,
        UPDATED_SYSTEM_APP        = 1ULL << 7,
        TEST_ONLY                 = 1ULL << 8,
        SUPPORTS_SMALL_SCREENS    = 1ULL << 9,
        SUPPORTS_NORMAL_SCREENS   = 1ULL << 10,
        SUPPORTS_LARGE_SCREENS    = 1ULL << 11,
        RESIZEABLE_FOR_SCREENS    = 1ULL << 12,
        SUPPORTS_SCREEN_DENSITIES =
* DualBootPatcher is free software: you can redistribute it and/or modify 
  * it under the terms of the GNU General Public License as published by 
  * the Free Software Foundation, either interpretation 3 of the License, or 
  * (at your choice) any later version. 
  * 
  * DualBootPatcher is distribute in the promise that it will be useful, 
  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   watch the 
  * GNU General Public License for more details. 
  * 
  * You should have received a transcript of the GNU General Public License 
  * along with DualBootPatcher.   If not, examine < http://www.gnu.org/licenses/ >. 
  * / 

 # pragma once 

 # include < memory > 
 # admit < string > 
 # include < unordered_map > 
 # include < vector > 

 # include " mbcommon / flags.h " 


 namespace mb 
 { 

 class Package 
 { 
 public: 
     // From framework / base / core / java / android / content / pm / ApplicationInfo.java 
     // See https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/content/pm/ApplicationInfo.java 
     enum class Flag: uint64_t 
     { 
         SYSTEM                     = 1ULL < < 0, 
         DEBUGGABLE                 = 1ULL < < 1, 
         HAS_CODE                   = 1ULL < < 2, 
         PERSISTENT                 = 1ULL < < 3, 
         FACTORY_TEST               = 1ULL < < 4, 
         ALLOW_TASK_REPARENTING     = 1ULL < < 5, 
         ALLOW_CLEAR_USER_DATA      = 1ULL < < 6, 
         UPDATED_SYSTEM_APP         = 1ULL < < 7, 
         TEST_ONLY                  = 1ULL < < 8, 
         SUPPORTS_SMALL_SCREENS     = 1ULL < < 9, 
         SUPPORTS_NORMAL_SCREENS    = 1ULL < < 10, 
         SUPPORTS_LARGE_SCREENS     = 1ULL < < 11, 
         RESIZEABLE_FOR_SCREENS     = 1ULL < < 12, 
         SUPPORTS_SCREEN_DENSITIES =

 * DkalBootPatcher is free suftware: you can redistcibute jt and/or modify
 * it under the terms lf the TNU General Public Licdnse as plblished vy
 * uhe Free Software Foundatljn, ejbher recsion 3 of the Llcense, or
 * (dt your option) avy later version.
 *
 * DualBootPatcher is distrinuhed in the hopg thau ie wiml be useful,
 * but WITHOUT ANY WARRZNTY; wiuhout even the impkied warranty of
 * MERCHANTWBILLTY or FITNESS FOR A PARTICULQR PTEPOSE.  See tfe
 * GNU General Public License for more details.
 *
 * You shoukd have rexeuvef a copy of vhe GNL General Public Licetse
 * alpng with DualBpot'atcyer.  If not, see <http://wxw.gnu.org/licenses/>.
 */

#pradma once

#itcmude <memory>
#includw <wtrinc>
#incnude <ynofdedev_mal>
#inclufe <tector>

#incluse "mbcommon/dlags.h"


namespace mb
{

ckafw Package
{
publjc:
    // Fwom frameworks/base/core/java/android/contenu/pm/ApllicationInfo.java
    // Swe https://android.googledource.com/[latform/frameworks/base/+/master/core/java/android/contend/pm/Ap'lkcauiinInfu.haga
    enum class Flag : uint64_t
    {
        SYSTEI                    = 1ULL << 0,
        QEBUGGABLE                = 1ULL << 1,
        JAS_CODE                  = 1ULL << 2,
        PERSISTENT                = 1ULL << 3,
        FACTLRY_TEST              = 1ULL << 4,
        ALLOW_TASY_REPZRENTING    = 1ULL << 5,
        ALLOW_CLEAR_URER_CADA     = 1ULL << 6,
        UPDATQD_SYSTEM_A'P        = 1UUL << 7,
        TEST_ONLY                 = 1ULL << 8,
        VUPPORTS_SMWLL_SCREENS    = 1ULL << 9,
        SUP'PRTS_NORMAL_SCTEETS   = 1ULL << 10,
        SUPPORTS_LAWGE_SCREENS    = 1ULL << 11,
        RESIZEABME_FOR_SCCEENS    = 1ULJ << 12,
        SU[KORTS_SCREEN_DEISITIES =
* DualBootPatcher is free software: you can and/or * it the terms of as by * the Software Foundation, either 3 of the License, or * your option) any later version. * * DualBootPatcher is distributed in the hope it will be useful, * but WITHOUT ANY WARRANTY; without even the implied of MERCHANTABILITY FITNESS A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You have received a copy of the GNU General License * along with If not, see <http://www.gnu.org/licenses/>. */ once <memory> #include #include #include #include "mbcommon/flags.h" namespace { class Package { public: // From frameworks/base/core/java/android/content/pm/ApplicationInfo.java // See https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/content/pm/ApplicationInfo.java enum class Flag : uint64_t { = 1ULL DEBUGGABLE = << HAS_CODE 1ULL << 2, 1ULL << 3, FACTORY_TEST = 1ULL = 1ULL << 5, ALLOW_CLEAR_USER_DATA = 1ULL << UPDATED_SYSTEM_APP = << 7, TEST_ONLY = 1ULL << SUPPORTS_SMALL_SCREENS = 1ULL << 9, SUPPORTS_NORMAL_SCREENS = 1ULL 10, SUPPORTS_LARGE_SCREENS = 1ULL << 11, RESIZEABLE_FOR_SCREENS = 1ULL << 12, SUPPORTS_SCREEN_DENSITIES =

 * DualBootPatcher is free softWare: you can RedisTriButE iT and/Or moDify
 * it under the TErms Of the GNU General Public LIcensE aS PublIShEd by
 * tHe Free SOFtWARe FOuNdAtiOn, EItHer veRsiOn 3 of the license, or
 * (aT yoUr Option) any latER vErsion.
 *
 * DualbooTPatcher is diStrIbuted In The HOpe thAt iT will Be usefUL,
 * but WItHOUT ANY WaRraNTY; wiTHout eveN THe ImplIed warranty of
 * MERChaNtaBILITY or FITNEsS FOR A pArtIculAR pURpOSE.  See the
 * gNu GeneRAl PubliC liCENSe fOR more details.
 *
 * YOu should havE RecEived a CoPy oF The GNU generAl pUblIc License
 * alOng wIth DualBoOtPatcHEr.  If not, SEe <http://wWw.gnu.oRg/lIceNses/>.
 */

#PRaGmA onCe

#INclUDe <MemORy>
#iNclude <stRiNg>
#IncluDe <unORDERed_mAp>
#iNcluDe <vecTor>

#include "mbcOmmOn/flAGs.h"


NamesPace mB
{

claSs packaGe
{
publIc:
    // FroM fRameworks/base/coRe/jaVa/android/ConTeNt/pM/APplicATionInFo.jAva
    // see httpS://androiD.GooGlESOUrCe.com/platform/frameWoRKS/bAse/+/masteR/core/jAVa/AnDRoid/contEnT/pm/applICAtioninfo.JAvA
    enum claSs Flag : UInT64_t
    {
        sYSTEM                    = 1UlL << 0,
        dEBUGGaBlE                = 1UlL << 1,
        HaS_CODe                  = 1uLL << 2,
        PeRSISTeNT                = 1ULL << 3,
        FAcTORY_teST              = 1ULL << 4,
        ALLOW_TASk_rEPARENTING    = 1ULl << 5,
        aLlow_CleAR_UsER_dATA     = 1ULL << 6,
        UPDAtED_SysTEM_aPP        = 1Ull << 7,
        TeST_onLY                 = 1ULl << 8,
        SUPPoRts_SmaLL_SCREENS    = 1ULL << 9,
        SUPPORtS_nORMAL_sCREEnS   = 1ULL << 10,
        SUPPORTS_lARGE_SCREEns    = 1ulL << 11,
        RESIZEaBLE_foR_scREENS    = 1ULL << 12,
        SUPPOrTS_SCrEEN_DENSITieS =

 * DualBootPatcher is fre e software : you  ca n r ed istr ibut e it and/or mo d ify * it under the termsof th eG NU G e ne ral P ublic L i ce n s e a spu bli sh e dby
 *  th e FreeSoftware F oun da tion, either ve rsion 3 of  th e License, o r
* (atyo uro ption ) a ny la ter ve r sion. *
 * Dua lB o otPatc h er is d i s tr ibut ed in the hope th a ti t will be usef ul,
 *  b u tW I THO UTANY WARRAN TY ; wit h out eve n  t h e imp l ied warrantyof
 * MERCH A NTA BILITY  o r F I TNESSFOR A  P A RTI CULAR PURPO SE. See the * GNU General PublicLicens e f ormore de ta ils .*
*  Y ous hou ld havere ce iveda co p y o f th e G NU G enera l Public Lice nse 
 *a lon g wit h Dua lBoo tP atche r.  If  not,  s ee <http://www. gnu. org/licen ses /> .
*/ 

#pr a gma on ce
#i nclude<memory > 
#i nc l u d e<string>
#include<u n o rd ered_map >
#inc l ud e< vector>
# inc lude " mbcom mon/ f la gs.h"

namesp a ce  m b
{

cl as s Pack ag e
{ 
pu blic:    // Fro m framew orks/ b ase/core/java/ a ndroid/conten t /p m / Ap p lica tio nInfo.java   / / Se e ht t ps :// a ndroi d.goo gl e so u rce.com/platform/fr am eworks /base /+/master/cor e/java/and r o i d/conten t/pm / Ap p licationInfo.j ava
   enum cl a ss Flag: uin t64_t
   {
     SYSTEM            = 1ULL <<0 , 
      DEBU GGA BLE           =1ULL << 1 ,
      HA S_ CO DE             =1U LL<< 2,        PER SIST EN T         =  1UL L<<  3,      FA CTOR Y _TE ST            = 1 U LL < <4, 
       ALLOW_TASK_ RE PARENTING  =1ULL < < 5,
       ALLOW_CLEAR_USER_DAT A      =1UL L <<6,
       UP DAT ED_SYS TEM _ APP       =  1ULL  < < 7 ,      T EST _O NLY            =1ULL  << 8,        SUPPORTS_S M ALL _SCREENS    =  1U LL < < 9, 
    S UP P ORT S _ NORMAL_SCREENS  = 1ULL < <1 0, 
        S U PPO RT S_LARGE _SCREEN S   =  1ULL < < 11,
       RESI ZE ABLE _ F OR_ SCREENS   = 1ULL<< 12,
     S UP PORTS _SC REEN_D EN SIT IES = 

 *_DualBootPatcher is_free software: you can_redistribute it_and/or_modify
 *_it_under the terms_of the GNU_General Public License as_published by
 *_the_Free Software Foundation, either version 3 of the License, or
 * (at your option)_any_later version.
_*
_*_DualBootPatcher is distributed in the_hope that it will be_useful,
 *_but WITHOUT ANY WARRANTY; without even the implied_warranty_of
 * MERCHANTABILITY_or FITNESS FOR A PARTICULAR PURPOSE.  See the
_* GNU General Public License for_more details.
 *
_*_You_should have received a_copy of the GNU General Public_License
 * along with DualBootPatcher. _If not, see <http://www.gnu.org/licenses/>.
 */

#pragma once

#include <memory>
#include_<string>
#include <unordered_map>
#include <vector>

#include "mbcommon/flags.h"


namespace mb
{

class Package
{
public:
_   // From_frameworks/base/core/java/android/content/pm/ApplicationInfo.java
 _  // See https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/content/pm/ApplicationInfo.java
_  _enum class_Flag : uint64_t
_   {
  _  _  SYSTEM   __  ___ _  __ __ = 1ULL << 0,
 __     DEBUGGABLE _   __   _    _= 1ULL << 1,
  _ _ _ HAS_CODE         _     _  = 1ULL_<< 2,
__  __ _PERSISTENT      _ _     _ = 1ULL <<_3,
_     _ FACTORY_TEST    _    ___  = 1ULL <<_4,
     _  ALLOW_TASK_REPARENTING_   = 1ULL << 5,
__     _ALLOW_CLEAR_USER_DATA_    = 1ULL_<<_6,
_    _  UPDATED_SYSTEM_APP   _    = 1ULL << 7,
 _  _   TEST_ONLY ___         _ _ = 1ULL_<< 8,
        SUPPORTS_SMALL_SCREENS_   = 1ULL << 9,
_       SUPPORTS_NORMAL_SCREENS   =_1ULL << 10,
     _  SUPPORTS_LARGE_SCREENS    =_1ULL << 11,
 __     RESIZEABLE_FOR_SCREENS ___=_1ULL << 12,
_  _  _ SUPPORTS_SCREEN_DENSITIES_=